blob: efa6e6bfc45d2b919c71050e82d5995fb6377cea [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jesus Cea616de772010-04-28 10:32:30 +00002# From configure.in Revision: 80443 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +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+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +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
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +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
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +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+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +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 Vassalottibd7569b2009-07-17 23:09:02 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +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>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
Ronald Oussoren75912852010-04-08 08:13:31 +0000715LDCXXSHARED
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000716BLDSHARED
717CCSHARED
718LINKFORSHARED
719CFLAGSFORSHARED
720SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000721PKG_CONFIG
722LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000723USE_SIGNAL_MODULE
724SIGNAL_OBJS
725USE_THREAD_MODULE
726LDLAST
727THREADOBJ
728DLINCLDIR
729DYNLOADFILE
730MACHDEP_OBJS
731TRUE
732LIBOBJS
733HAVE_GETHOSTBYNAME_R_6_ARG
734HAVE_GETHOSTBYNAME_R_5_ARG
735HAVE_GETHOSTBYNAME_R_3_ARG
736HAVE_GETHOSTBYNAME_R
737HAVE_GETHOSTBYNAME
738LIBM
739LIBC
740UNICODE_OBJS
741THREADHEADERS
742SRCDIRS
743LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000744ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000745 ac_precious_vars='build_alias
746host_alias
747target_alias
748CC
749CFLAGS
750LDFLAGS
751LIBS
752CPPFLAGS
753CPP'
754
Guido van Rossum627b2d71993-12-24 10:39:16 +0000755
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757ac_init_help=
758ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759# The variables have the same names as the options, with
760# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000761cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764no_recursion=
765prefix=NONE
766program_prefix=NONE
767program_suffix=NONE
768program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000770site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773x_includes=NONE
774x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000775
776# Installation directory options.
777# These are left unexpanded so users can "make install exec_prefix=/foo"
778# and all the variables that are supposed to be based on exec_prefix
779# by default will actually change.
780# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782bindir='${exec_prefix}/bin'
783sbindir='${exec_prefix}/sbin'
784libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000785datarootdir='${prefix}/share'
786datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000787sysconfdir='${prefix}/etc'
788sharedstatedir='${prefix}/com'
789localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000790includedir='${prefix}/include'
791oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000792docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
793infodir='${datarootdir}/info'
794htmldir='${docdir}'
795dvidir='${docdir}'
796pdfdir='${docdir}'
797psdir='${docdir}'
798libdir='${exec_prefix}/lib'
799localedir='${datarootdir}/locale'
800mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000803ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806 # If the previous option needs an argument, assign it.
807 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000808 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 ac_prev=
810 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000811 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813 case $ac_option in
814 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
815 *) ac_optarg=yes ;;
816 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818 # Accept the important Cygnus configure options, so we can diagnose typos.
819
Martin v. Löwiseba40652007-08-30 20:10:57 +0000820 case $ac_dashdash$ac_option in
821 --)
822 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -bindir | --bindir | --bindi | --bind | --bin | --bi)
825 ac_prev=bindir ;;
826 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000827 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828
829 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834 -cache-file | --cache-file | --cache-fil | --cache-fi \
835 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
836 ac_prev=cache_file ;;
837 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
838 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 cache_file=$ac_optarg ;;
840
841 --config-cache | -C)
842 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
850 | --dataroo | --dataro | --datar)
851 ac_prev=datarootdir ;;
852 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
853 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
854 datarootdir=$ac_optarg ;;
855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000857 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000859 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
860 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000862 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
863 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000864
865 -docdir | --docdir | --docdi | --doc | --do)
866 ac_prev=docdir ;;
867 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
868 docdir=$ac_optarg ;;
869
870 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
871 ac_prev=dvidir ;;
872 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
873 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
875 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000876 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000878 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
879 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000881 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
882 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
885 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
886 | --exec | --exe | --ex)
887 ac_prev=exec_prefix ;;
888 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
889 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
890 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
893 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Obsolete; use --with-gas.
895 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 -help | --help | --hel | --he | -h)
898 ac_init_help=long ;;
899 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
900 ac_init_help=recursive ;;
901 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
902 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
910 ac_prev=htmldir ;;
911 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
912 | --ht=*)
913 htmldir=$ac_optarg ;;
914
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 -includedir | --includedir | --includedi | --included | --include \
916 | --includ | --inclu | --incl | --inc)
917 ac_prev=includedir ;;
918 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
919 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -infodir | --infodir | --infodi | --infod | --info | --inf)
923 ac_prev=infodir ;;
924 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -libdir | --libdir | --libdi | --libd)
928 ac_prev=libdir ;;
929 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
932 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
933 | --libexe | --libex | --libe)
934 ac_prev=libexecdir ;;
935 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
936 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -localedir | --localedir | --localedi | --localed | --locale)
940 ac_prev=localedir ;;
941 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
942 localedir=$ac_optarg ;;
943
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=localstatedir ;;
947 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000948 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
951 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
952 ac_prev=mandir ;;
953 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Obsolete; use --without-fp.
958 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 no_create=yes ;;
963
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
965 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
966 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
969 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
970 | --oldin | --oldi | --old | --ol | --o)
971 ac_prev=oldincludedir ;;
972 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
973 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
974 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
978 ac_prev=prefix ;;
979 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-prefix | --program-prefix | --program-prefi | --program-pref \
983 | --program-pre | --program-pr | --program-p)
984 ac_prev=program_prefix ;;
985 -program-prefix=* | --program-prefix=* | --program-prefi=* \
986 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-suffix | --program-suffix | --program-suffi | --program-suff \
990 | --program-suf | --program-su | --program-s)
991 ac_prev=program_suffix ;;
992 -program-suffix=* | --program-suffix=* | --program-suffi=* \
993 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -program-transform-name | --program-transform-name \
997 | --program-transform-nam | --program-transform-na \
998 | --program-transform-n | --program-transform- \
999 | --program-transform | --program-transfor \
1000 | --program-transfo | --program-transf \
1001 | --program-trans | --program-tran \
1002 | --progr-tra | --program-tr | --program-t)
1003 ac_prev=program_transform_name ;;
1004 -program-transform-name=* | --program-transform-name=* \
1005 | --program-transform-nam=* | --program-transform-na=* \
1006 | --program-transform-n=* | --program-transform-=* \
1007 | --program-transform=* | --program-transfor=* \
1008 | --program-transfo=* | --program-transf=* \
1009 | --program-trans=* | --program-tran=* \
1010 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwiseba40652007-08-30 20:10:57 +00001013 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1014 ac_prev=pdfdir ;;
1015 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1016 pdfdir=$ac_optarg ;;
1017
1018 -psdir | --psdir | --psdi | --psd | --ps)
1019 ac_prev=psdir ;;
1020 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1021 psdir=$ac_optarg ;;
1022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1024 | -silent | --silent | --silen | --sile | --sil)
1025 silent=yes ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1028 ac_prev=sbindir ;;
1029 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1030 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1034 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1035 | --sharedst | --shareds | --shared | --share | --shar \
1036 | --sha | --sh)
1037 ac_prev=sharedstatedir ;;
1038 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1039 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1040 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1041 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044 -site | --site | --sit)
1045 ac_prev=site ;;
1046 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1050 ac_prev=srcdir ;;
1051 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1055 | --syscon | --sysco | --sysc | --sys | --sy)
1056 ac_prev=sysconfdir ;;
1057 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1058 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1067 verbose=yes ;;
1068
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 -version | --version | --versio | --versi | --vers | -V)
1070 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001073 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1076 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001082 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001084 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1085 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001087 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1088 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 --x)
1091 # Obsolete; use --with-x.
1092 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1095 | --x-incl | --x-inc | --x-in | --x-i)
1096 ac_prev=x_includes ;;
1097 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1098 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1102 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1103 ac_prev=x_libraries ;;
1104 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1105 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001108 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001109Try \`$0 --help' for more information." >&2
1110 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 *=*)
1114 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1115 # Reject names that are not valid shell variable names.
1116 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001117 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001119 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 export $ac_envvar ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001124 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001126 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 ;;
1129
1130 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001131done
1132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137fi
1138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001139# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001140for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1141 datadir sysconfdir sharedstatedir localstatedir includedir \
1142 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1143 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001145 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 [\\/$]* | ?:[\\/]* ) continue;;
1148 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001150 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001151 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001152done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# There might be people who depend on the old broken behavior: `$host'
1155# used to hold the argument of --host etc.
1156# FIXME: To remove some day.
1157build=$build_alias
1158host=$host_alias
1159target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160
Martin v. Löwis11437992002-04-12 09:54:03 +00001161# FIXME: To remove some day.
1162if test "x$host_alias" != x; then
1163 if test "x$build_alias" = x; then
1164 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001165 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 +00001166 If a cross compiler is detected then cross compile mode will be used." >&2
1167 elif test "x$build_alias" != "x$host_alias"; then
1168 cross_compiling=yes
1169 fi
1170fi
1171
1172ac_tool_prefix=
1173test -n "$host_alias" && ac_tool_prefix=$host_alias-
1174
1175test "$silent" = yes && exec 6>/dev/null
1176
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178ac_pwd=`pwd` && test -n "$ac_pwd" &&
1179ac_ls_di=`ls -di .` &&
1180ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001181 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 { (exit 1); exit 1; }; }
1183test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001184 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 { (exit 1); exit 1; }; }
1186
1187
Guido van Rossum627b2d71993-12-24 10:39:16 +00001188# Find the source files, if location was not specified.
1189if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001191 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001192 ac_confdir=`$as_dirname -- "$0" ||
1193$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1194 X"$0" : 'X\(//\)[^/]' \| \
1195 X"$0" : 'X\(//\)$' \| \
1196 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1197echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)[^/].*/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\/\)$/{
1207 s//\1/
1208 q
1209 }
1210 /^X\(\/\).*/{
1211 s//\1/
1212 q
1213 }
1214 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217 srcdir=..
1218 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219else
1220 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222if test ! -r "$srcdir/$ac_unique_file"; then
1223 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001224 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1228ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001229 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001230 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001231 pwd)`
1232# When building in place, set srcdir=.
1233if test "$ac_abs_confdir" = "$ac_pwd"; then
1234 srcdir=.
1235fi
1236# Remove unnecessary trailing slashes from srcdir.
1237# Double slashes in file names in object file debugging info
1238# mess up M-x gdb in Emacs.
1239case $srcdir in
1240*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1241esac
1242for ac_var in $ac_precious_vars; do
1243 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1244 eval ac_env_${ac_var}_value=\$${ac_var}
1245 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1246 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1247done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249#
1250# Report the --help message.
1251#
1252if test "$ac_init_help" = "long"; then
1253 # Omit some internal or obsolete options to make the list less imposing.
1254 # This message is too long to be a string in the A/UX 3.1 sh.
1255 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001256\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257
1258Usage: $0 [OPTION]... [VAR=VALUE]...
1259
1260To assign environment variables (e.g., CC, CFLAGS...), specify them as
1261VAR=VALUE. See below for descriptions of some of the useful variables.
1262
1263Defaults for the options are specified in brackets.
1264
1265Configuration:
1266 -h, --help display this help and exit
1267 --help=short display options specific to this package
1268 --help=recursive display the short help of all the included packages
1269 -V, --version display version information and exit
1270 -q, --quiet, --silent do not print \`checking...' messages
1271 --cache-file=FILE cache test results in FILE [disabled]
1272 -C, --config-cache alias for \`--cache-file=config.cache'
1273 -n, --no-create do not create output files
1274 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276Installation directories:
1277 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001278 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001279 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001280 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282By default, \`make install' will install all the files in
1283\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1284an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1285for instance \`--prefix=\$HOME'.
1286
1287For better control, use the options below.
1288
1289Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001290 --bindir=DIR user executables [EPREFIX/bin]
1291 --sbindir=DIR system admin executables [EPREFIX/sbin]
1292 --libexecdir=DIR program executables [EPREFIX/libexec]
1293 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1294 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1295 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1296 --libdir=DIR object code libraries [EPREFIX/lib]
1297 --includedir=DIR C header files [PREFIX/include]
1298 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1299 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1300 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1301 --infodir=DIR info documentation [DATAROOTDIR/info]
1302 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1303 --mandir=DIR man documentation [DATAROOTDIR/man]
1304 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1305 --htmldir=DIR html documentation [DOCDIR]
1306 --dvidir=DIR dvi documentation [DOCDIR]
1307 --pdfdir=DIR pdf documentation [DOCDIR]
1308 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001309_ACEOF
1310
1311 cat <<\_ACEOF
1312_ACEOF
1313fi
1314
1315if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001316 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001317 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001318 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 cat <<\_ACEOF
1320
1321Optional Features:
1322 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1323 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001324 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001325 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-framework[=INSTALLDIR]
1327 Build (MacOSX|Darwin) framework
1328 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001329 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1331 --enable-ipv6 Enable ipv6 (with ipv4) support
1332 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001333 --enable-big-digits[=BITS]
1334 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001335 --enable-unicode[=ucs[24]]
1336 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001337
1338Optional Packages:
1339 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1340 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001341 --with-universal-archs=ARCH
1342 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001343 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001344 --with-framework-name=FRAMEWORK
1345 specify an alternate name of the framework built
1346 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001348 --with-cxx-main=<compiler>
1349 compile main() and link python executable with C++
1350 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with-suffix=.exe set executable suffix
1352 --with-pydebug build with Py_DEBUG defined
1353 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001354 --with-system-expat build pyexpat module using an installed expat
1355 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001356 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001357 --with-dbmliborder=db1:db2:...
1358 order to check db backends for dbm. Valid value is a
1359 colon separated string with the backend names
1360 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001361 --with-signal-module disable/enable signal module
1362 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1363 --with(out)-threads[=DIRECTORY]
1364 disable/enable thread support
1365 --with(out)-thread[=DIRECTORY]
1366 deprecated; use --with(out)-threads
1367 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001368 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001369 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001370 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001371 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001372 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001373 --with-fpectl enable SIGFPE catching
1374 --with-libm=STRING math library
1375 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377Some influential environment variables:
1378 CC C compiler command
1379 CFLAGS C compiler flags
1380 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1381 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001382 LIBS libraries to pass to the linker, e.g. -l<library>
1383 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1384 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 CPP C preprocessor
1386
1387Use these variables to override the choices made by `configure' or to help
1388it to find libraries and programs with nonstandard names/locations.
1389
Georg Brandl464432d2009-05-20 18:24:08 +00001390Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001392ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001393fi
1394
1395if test "$ac_init_help" = "recursive"; then
1396 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001397 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001398 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_builddir=.
1400
Martin v. Löwiseba40652007-08-30 20:10:57 +00001401case "$ac_dir" in
1402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1403*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001404 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001406 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407 case $ac_top_builddir_sub in
1408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1410 esac ;;
1411esac
1412ac_abs_top_builddir=$ac_pwd
1413ac_abs_builddir=$ac_pwd$ac_dir_suffix
1414# for backward compatibility:
1415ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001420 ac_top_srcdir=$ac_top_builddir_sub
1421 ac_abs_top_srcdir=$ac_pwd ;;
1422 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424 ac_top_srcdir=$srcdir
1425 ac_abs_top_srcdir=$srcdir ;;
1426 *) # Relative name.
1427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1428 ac_top_srcdir=$ac_top_build_prefix$srcdir
1429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001430esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433 cd "$ac_dir" || { ac_status=$?; continue; }
1434 # Check for guested configure.
1435 if test -f "$ac_srcdir/configure.gnu"; then
1436 echo &&
1437 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1438 elif test -f "$ac_srcdir/configure"; then
1439 echo &&
1440 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001442 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001443 fi || ac_status=$?
1444 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 done
1446fi
1447
Martin v. Löwiseba40652007-08-30 20:10:57 +00001448test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001449if $ac_init_version; then
1450 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001452generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001453
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014552002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001456This configure script is free software; the Free Software Foundation
1457gives unlimited permission to copy, distribute and modify it.
1458_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001459 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001461cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001462This file contains any messages produced by compilers while
1463running configure, to aid debugging if configure makes a mistake.
1464
Martin v. Löwis174440b2008-10-03 08:59:41 +00001465It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001466generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468 $ $0 $@
1469
1470_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001471exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001472{
1473cat <<_ASUNAME
1474## --------- ##
1475## Platform. ##
1476## --------- ##
1477
1478hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1479uname -m = `(uname -m) 2>/dev/null || echo unknown`
1480uname -r = `(uname -r) 2>/dev/null || echo unknown`
1481uname -s = `(uname -s) 2>/dev/null || echo unknown`
1482uname -v = `(uname -v) 2>/dev/null || echo unknown`
1483
1484/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1485/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1486
1487/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1488/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1489/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001491/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1492/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1493/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1494
1495_ASUNAME
1496
1497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1498for as_dir in $PATH
1499do
1500 IFS=$as_save_IFS
1501 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001502 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001503done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506} >&5
1507
1508cat >&5 <<_ACEOF
1509
1510
1511## ----------- ##
1512## Core tests. ##
1513## ----------- ##
1514
1515_ACEOF
1516
1517
1518# Keep a trace of the command line.
1519# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001520# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001522# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001523ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001524ac_configure_args0=
1525ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001526ac_must_keep_next=false
1527for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001528do
Skip Montanaro6dead952003-09-25 14:50:04 +00001529 for ac_arg
1530 do
1531 case $ac_arg in
1532 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1533 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1534 | -silent | --silent | --silen | --sile | --sil)
1535 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001537 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 esac
1539 case $ac_pass in
1540 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1541 2)
1542 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1543 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001544 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001545 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001546 case $ac_arg in
1547 *=* | --config-cache | -C | -disable-* | --disable-* \
1548 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1549 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1550 | -with-* | --with-* | -without-* | --without-* | --x)
1551 case "$ac_configure_args0 " in
1552 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1553 esac
1554 ;;
1555 -* ) ac_must_keep_next=true ;;
1556 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001557 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001559 ;;
1560 esac
1561 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001562done
Skip Montanaro6dead952003-09-25 14:50:04 +00001563$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1564$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 +00001565
1566# When interrupted or exit'd, cleanup temporary files, and complete
1567# config.log. We remove comments because anyway the quotes in there
1568# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001569# WARNING: Use '\'' to represent an apostrophe within the trap.
1570# 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 +00001571trap 'exit_status=$?
1572 # Save into config.log some information that might help in debugging.
1573 {
1574 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001575
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 cat <<\_ASBOX
1577## ---------------- ##
1578## Cache variables. ##
1579## ---------------- ##
1580_ASBOX
1581 echo
1582 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583(
1584 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1585 eval ac_val=\$$ac_var
1586 case $ac_val in #(
1587 *${as_nl}*)
1588 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001589 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1590echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 esac
1592 case $ac_var in #(
1593 _ | IFS | as_nl) ;; #(
1594 *) $as_unset $ac_var ;;
1595 esac ;;
1596 esac
1597 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1600 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602 "s/'\''/'\''\\\\'\'''\''/g;
1603 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1604 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001605 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001607 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 esac |
1609 sort
1610)
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001612
1613 cat <<\_ASBOX
1614## ----------------- ##
1615## Output variables. ##
1616## ----------------- ##
1617_ASBOX
1618 echo
1619 for ac_var in $ac_subst_vars
1620 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001621 eval ac_val=\$$ac_var
1622 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001623 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001625 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 done | sort
1627 echo
1628
1629 if test -n "$ac_subst_files"; then
1630 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631## ------------------- ##
1632## File substitutions. ##
1633## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001634_ASBOX
1635 echo
1636 for ac_var in $ac_subst_files
1637 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001638 eval ac_val=\$$ac_var
1639 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001640 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001642 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001643 done | sort
1644 echo
1645 fi
1646
Martin v. Löwis11437992002-04-12 09:54:03 +00001647 if test -s confdefs.h; then
1648 cat <<\_ASBOX
1649## ----------- ##
1650## confdefs.h. ##
1651## ----------- ##
1652_ASBOX
1653 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 echo
1656 fi
1657 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001658 echo "$as_me: caught signal $ac_signal"
1659 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001660 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661 rm -f core *.core core.conftest.* &&
1662 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001665for ac_signal in 1 2 13 15; do
1666 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1667done
1668ac_signal=0
1669
1670# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001671rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001672
1673# Predefined preprocessor variables.
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_NAME "$PACKAGE_NAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_VERSION "$PACKAGE_VERSION"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_STRING "$PACKAGE_STRING"
1692_ACEOF
1693
1694
1695cat >>confdefs.h <<_ACEOF
1696#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1697_ACEOF
1698
1699
1700# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001701# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001702if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001705 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 set x "$ac_default_prefix/share/config.site" \
1708 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001710shift
1711for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001712do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001714 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1715echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001716 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717 . "$ac_site_file"
1718 fi
1719done
1720
1721if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 # Some versions of bash will fail to source /dev/null (special
1723 # files actually), so we avoid doing that.
1724 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001725 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1726echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001728 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1729 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 esac
1731 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001733 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1734echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 >$cache_file
1736fi
1737
1738# Check that the precious variables saved in the cache have kept the same
1739# value.
1740ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001741for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001742 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1743 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001744 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1745 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001746 case $ac_old_set,$ac_new_set in
1747 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1749echo "$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 +00001750 ac_cache_corrupted=: ;;
1751 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001752 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1753echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001754 ac_cache_corrupted=: ;;
1755 ,);;
1756 *)
1757 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001758 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1759echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1760 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1761echo "$as_me: former value: $ac_old_val" >&2;}
1762 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1763echo "$as_me: current value: $ac_new_val" >&2;}
1764 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001765 fi;;
1766 esac
1767 # Pass precious variables to config.status.
1768 if test "$ac_new_set" = set; then
1769 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001770 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001771 *) ac_arg=$ac_var=$ac_new_val ;;
1772 esac
1773 case " $ac_configure_args " in
1774 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1775 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1776 esac
1777 fi
1778done
1779if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001780 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1781echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1782 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1783echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001784 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785fi
1786
Martin v. Löwiseba40652007-08-30 20:10:57 +00001787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
Guido van Rossum7f43da71994-08-01 12:15:30 +00001811ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1815ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817
Michael W. Hudson54241132001-12-07 15:38:26 +00001818
Martin v. Löwiseba40652007-08-30 20:10:57 +00001819ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001820
1821
Martin v. Löwis11437992002-04-12 09:54:03 +00001822
Georg Brandlbcd64a32009-03-31 21:45:18 +00001823if test "$prefix" != "/"; then
1824 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1825fi
1826
1827
Martin v. Löwis11437992002-04-12 09:54:03 +00001828
1829
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001832# We don't use PACKAGE_ variables, and they cause conflicts
1833# with other autoconf-based packages that include Python.h
1834grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1835rm confdefs.h
1836mv confdefs.h.new confdefs.h
1837
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001838
Martin v. Löwis174440b2008-10-03 08:59:41 +00001839VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001840
Martin v. Löwis1142de32002-03-29 16:28:31 +00001841
1842SOVERSION=1.0
1843
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001844# The later defininition of _XOPEN_SOURCE disables certain features
1845# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1846
1847cat >>confdefs.h <<\_ACEOF
1848#define _GNU_SOURCE 1
1849_ACEOF
1850
1851
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001852# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1853# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1854# them.
1855
1856cat >>confdefs.h <<\_ACEOF
1857#define _NETBSD_SOURCE 1
1858_ACEOF
1859
1860
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001861# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1862# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1863# them.
1864
1865cat >>confdefs.h <<\_ACEOF
1866#define __BSD_VISIBLE 1
1867_ACEOF
1868
1869
Martin v. Löwisd6320502004-08-12 13:45:08 +00001870# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1871# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1872
1873cat >>confdefs.h <<\_ACEOF
1874#define _BSD_TYPES 1
1875_ACEOF
1876
1877
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001878# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1879# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1880# them.
1881
1882cat >>confdefs.h <<\_ACEOF
1883#define _DARWIN_C_SOURCE 1
1884_ACEOF
1885
1886
1887
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001888define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001889
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001890# Arguments passed to configure.
1891
1892CONFIG_ARGS="$ac_configure_args"
1893
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001894{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1895echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001896# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001897if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001898 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001899 case $enableval in
1900 yes)
1901 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001902 if test ! -d "${enableval}"
1903 then
1904 enableval=/
1905 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001906 ;;
1907 esac
1908 case $enableval in
1909 no)
1910 UNIVERSALSDK=
1911 enable_universalsdk=
1912 ;;
1913 *)
1914 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001915 if test ! -d "${UNIVERSALSDK}"
1916 then
1917 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1918echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1919 { (exit 1); exit 1; }; }
1920 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001921 ;;
1922 esac
1923
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001924
Ronald Oussoren988117f2006-04-29 11:31:35 +00001925else
1926
1927 UNIVERSALSDK=
1928 enable_universalsdk=
1929
Martin v. Löwiseba40652007-08-30 20:10:57 +00001930fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001931
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001932if test -n "${UNIVERSALSDK}"
1933then
1934 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1935echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1936else
1937 { echo "$as_me:$LINENO: result: no" >&5
1938echo "${ECHO_T}no" >&6; }
1939fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001940
Martin v. Löwiseba40652007-08-30 20:10:57 +00001941
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001942
1943
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001944UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001946{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1947echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001948
1949# Check whether --with-universal-archs was given.
1950if test "${with_universal_archs+set}" = set; then
1951 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001952 { echo "$as_me:$LINENO: result: $withval" >&5
1953echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001954 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001955 if test "${enable_universalsdk}" ; then
1956 :
1957 else
1958 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1959echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1960 { (exit 1); exit 1; }; }
1961 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001962
1963else
1964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001965 { echo "$as_me:$LINENO: result: 32-bit" >&5
1966echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001967
1968fi
1969
1970
1971
1972
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001973
1974# Check whether --with-framework-name was given.
1975if test "${with_framework_name+set}" = set; then
1976 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001977 if test "${enable_framework}"; then
1978 :
1979 else
1980 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1981echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1982 { (exit 1); exit 1; }; }
1983 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001984 PYTHONFRAMEWORK=${withval}
1985 PYTHONFRAMEWORKDIR=${withval}.framework
1986 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1987
1988else
1989
1990 PYTHONFRAMEWORK=Python
1991 PYTHONFRAMEWORKDIR=Python.framework
1992 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1993
1994fi
1995
Martin v. Löwiseba40652007-08-30 20:10:57 +00001996# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001997if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001998 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001999 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002000 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002001 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002002 esac
2003 case $enableval in
2004 no)
2005 PYTHONFRAMEWORK=
2006 PYTHONFRAMEWORKDIR=no-framework
2007 PYTHONFRAMEWORKPREFIX=
2008 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002009 FRAMEWORKINSTALLFIRST=
2010 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002011 FRAMEWORKALTINSTALLFIRST=
2012 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002013 if test "x${prefix}" = "xNONE"; then
2014 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2015 else
2016 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2017 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002018 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002019 ;;
2020 *)
2021 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002022 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002023 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002024 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002025 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2026 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002027
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002028 if test "x${prefix}" = "xNONE" ; then
2029 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2030 else
2031 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2032 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002033 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002034
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002035 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002036 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002037 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002038
Martin v. Löwiseba40652007-08-30 20:10:57 +00002039 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002040
Martin v. Löwiseba40652007-08-30 20:10:57 +00002041 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002042
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002043 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2044
2045 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2046
Jack Jansene578a632001-08-15 01:27:14 +00002047 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002048
Guido van Rossum563e7081996-09-10 18:20:48 +00002049else
Martin v. Löwis11437992002-04-12 09:54:03 +00002050
Jack Jansene578a632001-08-15 01:27:14 +00002051 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002052 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002053 PYTHONFRAMEWORKPREFIX=
2054 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002055 FRAMEWORKINSTALLFIRST=
2056 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002057 FRAMEWORKALTINSTALLFIRST=
2058 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002059 if test "x${prefix}" = "xNONE" ; then
2060 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2061 else
2062 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2063 fi
Jack Jansene578a632001-08-15 01:27:14 +00002064 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002066
Martin v. Löwiseba40652007-08-30 20:10:57 +00002067fi
2068
Michael W. Hudson54241132001-12-07 15:38:26 +00002069
2070
2071
2072
Jack Jansene578a632001-08-15 01:27:14 +00002073
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002074
2075
Ronald Oussoren5b787322006-06-06 19:50:24 +00002076
2077
2078
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002079
Jack Jansene578a632001-08-15 01:27:14 +00002080##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002081## AC_HELP_STRING(--with-dyld,
2082## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002083##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002084# Set name for machine-dependent library files
2085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002086{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2087echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002088if test -z "$MACHDEP"
2089then
Guido van Rossum563e7081996-09-10 18:20:48 +00002090 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002091 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002092 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002093 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002094 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002095 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002096 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002097 ac_md_system=`echo $ac_sys_system |
2098 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2099 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002100 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002101 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002102
Guido van Rossum07397971997-04-29 21:49:50 +00002103 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002104 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002105 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002106 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002107 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002108 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002109 esac
2110fi
Guido van Rossum91922671997-10-09 20:24:13 +00002111
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002112# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2113# disable features if it is defined, without any means to access these
2114# features as extensions. For these systems, we skip the definition of
2115# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2116# some feature, make sure there is no alternative way to access this
2117# feature. Also, when using wildcards, make sure you have verified the
2118# need for not defining _XOPEN_SOURCE on all systems matching the
2119# wildcard, and that the wildcard does not include future systems
2120# (which may remove their limitations).
2121case $ac_sys_system/$ac_sys_release in
2122 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2123 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002124 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002125 # In addition, Stefan Krah confirms that issue #1244610 exists through
2126 # OpenBSD 4.6, but is fixed in 4.7.
2127 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002128 define_xopen_source=no
2129 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2130 # also defined. This can be overridden by defining _BSD_SOURCE
2131 # As this has a different meaning on Linux, only define it on OpenBSD
2132
2133cat >>confdefs.h <<\_ACEOF
2134#define _BSD_SOURCE 1
2135_ACEOF
2136
2137 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002138 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002139 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2140 # also defined. This can be overridden by defining _BSD_SOURCE
2141 # As this has a different meaning on Linux, only define it on OpenBSD
2142
2143cat >>confdefs.h <<\_ACEOF
2144#define _BSD_SOURCE 1
2145_ACEOF
2146
2147 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002148 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2149 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2150 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002151 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002152 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002153 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2154 # of union __?sigval. Reported by Stuart Bishop.
2155 SunOS/5.6)
2156 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002157 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2158 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002159 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002160 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002161 define_xopen_source=no;;
2162 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002163 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002164 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002165 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002166 # On FreeBSD 4, the math functions C89 does not cover are never defined
2167 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2168 FreeBSD/4.*)
2169 define_xopen_source=no;;
2170 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2171 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2172 # identifies itself as Darwin/7.*
2173 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2174 # disables platform specific features beyond repair.
2175 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2176 # has no effect, don't bother defining them
2177 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002178 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002179 Darwin/1[0-9].*)
2180 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002181 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2182 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2183 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002184 AIX/4)
2185 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002186 AIX/5)
2187 if test `uname -r` -eq 1; then
2188 define_xopen_source=no
2189 fi
2190 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002191 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2192 # defining NI_NUMERICHOST.
2193 QNX/6.3.2)
2194 define_xopen_source=no
2195 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002196
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002197esac
2198
2199if test $define_xopen_source = yes
2200then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002201 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2202 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002203 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2204 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002205 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002206 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002207
2208cat >>confdefs.h <<\_ACEOF
2209#define _XOPEN_SOURCE 500
2210_ACEOF
2211
2212 ;;
2213 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002214
2215cat >>confdefs.h <<\_ACEOF
2216#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002217_ACEOF
2218
Skip Montanarof0d5f792004-08-15 14:08:23 +00002219 ;;
2220 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002221
2222 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2223 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2224 # several APIs are not declared. Since this is also needed in some
2225 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002226 # except for Solaris 10, where it must not be defined,
2227 # as it implies XPG4.2
2228 case $ac_sys_system/$ac_sys_release in
2229 SunOS/5.10)
2230 ;;
2231 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002232
2233cat >>confdefs.h <<\_ACEOF
2234#define _XOPEN_SOURCE_EXTENDED 1
2235_ACEOF
2236
Martin v. Löwis7dece662005-11-26 11:38:24 +00002237 ;;
2238 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002239
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002240
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002241cat >>confdefs.h <<\_ACEOF
2242#define _POSIX_C_SOURCE 200112L
2243_ACEOF
2244
2245
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002246fi
2247
Guido van Rossum91922671997-10-09 20:24:13 +00002248#
2249# SGI compilers allow the specification of the both the ABI and the
2250# ISA on the command line. Depending on the values of these switches,
2251# different and often incompatable code will be generated.
2252#
2253# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2254# thus supply support for various ABI/ISA combinations. The MACHDEP
2255# variable is also adjusted.
2256#
2257
2258if test ! -z "$SGI_ABI"
2259then
2260 CC="cc $SGI_ABI"
2261 LDFLAGS="$SGI_ABI $LDFLAGS"
2262 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2263fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2265echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002266
Jack Jansen83f898c2002-12-30 22:23:40 +00002267# And add extra plat-mac for darwin
2268
Jack Jansen7b59b422003-03-17 15:44:10 +00002269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002270{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2271echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002272if test -z "$EXTRAPLATDIR"
2273then
2274 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002275 darwin)
2276 EXTRAPLATDIR="\$(PLATMACDIRS)"
2277 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2278 ;;
2279 *)
2280 EXTRAPLATDIR=""
2281 EXTRAMACHDEPPATH=""
2282 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002283 esac
2284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002285{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2286echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002287
Jack Jansen6b08a402004-06-03 12:41:45 +00002288# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2289# it may influence the way we can build extensions, so distutils
2290# needs to check it
2291
Ronald Oussoren988117f2006-04-29 11:31:35 +00002292
Jack Jansen6b08a402004-06-03 12:41:45 +00002293CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002294EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002296{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2297echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002298ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002299{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2300echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002301
Guido van Rossum627b2d71993-12-24 10:39:16 +00002302# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002303
2304# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2305# for debug/optimization stuff. BASECFLAGS is for flags that are required
2306# just to get things to compile and link. Users are free to override OPT
2307# when running configure or make. The build should not break if they do.
2308# BASECFLAGS should generally not be messed with, however.
2309
2310# XXX shouldn't some/most/all of this code be merged with the stuff later
2311# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2313echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002314
Martin v. Löwiseba40652007-08-30 20:10:57 +00002315# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002316if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002317 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002318 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002319 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002320 without_gcc=yes;;
2321 yes) CC=gcc
2322 without_gcc=no;;
2323 *) CC=$withval
2324 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002325 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002326else
Martin v. Löwis11437992002-04-12 09:54:03 +00002327
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002328 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002329 AIX*) CC=cc_r
2330 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002331 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002332 case $BE_HOST_CPU in
2333 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002334 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002335 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002336 BASECFLAGS="$BASECFLAGS -export pragma"
2337 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002338 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002339 ;;
2340 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002341 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002342 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002343 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002344 ;;
2345 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002346 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2347echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002348 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002349 ;;
2350 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002351 AR="\$(srcdir)/Modules/ar_beos"
2352 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002353 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002354 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002355 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356fi
2357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002358{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2359echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002360
Guido van Rossum8b131c51995-03-09 14:10:13 +00002361# If the user switches compilers, we can't believe the cache
2362if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2363then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002365(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002366echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002367(it is also a good idea to do 'make clean' before compiling)" >&2;}
2368 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002369fi
2370
Victor Stinner6cbf90f2010-03-25 00:21:53 +00002371save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372ac_ext=c
2373ac_cpp='$CPP $CPPFLAGS'
2374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2376ac_compiler_gnu=$ac_cv_c_compiler_gnu
2377if test -n "$ac_tool_prefix"; then
2378 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2379set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002382if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002384else
2385 if test -n "$CC"; then
2386 ac_cv_prog_CC="$CC" # Let the user override the test.
2387else
Martin v. Löwis11437992002-04-12 09:54:03 +00002388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2389for as_dir in $PATH
2390do
2391 IFS=$as_save_IFS
2392 test -z "$as_dir" && as_dir=.
2393 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 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 +00002395 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Jack Jansendd19cf82001-12-06 22:36:17 +00002403fi
2404fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002405CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002406if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002407 { echo "$as_me:$LINENO: result: $CC" >&5
2408echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002410 { echo "$as_me:$LINENO: result: no" >&5
2411echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412fi
2413
Martin v. Löwiseba40652007-08-30 20:10:57 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415fi
2416if test -z "$ac_cv_prog_CC"; then
2417 ac_ct_CC=$CC
2418 # Extract the first word of "gcc", so it can be a program name with args.
2419set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002424else
2425 if test -n "$ac_ct_CC"; then
2426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2427else
2428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434 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 +00002435 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 break 2
2438 fi
2439done
2440done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443fi
2444fi
2445ac_ct_CC=$ac_cv_prog_ac_ct_CC
2446if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2448echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002450 { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
2453
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454 if test "x$ac_ct_CC" = x; then
2455 CC=""
2456 else
2457 case $cross_compiling:$ac_tool_warned in
2458yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002459{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2460whose name does not start with the host triplet. If you think this
2461configuration is useful to you, please write to autoconf@gnu.org." >&5
2462echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2463whose name does not start with the host triplet. If you think this
2464configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465ac_tool_warned=yes ;;
2466esac
2467 CC=$ac_ct_CC
2468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002469else
2470 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002471fi
2472
Jack Jansendd19cf82001-12-06 22:36:17 +00002473if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 if test -n "$ac_tool_prefix"; then
2475 # 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 +00002476set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002477{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002480 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002481else
2482 if test -n "$CC"; then
2483 ac_cv_prog_CC="$CC" # Let the user override the test.
2484else
Martin v. Löwis11437992002-04-12 09:54:03 +00002485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2486for as_dir in $PATH
2487do
2488 IFS=$as_save_IFS
2489 test -z "$as_dir" && as_dir=.
2490 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 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 +00002492 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002493 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002494 break 2
2495 fi
2496done
2497done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002498IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002499
2500fi
2501fi
2502CC=$ac_cv_prog_CC
2503if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002504 { echo "$as_me:$LINENO: result: $CC" >&5
2505echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002507 { echo "$as_me:$LINENO: result: no" >&5
2508echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509fi
2510
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002513fi
2514if test -z "$CC"; then
2515 # Extract the first word of "cc", so it can be a program name with args.
2516set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2518echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002519if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002520 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002521else
2522 if test -n "$CC"; then
2523 ac_cv_prog_CC="$CC" # Let the user override the test.
2524else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002525 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 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 +00002533 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2534 ac_prog_rejected=yes
2535 continue
2536 fi
2537 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002538 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 break 2
2540 fi
2541done
2542done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002545if test $ac_prog_rejected = yes; then
2546 # We found a bogon in the path, so make sure we never use it.
2547 set dummy $ac_cv_prog_CC
2548 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002550 # We chose a different compiler from the bogus one.
2551 # However, it has the same basename, so the bogon will be chosen
2552 # first if we set CC to just the basename; use the full file name.
2553 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002555 fi
2556fi
2557fi
2558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002559CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002560if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002561 { echo "$as_me:$LINENO: result: $CC" >&5
2562echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002564 { echo "$as_me:$LINENO: result: no" >&5
2565echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002566fi
2567
Martin v. Löwiseba40652007-08-30 20:10:57 +00002568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569fi
2570if test -z "$CC"; then
2571 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 do
2574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2575set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002578if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002580else
2581 if test -n "$CC"; then
2582 ac_cv_prog_CC="$CC" # Let the user override the test.
2583else
Martin v. Löwis11437992002-04-12 09:54:03 +00002584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587 IFS=$as_save_IFS
2588 test -z "$as_dir" && as_dir=.
2589 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 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 +00002591 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002592 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002598
2599fi
2600fi
2601CC=$ac_cv_prog_CC
2602if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: $CC" >&5
2604echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002606 { echo "$as_me:$LINENO: result: no" >&5
2607echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002608fi
2609
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 test -n "$CC" && break
2612 done
2613fi
2614if test -z "$CC"; then
2615 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002617do
2618 # Extract the first word of "$ac_prog", so it can be a program name with args.
2619set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002620{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2621echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002622if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002624else
2625 if test -n "$ac_ct_CC"; then
2626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2627else
2628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2629for as_dir in $PATH
2630do
2631 IFS=$as_save_IFS
2632 test -z "$as_dir" && as_dir=.
2633 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002634 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 +00002635 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002636 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 break 2
2638 fi
2639done
2640done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643fi
2644fi
2645ac_ct_CC=$ac_cv_prog_ac_ct_CC
2646if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2648echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002650 { echo "$as_me:$LINENO: result: no" >&5
2651echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002652fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002653
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 test -n "$ac_ct_CC" && break
2656done
Michael W. Hudson54241132001-12-07 15:38:26 +00002657
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658 if test "x$ac_ct_CC" = x; then
2659 CC=""
2660 else
2661 case $cross_compiling:$ac_tool_warned in
2662yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002663{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2664whose name does not start with the host triplet. If you think this
2665configuration is useful to you, please write to autoconf@gnu.org." >&5
2666echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2667whose name does not start with the host triplet. If you think this
2668configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002669ac_tool_warned=yes ;;
2670esac
2671 CC=$ac_ct_CC
2672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002673fi
2674
2675fi
2676
2677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002679See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002681See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
2684# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002685echo "$as_me:$LINENO: checking for C compiler version" >&5
2686ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687{ (ac_try="$ac_compiler --version >&5"
2688case "(($ac_try" in
2689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690 *) ac_try_echo=$ac_try;;
2691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697{ (ac_try="$ac_compiler -v >&5"
2698case "(($ac_try" in
2699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700 *) ac_try_echo=$ac_try;;
2701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002707{ (ac_try="$ac_compiler -V >&5"
2708case "(($ac_try" in
2709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710 *) ac_try_echo=$ac_try;;
2711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 (exit $ac_status); }
2717
2718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002719/* confdefs.h. */
2720_ACEOF
2721cat confdefs.h >>conftest.$ac_ext
2722cat >>conftest.$ac_ext <<_ACEOF
2723/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002724
Martin v. Löwis11437992002-04-12 09:54:03 +00002725int
2726main ()
2727{
2728
2729 ;
2730 return 0;
2731}
2732_ACEOF
2733ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002734ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002735# Try to create an executable without -o first, disregard a.out.
2736# It will help us diagnose broken compilers, and finding out an intuition
2737# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002738{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2739echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2740ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2741#
2742# List of possible output files, starting from the most likely.
2743# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2744# only as a last resort. b.out is created by i960 compilers.
2745ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2746#
2747# The IRIX 6 linker writes into existing files which may not be
2748# executable, retaining their permissions. Remove them first so a
2749# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002750ac_rmfiles=
2751for ac_file in $ac_files
2752do
2753 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002754 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002755 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2756 esac
2757done
2758rm -f $ac_rmfiles
2759
2760if { (ac_try="$ac_link_default"
2761case "(($ac_try" in
2762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2763 *) ac_try_echo=$ac_try;;
2764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2771# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2772# in a Makefile. We should not override ac_cv_exeext if it was cached,
2773# so that the user can short-circuit this test for compilers unknown to
2774# Autoconf.
2775for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002776do
2777 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002780 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002781 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002782 # We found the default executable, but exeext='' is most
2783 # certainly right.
2784 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002785 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2787 then :; else
2788 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2789 fi
2790 # We set ac_cv_exeext here because the later test for it is not
2791 # safe: cross compilers may not add the suffix if given an `-o'
2792 # argument, so we may need to know it at that point already.
2793 # Even if this section looks crufty: it has the advantage of
2794 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002795 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002796 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002797 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 esac
2799done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800test "$ac_cv_exeext" = no && ac_cv_exeext=
2801
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803 ac_file=''
2804fi
2805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: $ac_file" >&5
2807echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002810sed 's/^/| /' conftest.$ac_ext >&5
2811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002817fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002818
Martin v. Löwis11437992002-04-12 09:54:03 +00002819ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002820
Martin v. Löwiseba40652007-08-30 20:10:57 +00002821# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002822# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2824echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002825# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2826# If not cross compiling, check that we can run a simple program.
2827if test "$cross_compiling" != yes; then
2828 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002829 { (case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 (exit $ac_status); }; }; then
2838 cross_compiling=no
2839 else
2840 if test "$cross_compiling" = maybe; then
2841 cross_compiling=yes
2842 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002843 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002844If you meant to cross compile, use \`--host'.
2845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002847If you meant to cross compile, use \`--host'.
2848See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002849 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 fi
2851 fi
2852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853{ echo "$as_me:$LINENO: result: yes" >&5
2854echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002857ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002858# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002859# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2861echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2862{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2863echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002865{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2866echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002867if { (ac_try="$ac_link"
2868case "(($ac_try" in
2869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2870 *) ac_try_echo=$ac_try;;
2871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002873 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 (exit $ac_status); }; then
2877 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2878# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2879# work properly (i.e., refer to `conftest.exe'), while it won't with
2880# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002881for ac_file in conftest.exe conftest conftest.*; do
2882 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002886 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 * ) break;;
2888 esac
2889done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002892See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002894See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002895 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002896fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002897
Martin v. Löwis11437992002-04-12 09:54:03 +00002898rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002899{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2900echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002901
2902rm -f conftest.$ac_ext
2903EXEEXT=$ac_cv_exeext
2904ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2906echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002908 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002909else
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002911/* confdefs.h. */
2912_ACEOF
2913cat confdefs.h >>conftest.$ac_ext
2914cat >>conftest.$ac_ext <<_ACEOF
2915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917int
2918main ()
2919{
2920
2921 ;
2922 return 0;
2923}
2924_ACEOF
2925rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002926if { (ac_try="$ac_compile"
2927case "(($ac_try" in
2928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2929 *) ac_try_echo=$ac_try;;
2930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002932 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002936 for ac_file in conftest.o conftest.obj conftest.*; do
2937 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2941 break;;
2942 esac
2943done
2944else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002946sed 's/^/| /' conftest.$ac_ext >&5
2947
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002948{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002949See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002951See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002952 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002953fi
2954
2955rm -f conftest.$ac_cv_objext conftest.$ac_ext
2956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2958echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002959OBJEXT=$ac_cv_objext
2960ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002961{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2962echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002963if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002964 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002965else
2966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973int
2974main ()
2975{
2976#ifndef __GNUC__
2977 choke me
2978#endif
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002985if { (ac_try="$ac_compile"
2986case "(($ac_try" in
2987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988 *) ac_try_echo=$ac_try;;
2989esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002993 grep -v '^ *+' conftest.er1 >conftest.err
2994 rm -f conftest.er1
2995 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997 (exit $ac_status); } && {
2998 test -z "$ac_c_werror_flag" ||
2999 test ! -s conftest.err
3000 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 ac_compiler_gnu=yes
3002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003004sed 's/^/| /' conftest.$ac_ext >&5
3005
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008
3009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003010ac_cv_c_compiler_gnu=$ac_compiler_gnu
3011
3012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003013{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3014echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3015GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003016ac_test_CFLAGS=${CFLAGS+set}
3017ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003018{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3019echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003020if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003022else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003023 ac_save_c_werror_flag=$ac_c_werror_flag
3024 ac_c_werror_flag=yes
3025 ac_cv_prog_cc_g=no
3026 CFLAGS="-g"
3027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003028/* confdefs.h. */
3029_ACEOF
3030cat confdefs.h >>conftest.$ac_ext
3031cat >>conftest.$ac_ext <<_ACEOF
3032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003033
Martin v. Löwis11437992002-04-12 09:54:03 +00003034int
3035main ()
3036{
3037
3038 ;
3039 return 0;
3040}
3041_ACEOF
3042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003043if { (ac_try="$ac_compile"
3044case "(($ac_try" in
3045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3046 *) ac_try_echo=$ac_try;;
3047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003051 grep -v '^ *+' conftest.er1 >conftest.err
3052 rm -f conftest.er1
3053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003055 (exit $ac_status); } && {
3056 test -z "$ac_c_werror_flag" ||
3057 test ! -s conftest.err
3058 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003059 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003062sed 's/^/| /' conftest.$ac_ext >&5
3063
Martin v. Löwiseba40652007-08-30 20:10:57 +00003064 CFLAGS=""
3065 cat >conftest.$ac_ext <<_ACEOF
3066/* confdefs.h. */
3067_ACEOF
3068cat confdefs.h >>conftest.$ac_ext
3069cat >>conftest.$ac_ext <<_ACEOF
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080rm -f conftest.$ac_objext
3081if { (ac_try="$ac_compile"
3082case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003087 (eval "$ac_compile") 2>conftest.er1
3088 ac_status=$?
3089 grep -v '^ *+' conftest.er1 >conftest.err
3090 rm -f conftest.er1
3091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (exit $ac_status); } && {
3094 test -z "$ac_c_werror_flag" ||
3095 test ! -s conftest.err
3096 } && test -s conftest.$ac_objext; then
3097 :
3098else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003099 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100sed 's/^/| /' conftest.$ac_ext >&5
3101
3102 ac_c_werror_flag=$ac_save_c_werror_flag
3103 CFLAGS="-g"
3104 cat >conftest.$ac_ext <<_ACEOF
3105/* confdefs.h. */
3106_ACEOF
3107cat confdefs.h >>conftest.$ac_ext
3108cat >>conftest.$ac_ext <<_ACEOF
3109/* end confdefs.h. */
3110
3111int
3112main ()
3113{
3114
3115 ;
3116 return 0;
3117}
3118_ACEOF
3119rm -f conftest.$ac_objext
3120if { (ac_try="$ac_compile"
3121case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126 (eval "$ac_compile") 2>conftest.er1
3127 ac_status=$?
3128 grep -v '^ *+' conftest.er1 >conftest.err
3129 rm -f conftest.er1
3130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 (exit $ac_status); } && {
3133 test -z "$ac_c_werror_flag" ||
3134 test ! -s conftest.err
3135 } && test -s conftest.$ac_objext; then
3136 ac_cv_prog_cc_g=yes
3137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003138 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139sed 's/^/| /' conftest.$ac_ext >&5
3140
3141
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003143
3144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003146
3147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3148fi
3149
3150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3151 ac_c_werror_flag=$ac_save_c_werror_flag
3152fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003153{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3154echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003155if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003156 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003157elif test $ac_cv_prog_cc_g = yes; then
3158 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003159 CFLAGS="-g -O2"
3160 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003161 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003162 fi
3163else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003164 if test "$GCC" = yes; then
3165 CFLAGS="-O2"
3166 else
3167 CFLAGS=
3168 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003169fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003170{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3171echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003173 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003174else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003176ac_save_CC=$CC
3177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003178/* confdefs.h. */
3179_ACEOF
3180cat confdefs.h >>conftest.$ac_ext
3181cat >>conftest.$ac_ext <<_ACEOF
3182/* end confdefs.h. */
3183#include <stdarg.h>
3184#include <stdio.h>
3185#include <sys/types.h>
3186#include <sys/stat.h>
3187/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3188struct buf { int x; };
3189FILE * (*rcsopen) (struct buf *, struct stat *, int);
3190static char *e (p, i)
3191 char **p;
3192 int i;
3193{
3194 return p[i];
3195}
3196static char *f (char * (*g) (char **, int), char **p, ...)
3197{
3198 char *s;
3199 va_list v;
3200 va_start (v,p);
3201 s = g (p, va_arg (v,int));
3202 va_end (v);
3203 return s;
3204}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003205
3206/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3207 function prototypes and stuff, but not '\xHH' hex character constants.
3208 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003210 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3211 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003213int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3214
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3216 inside strings and character constants. */
3217#define FOO(x) 'x'
3218int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3219
Skip Montanaro6dead952003-09-25 14:50:04 +00003220int test (int i, double x);
3221struct s1 {int (*f) (int a);};
3222struct s2 {int (*f) (double a);};
3223int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3224int argc;
3225char **argv;
3226int
3227main ()
3228{
3229return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3230 ;
3231 return 0;
3232}
3233_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003234for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3235 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003236do
3237 CC="$ac_save_CC $ac_arg"
3238 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239if { (ac_try="$ac_compile"
3240case "(($ac_try" in
3241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3242 *) ac_try_echo=$ac_try;;
3243esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003245 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003247 grep -v '^ *+' conftest.er1 >conftest.err
3248 rm -f conftest.er1
3249 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251 (exit $ac_status); } && {
3252 test -z "$ac_c_werror_flag" ||
3253 test ! -s conftest.err
3254 } && test -s conftest.$ac_objext; then
3255 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003256else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003258sed 's/^/| /' conftest.$ac_ext >&5
3259
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260
Skip Montanaro6dead952003-09-25 14:50:04 +00003261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262
3263rm -f core conftest.err conftest.$ac_objext
3264 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003265done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003267CC=$ac_save_CC
3268
3269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003270# AC_CACHE_VAL
3271case "x$ac_cv_prog_cc_c89" in
3272 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273 { echo "$as_me:$LINENO: result: none needed" >&5
3274echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003276 { echo "$as_me:$LINENO: result: unsupported" >&5
3277echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003278 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003280 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3281echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003282esac
3283
Skip Montanaro6dead952003-09-25 14:50:04 +00003284
Martin v. Löwis11437992002-04-12 09:54:03 +00003285ac_ext=c
3286ac_cpp='$CPP $CPPFLAGS'
3287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3289ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290
Victor Stinner6cbf90f2010-03-25 00:21:53 +00003291CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003292
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003293
3294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003295{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3296echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003297
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003299if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302 case $withval in
3303 no) with_cxx_main=no
3304 MAINCC='$(CC)';;
3305 yes) with_cxx_main=yes
3306 MAINCC='$(CXX)';;
3307 *) with_cxx_main=yes
3308 MAINCC=$withval
3309 if test -z "$CXX"
3310 then
3311 CXX=$withval
3312 fi;;
3313 esac
3314else
3315
3316 with_cxx_main=no
3317 MAINCC='$(CC)'
3318
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319fi
3320
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3322echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003323
3324preset_cxx="$CXX"
3325if test -z "$CXX"
3326then
3327 case "$CC" in
3328 gcc) # Extract the first word of "g++", so it can be a program name with args.
3329set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003332if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003333 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334else
3335 case $CXX in
3336 [\\/]* | ?:[\\/]*)
3337 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3338 ;;
3339 *)
3340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in notfound
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
3345 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003347 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003348 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003349 break 2
3350 fi
3351done
3352done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354
3355 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3356 ;;
3357esac
3358fi
3359CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003361 { echo "$as_me:$LINENO: result: $CXX" >&5
3362echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003364 { echo "$as_me:$LINENO: result: no" >&5
3365echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003367
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003368 ;;
3369 cc) # Extract the first word of "c++", so it can be a program name with args.
3370set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003373if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375else
3376 case $CXX in
3377 [\\/]* | ?:[\\/]*)
3378 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3379 ;;
3380 *)
3381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382for as_dir in notfound
3383do
3384 IFS=$as_save_IFS
3385 test -z "$as_dir" && as_dir=.
3386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003387 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003388 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390 break 2
3391 fi
3392done
3393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395
3396 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3397 ;;
3398esac
3399fi
3400CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003401if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 { echo "$as_me:$LINENO: result: $CXX" >&5
3403echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003404else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: no" >&5
3406echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 ;;
3410 esac
3411 if test "$CXX" = "notfound"
3412 then
3413 CXX=""
3414 fi
3415fi
3416if test -z "$CXX"
3417then
3418 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3419do
3420 # Extract the first word of "$ac_prog", so it can be a program name with args.
3421set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003422{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3423echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426else
3427 if test -n "$CXX"; then
3428 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3429else
3430as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431for as_dir in $PATH
3432do
3433 IFS=$as_save_IFS
3434 test -z "$as_dir" && as_dir=.
3435 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003436 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003437 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003438 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439 break 2
3440 fi
3441done
3442done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003444
3445fi
3446fi
3447CXX=$ac_cv_prog_CXX
3448if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 { echo "$as_me:$LINENO: result: $CXX" >&5
3450echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003452 { echo "$as_me:$LINENO: result: no" >&5
3453echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454fi
3455
Martin v. Löwiseba40652007-08-30 20:10:57 +00003456
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003457 test -n "$CXX" && break
3458done
3459test -n "$CXX" || CXX="notfound"
3460
3461 if test "$CXX" = "notfound"
3462 then
3463 CXX=""
3464 fi
3465fi
3466if test "$preset_cxx" != "$CXX"
3467then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003468 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003469
3470 By default, distutils will build C++ extension modules with \"$CXX\".
3471 If this is not intended, then set CXX on the configure command line.
3472 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003473echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003474
3475 By default, distutils will build C++ extension modules with \"$CXX\".
3476 If this is not intended, then set CXX on the configure command line.
3477 " >&2;}
3478fi
3479
3480
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003481# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
3483ac_ext=c
3484ac_cpp='$CPP $CPPFLAGS'
3485ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3486ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3487ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003488{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3489echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003490# On Suns, sometimes $CPP names a directory.
3491if test -n "$CPP" && test -d "$CPP"; then
3492 CPP=
3493fi
3494if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003496 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003497else
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 # Double quotes because CPP needs to be expanded
3499 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3500 do
3501 ac_preproc_ok=false
3502for ac_c_preproc_warn_flag in '' yes
3503do
3504 # Use a header file that comes with gcc, so configuring glibc
3505 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3507 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003508 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 # not just through cpp. "Syntax error" is here to catch this case.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#ifdef __STDC__
3517# include <limits.h>
3518#else
3519# include <assert.h>
3520#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003521 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003522_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523if { (ac_try="$ac_cpp conftest.$ac_ext"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003531 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 rm -f conftest.er1
3533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003535 (exit $ac_status); } >/dev/null && {
3536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003539 :
3540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: fails on valid input.
3545continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003549
Martin v. Löwiseba40652007-08-30 20:10:57 +00003550 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # can be detected and how.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003558#include <ac_nonexistent.h>
3559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 # Broken: success on invalid input.
3577continue
3578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Passes both tests.
3583ac_preproc_ok=:
3584break
3585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
3589done
3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3591rm -f conftest.err conftest.$ac_ext
3592if $ac_preproc_ok; then
3593 break
3594fi
3595
3596 done
3597 ac_cv_prog_CPP=$CPP
3598
3599fi
3600 CPP=$ac_cv_prog_CPP
3601else
3602 ac_cv_prog_CPP=$CPP
3603fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003604{ echo "$as_me:$LINENO: result: $CPP" >&5
3605echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606ac_preproc_ok=false
3607for ac_c_preproc_warn_flag in '' yes
3608do
3609 # Use a header file that comes with gcc, so configuring glibc
3610 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003611 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3612 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 # On the NeXT, cc -E runs the code through the compiler's parser,
3614 # not just through cpp. "Syntax error" is here to catch this case.
3615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003616/* confdefs.h. */
3617_ACEOF
3618cat confdefs.h >>conftest.$ac_ext
3619cat >>conftest.$ac_ext <<_ACEOF
3620/* end confdefs.h. */
3621#ifdef __STDC__
3622# include <limits.h>
3623#else
3624# include <assert.h>
3625#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003628if { (ac_try="$ac_cpp conftest.$ac_ext"
3629case "(($ac_try" in
3630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3631 *) ac_try_echo=$ac_try;;
3632esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003636 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 rm -f conftest.er1
3638 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003640 (exit $ac_status); } >/dev/null && {
3641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3642 test ! -s conftest.err
3643 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 :
3645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003647sed 's/^/| /' conftest.$ac_ext >&5
3648
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 # Broken: fails on valid input.
3650continue
3651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653rm -f conftest.err conftest.$ac_ext
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 # can be detected and how.
3657 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003658/* confdefs.h. */
3659_ACEOF
3660cat confdefs.h >>conftest.$ac_ext
3661cat >>conftest.$ac_ext <<_ACEOF
3662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003663#include <ac_nonexistent.h>
3664_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665if { (ac_try="$ac_cpp conftest.$ac_ext"
3666case "(($ac_try" in
3667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3668 *) ac_try_echo=$ac_try;;
3669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003673 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 rm -f conftest.er1
3675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 (exit $ac_status); } >/dev/null && {
3678 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3679 test ! -s conftest.err
3680 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 # Broken: success on invalid input.
3682continue
3683else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003685sed 's/^/| /' conftest.$ac_ext >&5
3686
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 # Passes both tests.
3688ac_preproc_ok=:
3689break
3690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692rm -f conftest.err conftest.$ac_ext
3693
3694done
3695# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3696rm -f conftest.err conftest.$ac_ext
3697if $ac_preproc_ok; then
3698 :
3699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003700 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003701See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003702echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003703See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003704 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
3707ac_ext=c
3708ac_cpp='$CPP $CPPFLAGS'
3709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3711ac_compiler_gnu=$ac_cv_c_compiler_gnu
3712
3713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3715echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003717 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003719 # Extract the first word of "grep ggrep" to use in msg output
3720if test -z "$GREP"; then
3721set dummy grep ggrep; ac_prog_name=$2
3722if test "${ac_cv_path_GREP+set}" = set; then
3723 echo $ECHO_N "(cached) $ECHO_C" >&6
3724else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003726# Loop through the user's path and test for each of PROGNAME-LIST
3727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003728for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
3732 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
3734 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3735 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3736 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737 # Check for GNU $ac_path_GREP
3738case `"$ac_path_GREP" --version 2>&1` in
3739*GNU*)
3740 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3741*)
3742 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003743 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744 while :
3745 do
3746 cat "conftest.in" "conftest.in" >"conftest.tmp"
3747 mv "conftest.tmp" "conftest.in"
3748 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3751 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3752 ac_count=`expr $ac_count + 1`
3753 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3754 # Best one so far, save it but keep looking for a better one
3755 ac_cv_path_GREP="$ac_path_GREP"
3756 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003757 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003758 # 10*(2^10) chars as input seems more than enough
3759 test $ac_count -gt 10 && break
3760 done
3761 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3762esac
3763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003764
3765 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766 done
3767done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768
3769done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003770IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003771
3772
3773fi
3774
3775GREP="$ac_cv_path_GREP"
3776if test -z "$GREP"; then
3777 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3778echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003780fi
3781
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782else
3783 ac_cv_path_GREP=$GREP
3784fi
3785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003786
Martin v. Löwiseba40652007-08-30 20:10:57 +00003787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003788{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3789echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790 GREP="$ac_cv_path_GREP"
3791
3792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793{ echo "$as_me:$LINENO: checking for egrep" >&5
3794echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003797else
3798 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3799 then ac_cv_path_EGREP="$GREP -E"
3800 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003801 # Extract the first word of "egrep" to use in msg output
3802if test -z "$EGREP"; then
3803set dummy egrep; ac_prog_name=$2
3804if test "${ac_cv_path_EGREP+set}" = set; then
3805 echo $ECHO_N "(cached) $ECHO_C" >&6
3806else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003807 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808# Loop through the user's path and test for each of PROGNAME-LIST
3809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3811do
3812 IFS=$as_save_IFS
3813 test -z "$as_dir" && as_dir=.
3814 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815 for ac_exec_ext in '' $ac_executable_extensions; do
3816 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3817 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3818 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003819 # Check for GNU $ac_path_EGREP
3820case `"$ac_path_EGREP" --version 2>&1` in
3821*GNU*)
3822 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3823*)
3824 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003825 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826 while :
3827 do
3828 cat "conftest.in" "conftest.in" >"conftest.tmp"
3829 mv "conftest.tmp" "conftest.in"
3830 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003831 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3833 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3834 ac_count=`expr $ac_count + 1`
3835 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3836 # Best one so far, save it but keep looking for a better one
3837 ac_cv_path_EGREP="$ac_path_EGREP"
3838 ac_path_EGREP_max=$ac_count
3839 fi
3840 # 10*(2^10) chars as input seems more than enough
3841 test $ac_count -gt 10 && break
3842 done
3843 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3844esac
3845
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003846
3847 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848 done
3849done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850
3851done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003853
3854
3855fi
3856
3857EGREP="$ac_cv_path_EGREP"
3858if test -z "$EGREP"; then
3859 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3860echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003862fi
3863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864else
3865 ac_cv_path_EGREP=$EGREP
3866fi
3867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003868
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869 fi
3870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003871{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3872echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003873 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003874
3875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003876
3877{ echo "$as_me:$LINENO: checking for AIX" >&5
3878echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3879cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003880/* confdefs.h. */
3881_ACEOF
3882cat confdefs.h >>conftest.$ac_ext
3883cat >>conftest.$ac_ext <<_ACEOF
3884/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003885#ifdef _AIX
3886 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003887#endif
3888
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003889_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3891 $EGREP "yes" >/dev/null 2>&1; then
3892 { echo "$as_me:$LINENO: result: yes" >&5
3893echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003894cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003895#define _ALL_SOURCE 1
3896_ACEOF
3897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898else
3899 { echo "$as_me:$LINENO: result: no" >&5
3900echo "${ECHO_T}no" >&6; }
3901fi
Matthias Klose5183ebd2010-04-24 16:38:36 +00003902rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003903
3904
3905
3906# Check for unsupported systems
3907case $ac_sys_system/$ac_sys_release in
3908atheos*|Linux*/1*)
3909 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3910 echo See README for details.
3911 exit 1;;
3912esac
3913
3914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003915{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3916echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003917
3918# Check whether --with-suffix was given.
3919if test "${with_suffix+set}" = set; then
3920 withval=$with_suffix;
3921 case $withval in
3922 no) EXEEXT=;;
3923 yes) EXEEXT=.exe;;
3924 *) EXEEXT=$withval;;
3925 esac
3926fi
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3929echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930
3931# Test whether we're running on a non-case-sensitive system, in which
3932# case we give a warning if no ext is given
3933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3935echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936if test ! -d CaseSensitiveTestDir; then
3937mkdir CaseSensitiveTestDir
3938fi
3939
3940if test -d casesensitivetestdir
3941then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942 { echo "$as_me:$LINENO: result: yes" >&5
3943echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944 BUILDEXEEXT=.exe
3945else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003946 { echo "$as_me:$LINENO: result: no" >&5
3947echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003948 BUILDEXEEXT=$EXEEXT
3949fi
3950rmdir CaseSensitiveTestDir
3951
3952case $MACHDEP in
3953bsdos*)
3954 case $CC in
3955 gcc) CC="$CC -D_HAVE_BSDI";;
3956 esac;;
3957esac
3958
3959case $ac_sys_system in
3960hp*|HP*)
3961 case $CC in
3962 cc|*/cc) CC="$CC -Ae";;
3963 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003964SunOS*)
3965 # Some functions have a prototype only with that define, e.g. confstr
3966
3967cat >>confdefs.h <<\_ACEOF
3968#define __EXTENSIONS__ 1
3969_ACEOF
3970
3971 ;;
3972esac
3973
3974
3975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003976{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3977echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003978if test -z "$LIBRARY"
3979then
3980 LIBRARY='libpython$(VERSION).a'
3981fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003982{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3983echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003984
3985# LDLIBRARY is the name of the library to link against (as opposed to the
3986# name of the library into which to insert object files). BLDLIBRARY is also
3987# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3988# is blank as the main program is not linked directly against LDLIBRARY.
3989# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3990# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3991# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3992# DLLLIBRARY is the shared (i.e., DLL) library.
3993#
3994# RUNSHARED is used to run shared python without installed libraries
3995#
3996# INSTSONAME is the name of the shared library that will be use to install
3997# on the system - some systems like version suffix, others don't
3998
3999
4000
4001
4002
4003
4004LDLIBRARY="$LIBRARY"
4005BLDLIBRARY='$(LDLIBRARY)'
4006INSTSONAME='$(LDLIBRARY)'
4007DLLLIBRARY=''
4008LDLIBRARYDIR=''
4009RUNSHARED=''
4010
4011# LINKCC is the command that links the python executable -- default is $(CC).
4012# If CXX is set, and if it is needed to link a main function that was
4013# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4014# python might then depend on the C++ runtime
4015# This is altered for AIX in order to build the export list before
4016# linking.
4017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004018{ echo "$as_me:$LINENO: checking LINKCC" >&5
4019echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004020if test -z "$LINKCC"
4021then
4022 LINKCC='$(PURIFY) $(MAINCC)'
4023 case $ac_sys_system in
4024 AIX*)
4025 exp_extra="\"\""
4026 if test $ac_sys_release -ge 5 -o \
4027 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4028 exp_extra="."
4029 fi
4030 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004031 QNX*)
4032 # qcc must be used because the other compilers do not
4033 # support -N.
4034 LINKCC=qcc;;
4035 esac
4036fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004037{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4038echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004039
4040# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4041# make sure we default having it set to "no": this is used by
4042# distutils.unixccompiler to know if it should add --enable-new-dtags
4043# to linker command lines, and failing to detect GNU ld simply results
4044# in the same bahaviour as before.
4045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004046{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4047echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004048ac_prog=ld
4049if test "$GCC" = yes; then
4050 ac_prog=`$CC -print-prog-name=ld`
4051fi
4052case `"$ac_prog" -V 2>&1 < /dev/null` in
4053 *GNU*)
4054 GNULD=yes;;
4055 *)
4056 GNULD=no;;
4057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004058{ echo "$as_me:$LINENO: result: $GNULD" >&5
4059echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004061{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4062echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004063# Check whether --enable-shared was given.
4064if test "${enable_shared+set}" = set; then
4065 enableval=$enable_shared;
4066fi
4067
4068
4069if test -z "$enable_shared"
4070then
4071 case $ac_sys_system in
4072 CYGWIN* | atheos*)
4073 enable_shared="yes";;
4074 *)
4075 enable_shared="no";;
4076 esac
4077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4079echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004081{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4082echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083# Check whether --enable-profiling was given.
4084if test "${enable_profiling+set}" = set; then
4085 enableval=$enable_profiling; ac_save_cc="$CC"
4086 CC="$CC -pg"
4087 if test "$cross_compiling" = yes; then
4088 ac_enable_profiling="no"
4089else
4090 cat >conftest.$ac_ext <<_ACEOF
4091/* confdefs.h. */
4092_ACEOF
4093cat confdefs.h >>conftest.$ac_ext
4094cat >>conftest.$ac_ext <<_ACEOF
4095/* end confdefs.h. */
4096int main() { return 0; }
4097_ACEOF
4098rm -f conftest$ac_exeext
4099if { (ac_try="$ac_link"
4100case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004105 (eval "$ac_link") 2>&5
4106 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004108 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4109 { (case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004114 (eval "$ac_try") 2>&5
4115 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004117 (exit $ac_status); }; }; then
4118 ac_enable_profiling="yes"
4119else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004120 echo "$as_me: program exited with status $ac_status" >&5
4121echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004122sed 's/^/| /' conftest.$ac_ext >&5
4123
4124( exit $ac_status )
4125ac_enable_profiling="no"
4126fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4128fi
4129
4130
4131 CC="$ac_save_cc"
4132fi
4133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004134{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4135echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004136
4137case "$ac_enable_profiling" in
4138 "yes")
4139 BASECFLAGS="-pg $BASECFLAGS"
4140 LDFLAGS="-pg $LDFLAGS"
4141 ;;
4142esac
4143
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004144{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4145echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004146
4147# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4148# library that we build, but we do not want to link against it (we
4149# will find it with a -framework option). For this reason there is an
4150# extra variable BLDLIBRARY against which Python and the extension
4151# modules are linked, BLDLIBRARY. This is normally the same as
4152# LDLIBRARY, but empty for MacOSX framework builds.
4153if test "$enable_framework"
4154then
4155 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4156 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4157 BLDLIBRARY=''
4158else
4159 BLDLIBRARY='$(LDLIBRARY)'
4160fi
4161
4162# Other platforms follow
4163if test $enable_shared = "yes"; then
4164
4165cat >>confdefs.h <<\_ACEOF
4166#define Py_ENABLE_SHARED 1
4167_ACEOF
4168
4169 case $ac_sys_system in
4170 BeOS*)
4171 LDLIBRARY='libpython$(VERSION).so'
4172 ;;
4173 CYGWIN*)
4174 LDLIBRARY='libpython$(VERSION).dll.a'
4175 DLLLIBRARY='libpython$(VERSION).dll'
4176 ;;
4177 SunOS*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4180 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4181 INSTSONAME="$LDLIBRARY".$SOVERSION
4182 ;;
4183 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4184 LDLIBRARY='libpython$(VERSION).so'
4185 BLDLIBRARY='-L. -lpython$(VERSION)'
4186 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4187 case $ac_sys_system in
4188 FreeBSD*)
4189 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4190 ;;
4191 esac
4192 INSTSONAME="$LDLIBRARY".$SOVERSION
4193 ;;
4194 hp*|HP*)
4195 case `uname -m` in
4196 ia64)
4197 LDLIBRARY='libpython$(VERSION).so'
4198 ;;
4199 *)
4200 LDLIBRARY='libpython$(VERSION).sl'
4201 ;;
4202 esac
4203 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4204 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4205 ;;
4206 OSF*)
4207 LDLIBRARY='libpython$(VERSION).so'
4208 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4209 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4210 ;;
4211 atheos*)
4212 LDLIBRARY='libpython$(VERSION).so'
4213 BLDLIBRARY='-L. -lpython$(VERSION)'
4214 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4215 ;;
4216 Darwin*)
4217 LDLIBRARY='libpython$(VERSION).dylib'
4218 BLDLIBRARY='-L. -lpython$(VERSION)'
4219 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4220 ;;
4221
4222 esac
4223else # shared is disabled
4224 case $ac_sys_system in
4225 CYGWIN*)
4226 BLDLIBRARY='$(LIBRARY)'
4227 LDLIBRARY='libpython$(VERSION).dll.a'
4228 ;;
4229 esac
4230fi
4231
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004232{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4233echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234
4235if test -n "$ac_tool_prefix"; then
4236 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4237set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004240if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004241 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242else
4243 if test -n "$RANLIB"; then
4244 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004255 break 2
4256 fi
4257done
4258done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263RANLIB=$ac_cv_prog_RANLIB
4264if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4266echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004268 { echo "$as_me:$LINENO: result: no" >&5
4269echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004270fi
4271
4272
4273fi
4274if test -z "$ac_cv_prog_RANLIB"; then
4275 ac_ct_RANLIB=$RANLIB
4276 # Extract the first word of "ranlib", so it can be a program name with args.
4277set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004280if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004281 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004282else
4283 if test -n "$ac_ct_RANLIB"; then
4284 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4285else
4286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4287for as_dir in $PATH
4288do
4289 IFS=$as_save_IFS
4290 test -z "$as_dir" && as_dir=.
4291 for ac_exec_ext in '' $ac_executable_extensions; do
4292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4293 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004295 break 2
4296 fi
4297done
4298done
4299IFS=$as_save_IFS
4300
4301fi
4302fi
4303ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4304if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4306echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004308 { echo "$as_me:$LINENO: result: no" >&5
4309echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004310fi
4311
4312 if test "x$ac_ct_RANLIB" = x; then
4313 RANLIB=":"
4314 else
4315 case $cross_compiling:$ac_tool_warned in
4316yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4318whose name does not start with the host triplet. If you think this
4319configuration is useful to you, please write to autoconf@gnu.org." >&5
4320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4321whose name does not start with the host triplet. If you think this
4322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004323ac_tool_warned=yes ;;
4324esac
4325 RANLIB=$ac_ct_RANLIB
4326 fi
4327else
4328 RANLIB="$ac_cv_prog_RANLIB"
4329fi
4330
4331
4332for ac_prog in ar aal
4333do
4334 # Extract the first word of "$ac_prog", so it can be a program name with args.
4335set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004336{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004338if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004339 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340else
4341 if test -n "$AR"; then
4342 ac_cv_prog_AR="$AR" # Let the user override the test.
4343else
4344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4345for as_dir in $PATH
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
4349 for ac_exec_ext in '' $ac_executable_extensions; do
4350 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4351 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004353 break 2
4354 fi
4355done
4356done
4357IFS=$as_save_IFS
4358
4359fi
4360fi
4361AR=$ac_cv_prog_AR
4362if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004363 { echo "$as_me:$LINENO: result: $AR" >&5
4364echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: no" >&5
4367echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368fi
4369
4370
4371 test -n "$AR" && break
4372done
4373test -n "$AR" || AR="ar"
4374
4375
4376# tweak ARFLAGS only if the user didn't set it on the command line
4377
4378if test -z "$ARFLAGS"
4379then
4380 ARFLAGS="rc"
4381fi
4382
4383
4384# Extract the first word of "svnversion", so it can be a program name with args.
4385set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004386{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004388if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004389 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004390else
4391 if test -n "$SVNVERSION"; then
4392 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4393else
4394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
4400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4401 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004402 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004403 break 2
4404 fi
4405done
4406done
4407IFS=$as_save_IFS
4408
4409 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4410fi
4411fi
4412SVNVERSION=$ac_cv_prog_SVNVERSION
4413if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4415echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004417 { echo "$as_me:$LINENO: result: no" >&5
4418echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004419fi
4420
4421
4422if test $SVNVERSION = found
4423then
4424 SVNVERSION="svnversion \$(srcdir)"
4425else
4426 SVNVERSION="echo Unversioned directory"
4427fi
4428
4429case $MACHDEP in
4430bsdos*|hp*|HP*)
4431 # install -d does not work on BSDI or HP-UX
4432 if test -z "$INSTALL"
4433 then
4434 INSTALL="${srcdir}/install-sh -c"
4435 fi
4436esac
4437ac_aux_dir=
4438for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4439 if test -f "$ac_dir/install-sh"; then
4440 ac_aux_dir=$ac_dir
4441 ac_install_sh="$ac_aux_dir/install-sh -c"
4442 break
4443 elif test -f "$ac_dir/install.sh"; then
4444 ac_aux_dir=$ac_dir
4445 ac_install_sh="$ac_aux_dir/install.sh -c"
4446 break
4447 elif test -f "$ac_dir/shtool"; then
4448 ac_aux_dir=$ac_dir
4449 ac_install_sh="$ac_aux_dir/shtool install -c"
4450 break
4451 fi
4452done
4453if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004454 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4455echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004456 { (exit 1); exit 1; }; }
4457fi
4458
4459# These three variables are undocumented and unsupported,
4460# and are intended to be withdrawn in a future Autoconf release.
4461# They can cause serious problems if a builder's source tree is in a directory
4462# whose full name contains unusual characters.
4463ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4464ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4465ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4466
4467
4468# Find a good install program. We prefer a C program (faster),
4469# so one script is as good as another. But avoid the broken or
4470# incompatible versions:
4471# SysV /etc/install, /usr/sbin/install
4472# SunOS /usr/etc/install
4473# IRIX /sbin/install
4474# AIX /bin/install
4475# AmigaOS /C/install, which installs bootblocks on floppy discs
4476# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4477# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4478# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4479# OS/2's system install, which has a completely different semantic
4480# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004481{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4482echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483if test -z "$INSTALL"; then
4484if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004485 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004486else
4487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4488for as_dir in $PATH
4489do
4490 IFS=$as_save_IFS
4491 test -z "$as_dir" && as_dir=.
4492 # Account for people who put trailing slashes in PATH elements.
4493case $as_dir/ in
4494 ./ | .// | /cC/* | \
4495 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4496 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4497 /usr/ucb/* ) ;;
4498 *)
4499 # OSF1 and SCO ODT 3.0 have their own names for install.
4500 # Don't use installbsd from OSF since it installs stuff as root
4501 # by default.
4502 for ac_prog in ginstall scoinst install; do
4503 for ac_exec_ext in '' $ac_executable_extensions; do
4504 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4505 if test $ac_prog = install &&
4506 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4507 # AIX install. It has an incompatible calling convention.
4508 :
4509 elif test $ac_prog = install &&
4510 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4511 # program-specific install script used by HP pwplus--don't use.
4512 :
4513 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004514 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4515 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004516 fi
4517 fi
4518 done
4519 done
4520 ;;
4521esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522done
4523IFS=$as_save_IFS
4524
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525
4526fi
4527 if test "${ac_cv_path_install+set}" = set; then
4528 INSTALL=$ac_cv_path_install
4529 else
4530 # As a last resort, use the slow shell script. Don't cache a
4531 # value for INSTALL within a source directory, because that will
4532 # break other packages using the cache if that directory is
4533 # removed, or if the value is a relative name.
4534 INSTALL=$ac_install_sh
4535 fi
4536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4538echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539
4540# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4541# It thinks the first close brace ends the variable substitution.
4542test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4543
4544test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4545
4546test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4547
4548
4549# Not every filesystem supports hard links
4550
4551if test -z "$LN" ; then
4552 case $ac_sys_system in
4553 BeOS*) LN="ln -s";;
4554 CYGWIN*) LN="ln -s";;
4555 atheos*) LN="ln -s";;
4556 *) LN=ln;;
4557 esac
4558fi
4559
4560# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004561{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4562echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004563
4564# Check whether --with-pydebug was given.
4565if test "${with_pydebug+set}" = set; then
4566 withval=$with_pydebug;
4567if test "$withval" != no
4568then
4569
4570cat >>confdefs.h <<\_ACEOF
4571#define Py_DEBUG 1
4572_ACEOF
4573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004574 { echo "$as_me:$LINENO: result: yes" >&5
4575echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004576 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004577else { echo "$as_me:$LINENO: result: no" >&5
4578echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004579fi
4580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004581 { echo "$as_me:$LINENO: result: no" >&5
4582echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004583fi
4584
4585
4586# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4587# merged with this chunk of code?
4588
4589# Optimizer/debugger flags
4590# ------------------------
4591# (The following bit of code is complicated enough - please keep things
4592# indented properly. Just pretend you're editing Python code. ;-)
4593
4594# There are two parallel sets of case statements below, one that checks to
4595# see if OPT was set and one that does BASECFLAGS setting based upon
4596# compiler and platform. BASECFLAGS tweaks need to be made even if the
4597# user set OPT.
4598
4599# tweak OPT based on compiler and platform, only if the user didn't set
4600# it on the command line
4601
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004602if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603then
4604 case $GCC in
4605 yes)
4606 if test "$CC" != 'g++' ; then
4607 STRICT_PROTO="-Wstrict-prototypes"
4608 fi
4609 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4610 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4611 WRAP="-fwrapv"
4612 fi
4613 case $ac_cv_prog_cc_g in
4614 yes)
4615 if test "$Py_DEBUG" = 'true' ; then
4616 # Optimization messes up debuggers, so turn it off for
4617 # debug builds.
4618 OPT="-g -Wall $STRICT_PROTO"
4619 else
4620 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4621 fi
4622 ;;
4623 *)
4624 OPT="-O3 -Wall $STRICT_PROTO"
4625 ;;
4626 esac
4627 case $ac_sys_system in
4628 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4629 ;;
4630 esac
4631 ;;
4632
4633 *)
4634 OPT="-O"
4635 ;;
4636 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637fi
4638
4639
4640
4641# The -arch flags for universal builds on OSX
4642UNIVERSAL_ARCH_FLAGS=
4643
4644
4645# tweak BASECFLAGS based on compiler and platform
4646case $GCC in
4647yes)
4648 # Python violates C99 rules, by casting between incompatible
4649 # pointer types. GCC may generate bad code as a result of that,
4650 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4652echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004653 ac_save_cc="$CC"
4654 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004655 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004658 cat >conftest.$ac_ext <<_ACEOF
4659/* confdefs.h. */
4660_ACEOF
4661cat confdefs.h >>conftest.$ac_ext
4662cat >>conftest.$ac_ext <<_ACEOF
4663/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664
4665int
4666main ()
4667{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004668int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004669 ;
4670 return 0;
4671}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004672_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004673rm -f conftest.$ac_objext
4674if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004675case "(($ac_try" in
4676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677 *) ac_try_echo=$ac_try;;
4678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004680 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004682 grep -v '^ *+' conftest.er1 >conftest.err
4683 rm -f conftest.er1
4684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004686 (exit $ac_status); } && {
4687 test -z "$ac_c_werror_flag" ||
4688 test ! -s conftest.err
4689 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004690 ac_cv_no_strict_aliasing_ok=yes
4691else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004692 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004693sed 's/^/| /' conftest.$ac_ext >&5
4694
Gregory P. Smith373469a2009-11-01 21:03:38 +00004695 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004696fi
4697
Gregory P. Smith373469a2009-11-01 21:03:38 +00004698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004699fi
4700
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004702 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4703echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004704 if test $ac_cv_no_strict_aliasing_ok = yes
4705 then
4706 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4707 fi
4708
4709 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4710 # support. Without this, treatment of subnormals doesn't follow
4711 # the standard.
4712 case $ac_sys_machine in
4713 alpha*)
4714 BASECFLAGS="$BASECFLAGS -mieee"
4715 ;;
4716 esac
4717
4718 case $ac_sys_system in
4719 SCO_SV*)
4720 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4721 ;;
4722 # is there any other compiler on Darwin besides gcc?
4723 Darwin*)
4724 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4725 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004726 if test "${CC}" = gcc
4727 then
4728 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4729echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4730 case "${UNIVERSALSDK}" in
4731 */MacOSX10.4u.sdk)
4732 # Build using 10.4 SDK, force usage of gcc when the
4733 # compiler is gcc, otherwise the user will get very
4734 # confusing error messages when building on OSX 10.6
4735 CC=gcc-4.0
4736 CPP=cpp-4.0
4737 ;;
4738 esac
4739 { echo "$as_me:$LINENO: result: $CC" >&5
4740echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004741 fi
4742
4743 # Calculate the right deployment target for this build.
4744 #
4745 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4746 if test ${cur_target} '>' 10.2; then
4747 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004748 if test ${enable_universalsdk}; then
4749 if test "${UNIVERSAL_ARCHS}" = "all"; then
4750 # Ensure that the default platform for a
4751 # 4-way universal build is OSX 10.5,
4752 # that's the first OS release where
4753 # 4-way builds make sense.
4754 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004755
4756 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4757 cur_target='10.5'
4758
4759 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4760 cur_target='10.5'
4761
4762 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4763 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004764 fi
4765 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004766 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004767 # On Intel macs default to a deployment
4768 # target of 10.4, that's the first OSX
4769 # release with Intel support.
4770 cur_target="10.4"
4771 fi
4772 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004773 fi
4774 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4775
4776 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4777 # environment with a value that is the same as what we'll use
4778 # in the Makefile to ensure that we'll get the same compiler
4779 # environment during configure and build time.
4780 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4781 export MACOSX_DEPLOYMENT_TARGET
4782 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4783
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004784 if test "${enable_universalsdk}"; then
4785 UNIVERSAL_ARCH_FLAGS=""
4786 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4787 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4788 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00004789 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004790
4791 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4792 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4793 LIPO_32BIT_FLAGS=""
4794 ARCH_RUN_32BIT="true"
4795
4796 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4797 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4798 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004799 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004800
4801 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4802 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4803 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004804 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004805
4806 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4807 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4808 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004809 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004810
4811 else
4812 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4813echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4814 { (exit 1); exit 1; }; }
4815
4816 fi
4817
4818
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00004819 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
4820 if test "${UNIVERSALSDK}" != "/"
4821 then
4822 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
4823 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4824 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004825 fi
4826
4827 fi
4828
4829
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004830 ;;
4831 OSF*)
4832 BASECFLAGS="$BASECFLAGS -mieee"
4833 ;;
4834 esac
4835 ;;
4836
4837*)
4838 case $ac_sys_system in
4839 OpenUNIX*|UnixWare*)
4840 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4841 ;;
4842 OSF*)
4843 BASECFLAGS="$BASECFLAGS -ieee -std"
4844 ;;
4845 SCO_SV*)
4846 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4847 ;;
4848 esac
4849 ;;
4850esac
4851
4852if test "$Py_DEBUG" = 'true'; then
4853 :
4854else
4855 OPT="-DNDEBUG $OPT"
4856fi
4857
4858if test "$ac_arch_flags"
4859then
4860 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4861fi
4862
4863# disable check for icc since it seems to pass, but generates a warning
4864if test "$CC" = icc
4865then
4866 ac_cv_opt_olimit_ok=no
4867fi
4868
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004869{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4870echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004872 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004873else
4874 ac_save_cc="$CC"
4875CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004876cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877/* confdefs.h. */
4878_ACEOF
4879cat confdefs.h >>conftest.$ac_ext
4880cat >>conftest.$ac_ext <<_ACEOF
4881/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004882
4883int
4884main ()
4885{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004887 ;
4888 return 0;
4889}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004890_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004891rm -f conftest.$ac_objext
4892if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004898 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004899 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004900 grep -v '^ *+' conftest.er1 >conftest.err
4901 rm -f conftest.er1
4902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004904 (exit $ac_status); } && {
4905 test -z "$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004908 ac_cv_opt_olimit_ok=yes
4909else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004910 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004911sed 's/^/| /' conftest.$ac_ext >&5
4912
Gregory P. Smith373469a2009-11-01 21:03:38 +00004913 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004914fi
4915
Gregory P. Smith373469a2009-11-01 21:03:38 +00004916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917CC="$ac_save_cc"
4918fi
4919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004920{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4921echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922if test $ac_cv_opt_olimit_ok = yes; then
4923 case $ac_sys_system in
4924 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4925 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4926 # environment?
4927 Darwin*)
4928 ;;
4929 *)
4930 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4931 ;;
4932 esac
4933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004934 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4935echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004936 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938else
4939 ac_save_cc="$CC"
4940 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004941 cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004947
4948int
4949main ()
4950{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004951int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004952 ;
4953 return 0;
4954}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004955_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004956rm -f conftest.$ac_objext
4957if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004958case "(($ac_try" in
4959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4960 *) ac_try_echo=$ac_try;;
4961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004963 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004964 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004965 grep -v '^ *+' conftest.er1 >conftest.err
4966 rm -f conftest.er1
4967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004969 (exit $ac_status); } && {
4970 test -z "$ac_c_werror_flag" ||
4971 test ! -s conftest.err
4972 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004973 ac_cv_olimit_ok=yes
4974else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004975 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004976sed 's/^/| /' conftest.$ac_ext >&5
4977
Gregory P. Smith373469a2009-11-01 21:03:38 +00004978 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979fi
4980
Gregory P. Smith373469a2009-11-01 21:03:38 +00004981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982 CC="$ac_save_cc"
4983fi
4984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004985 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4986echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987 if test $ac_cv_olimit_ok = yes; then
4988 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4989 fi
4990fi
4991
4992# Check whether GCC supports PyArg_ParseTuple format
4993if test "$GCC" = "yes"
4994then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4996echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997 save_CFLAGS=$CFLAGS
4998 CFLAGS="$CFLAGS -Werror"
4999 cat >conftest.$ac_ext <<_ACEOF
5000/* confdefs.h. */
5001_ACEOF
5002cat confdefs.h >>conftest.$ac_ext
5003cat >>conftest.$ac_ext <<_ACEOF
5004/* end confdefs.h. */
5005
5006 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5007
5008int
5009main ()
5010{
5011
5012 ;
5013 return 0;
5014}
5015_ACEOF
5016rm -f conftest.$ac_objext
5017if { (ac_try="$ac_compile"
5018case "(($ac_try" in
5019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5020 *) ac_try_echo=$ac_try;;
5021esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005023 (eval "$ac_compile") 2>conftest.er1
5024 ac_status=$?
5025 grep -v '^ *+' conftest.er1 >conftest.err
5026 rm -f conftest.er1
5027 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005029 (exit $ac_status); } && {
5030 test -z "$ac_c_werror_flag" ||
5031 test ! -s conftest.err
5032 } && test -s conftest.$ac_objext; then
5033
5034cat >>confdefs.h <<\_ACEOF
5035#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5036_ACEOF
5037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038 { echo "$as_me:$LINENO: result: yes" >&5
5039echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005040else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005041 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042sed 's/^/| /' conftest.$ac_ext >&5
5043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005044 { echo "$as_me:$LINENO: result: no" >&5
5045echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046
5047fi
5048
5049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5050 CFLAGS=$save_CFLAGS
5051fi
5052
5053# On some compilers, pthreads are available without further options
5054# (e.g. MacOS X). On some of these systems, the compiler will not
5055# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5056# So we have to see first whether pthreads are available without
5057# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005058{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5059echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005061 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062else
5063 if test "$cross_compiling" = yes; then
5064 ac_cv_pthread_is_default=no
5065else
5066 cat >conftest.$ac_ext <<_ACEOF
5067/* confdefs.h. */
5068_ACEOF
5069cat confdefs.h >>conftest.$ac_ext
5070cat >>conftest.$ac_ext <<_ACEOF
5071/* end confdefs.h. */
5072
5073#include <pthread.h>
5074
5075void* routine(void* p){return NULL;}
5076
5077int main(){
5078 pthread_t p;
5079 if(pthread_create(&p,NULL,routine,NULL)!=0)
5080 return 1;
5081 (void)pthread_detach(p);
5082 return 0;
5083}
5084
5085_ACEOF
5086rm -f conftest$ac_exeext
5087if { (ac_try="$ac_link"
5088case "(($ac_try" in
5089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5090 *) ac_try_echo=$ac_try;;
5091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005093 (eval "$ac_link") 2>&5
5094 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5097 { (case "(($ac_try" in
5098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5099 *) ac_try_echo=$ac_try;;
5100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102 (eval "$ac_try") 2>&5
5103 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005105 (exit $ac_status); }; }; then
5106
5107 ac_cv_pthread_is_default=yes
5108 ac_cv_kthread=no
5109 ac_cv_pthread=no
5110
5111else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005112 echo "$as_me: program exited with status $ac_status" >&5
5113echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114sed 's/^/| /' conftest.$ac_ext >&5
5115
5116( exit $ac_status )
5117ac_cv_pthread_is_default=no
5118fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5120fi
5121
5122
5123
5124fi
5125
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5127echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005128
5129
5130if test $ac_cv_pthread_is_default = yes
5131then
5132 ac_cv_kpthread=no
5133else
5134# -Kpthread, if available, provides the right #defines
5135# and linker options to make pthread_create available
5136# Some compilers won't report that they do not support -Kpthread,
5137# so we need to run a program to see whether it really made the
5138# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005139{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5140echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005142 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143else
5144 ac_save_cc="$CC"
5145CC="$CC -Kpthread"
5146if test "$cross_compiling" = yes; then
5147 ac_cv_kpthread=no
5148else
5149 cat >conftest.$ac_ext <<_ACEOF
5150/* confdefs.h. */
5151_ACEOF
5152cat confdefs.h >>conftest.$ac_ext
5153cat >>conftest.$ac_ext <<_ACEOF
5154/* end confdefs.h. */
5155
5156#include <pthread.h>
5157
5158void* routine(void* p){return NULL;}
5159
5160int main(){
5161 pthread_t p;
5162 if(pthread_create(&p,NULL,routine,NULL)!=0)
5163 return 1;
5164 (void)pthread_detach(p);
5165 return 0;
5166}
5167
5168_ACEOF
5169rm -f conftest$ac_exeext
5170if { (ac_try="$ac_link"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005176 (eval "$ac_link") 2>&5
5177 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5180 { (case "(($ac_try" in
5181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5182 *) ac_try_echo=$ac_try;;
5183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185 (eval "$ac_try") 2>&5
5186 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005188 (exit $ac_status); }; }; then
5189 ac_cv_kpthread=yes
5190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005191 echo "$as_me: program exited with status $ac_status" >&5
5192echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193sed 's/^/| /' conftest.$ac_ext >&5
5194
5195( exit $ac_status )
5196ac_cv_kpthread=no
5197fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5199fi
5200
5201
5202CC="$ac_save_cc"
5203fi
5204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5206echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207fi
5208
5209if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5210then
5211# -Kthread, if available, provides the right #defines
5212# and linker options to make pthread_create available
5213# Some compilers won't report that they do not support -Kthread,
5214# so we need to run a program to see whether it really made the
5215# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005216{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5217echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220else
5221 ac_save_cc="$CC"
5222CC="$CC -Kthread"
5223if test "$cross_compiling" = yes; then
5224 ac_cv_kthread=no
5225else
5226 cat >conftest.$ac_ext <<_ACEOF
5227/* confdefs.h. */
5228_ACEOF
5229cat confdefs.h >>conftest.$ac_ext
5230cat >>conftest.$ac_ext <<_ACEOF
5231/* end confdefs.h. */
5232
5233#include <pthread.h>
5234
5235void* routine(void* p){return NULL;}
5236
5237int main(){
5238 pthread_t p;
5239 if(pthread_create(&p,NULL,routine,NULL)!=0)
5240 return 1;
5241 (void)pthread_detach(p);
5242 return 0;
5243}
5244
5245_ACEOF
5246rm -f conftest$ac_exeext
5247if { (ac_try="$ac_link"
5248case "(($ac_try" in
5249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5250 *) ac_try_echo=$ac_try;;
5251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005253 (eval "$ac_link") 2>&5
5254 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5257 { (case "(($ac_try" in
5258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5259 *) ac_try_echo=$ac_try;;
5260esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262 (eval "$ac_try") 2>&5
5263 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265 (exit $ac_status); }; }; then
5266 ac_cv_kthread=yes
5267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005268 echo "$as_me: program exited with status $ac_status" >&5
5269echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270sed 's/^/| /' conftest.$ac_ext >&5
5271
5272( exit $ac_status )
5273ac_cv_kthread=no
5274fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5276fi
5277
5278
5279CC="$ac_save_cc"
5280fi
5281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5283echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284fi
5285
5286if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5287then
5288# -pthread, if available, provides the right #defines
5289# and linker options to make pthread_create available
5290# Some compilers won't report that they do not support -pthread,
5291# so we need to run a program to see whether it really made the
5292# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005293{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5294echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297else
5298 ac_save_cc="$CC"
5299CC="$CC -pthread"
5300if test "$cross_compiling" = yes; then
5301 ac_cv_pthread=no
5302else
5303 cat >conftest.$ac_ext <<_ACEOF
5304/* confdefs.h. */
5305_ACEOF
5306cat confdefs.h >>conftest.$ac_ext
5307cat >>conftest.$ac_ext <<_ACEOF
5308/* end confdefs.h. */
5309
5310#include <pthread.h>
5311
5312void* routine(void* p){return NULL;}
5313
5314int main(){
5315 pthread_t p;
5316 if(pthread_create(&p,NULL,routine,NULL)!=0)
5317 return 1;
5318 (void)pthread_detach(p);
5319 return 0;
5320}
5321
5322_ACEOF
5323rm -f conftest$ac_exeext
5324if { (ac_try="$ac_link"
5325case "(($ac_try" in
5326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5327 *) ac_try_echo=$ac_try;;
5328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330 (eval "$ac_link") 2>&5
5331 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5334 { (case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339 (eval "$ac_try") 2>&5
5340 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342 (exit $ac_status); }; }; then
5343 ac_cv_pthread=yes
5344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005345 echo "$as_me: program exited with status $ac_status" >&5
5346echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347sed 's/^/| /' conftest.$ac_ext >&5
5348
5349( exit $ac_status )
5350ac_cv_pthread=no
5351fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5353fi
5354
5355
5356CC="$ac_save_cc"
5357fi
5358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005359{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5360echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361fi
5362
5363# If we have set a CC compiler flag for thread support then
5364# check if it works for CXX, too.
5365ac_cv_cxx_thread=no
5366if test ! -z "$CXX"
5367then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005368{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5369echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005370ac_save_cxx="$CXX"
5371
5372if test "$ac_cv_kpthread" = "yes"
5373then
5374 CXX="$CXX -Kpthread"
5375 ac_cv_cxx_thread=yes
5376elif test "$ac_cv_kthread" = "yes"
5377then
5378 CXX="$CXX -Kthread"
5379 ac_cv_cxx_thread=yes
5380elif test "$ac_cv_pthread" = "yes"
5381then
5382 CXX="$CXX -pthread"
5383 ac_cv_cxx_thread=yes
5384fi
5385
5386if test $ac_cv_cxx_thread = yes
5387then
5388 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5389 $CXX -c conftest.$ac_ext 2>&5
5390 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5391 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5392 then
5393 ac_cv_cxx_thread=yes
5394 else
5395 ac_cv_cxx_thread=no
5396 fi
5397 rm -fr conftest*
5398fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005399{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5400echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005401fi
5402CXX="$ac_save_cxx"
5403
5404
5405# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005406{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5407echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005409 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005410else
5411 cat >conftest.$ac_ext <<_ACEOF
5412/* confdefs.h. */
5413_ACEOF
5414cat confdefs.h >>conftest.$ac_ext
5415cat >>conftest.$ac_ext <<_ACEOF
5416/* end confdefs.h. */
5417#include <stdlib.h>
5418#include <stdarg.h>
5419#include <string.h>
5420#include <float.h>
5421
5422int
5423main ()
5424{
5425
5426 ;
5427 return 0;
5428}
5429_ACEOF
5430rm -f conftest.$ac_objext
5431if { (ac_try="$ac_compile"
5432case "(($ac_try" in
5433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5434 *) ac_try_echo=$ac_try;;
5435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437 (eval "$ac_compile") 2>conftest.er1
5438 ac_status=$?
5439 grep -v '^ *+' conftest.er1 >conftest.err
5440 rm -f conftest.er1
5441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 (exit $ac_status); } && {
5444 test -z "$ac_c_werror_flag" ||
5445 test ! -s conftest.err
5446 } && test -s conftest.$ac_objext; then
5447 ac_cv_header_stdc=yes
5448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005449 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450sed 's/^/| /' conftest.$ac_ext >&5
5451
5452 ac_cv_header_stdc=no
5453fi
5454
5455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5456
5457if test $ac_cv_header_stdc = yes; then
5458 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5459 cat >conftest.$ac_ext <<_ACEOF
5460/* confdefs.h. */
5461_ACEOF
5462cat confdefs.h >>conftest.$ac_ext
5463cat >>conftest.$ac_ext <<_ACEOF
5464/* end confdefs.h. */
5465#include <string.h>
5466
5467_ACEOF
5468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 $EGREP "memchr" >/dev/null 2>&1; then
5470 :
5471else
5472 ac_cv_header_stdc=no
5473fi
Matthias Klose5183ebd2010-04-24 16:38:36 +00005474rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475
5476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5480 cat >conftest.$ac_ext <<_ACEOF
5481/* confdefs.h. */
5482_ACEOF
5483cat confdefs.h >>conftest.$ac_ext
5484cat >>conftest.$ac_ext <<_ACEOF
5485/* end confdefs.h. */
5486#include <stdlib.h>
5487
5488_ACEOF
5489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5490 $EGREP "free" >/dev/null 2>&1; then
5491 :
5492else
5493 ac_cv_header_stdc=no
5494fi
Matthias Klose5183ebd2010-04-24 16:38:36 +00005495rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496
5497fi
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5501 if test "$cross_compiling" = yes; then
5502 :
5503else
5504 cat >conftest.$ac_ext <<_ACEOF
5505/* confdefs.h. */
5506_ACEOF
5507cat confdefs.h >>conftest.$ac_ext
5508cat >>conftest.$ac_ext <<_ACEOF
5509/* end confdefs.h. */
5510#include <ctype.h>
5511#include <stdlib.h>
5512#if ((' ' & 0x0FF) == 0x020)
5513# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5514# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5515#else
5516# define ISLOWER(c) \
5517 (('a' <= (c) && (c) <= 'i') \
5518 || ('j' <= (c) && (c) <= 'r') \
5519 || ('s' <= (c) && (c) <= 'z'))
5520# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5521#endif
5522
5523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5524int
5525main ()
5526{
5527 int i;
5528 for (i = 0; i < 256; i++)
5529 if (XOR (islower (i), ISLOWER (i))
5530 || toupper (i) != TOUPPER (i))
5531 return 2;
5532 return 0;
5533}
5534_ACEOF
5535rm -f conftest$ac_exeext
5536if { (ac_try="$ac_link"
5537case "(($ac_try" in
5538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539 *) ac_try_echo=$ac_try;;
5540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005542 (eval "$ac_link") 2>&5
5543 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5546 { (case "(($ac_try" in
5547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5548 *) ac_try_echo=$ac_try;;
5549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 (eval "$ac_try") 2>&5
5552 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554 (exit $ac_status); }; }; then
5555 :
5556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005557 echo "$as_me: program exited with status $ac_status" >&5
5558echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005559sed 's/^/| /' conftest.$ac_ext >&5
5560
5561( exit $ac_status )
5562ac_cv_header_stdc=no
5563fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5565fi
5566
5567
5568fi
5569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005570{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5571echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005572if test $ac_cv_header_stdc = yes; then
5573
5574cat >>confdefs.h <<\_ACEOF
5575#define STDC_HEADERS 1
5576_ACEOF
5577
5578fi
5579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005580# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5591 inttypes.h stdint.h unistd.h
5592do
5593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5594{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5597 echo $ECHO_N "(cached) $ECHO_C" >&6
5598else
5599 cat >conftest.$ac_ext <<_ACEOF
5600/* confdefs.h. */
5601_ACEOF
5602cat confdefs.h >>conftest.$ac_ext
5603cat >>conftest.$ac_ext <<_ACEOF
5604/* end confdefs.h. */
5605$ac_includes_default
5606
5607#include <$ac_header>
5608_ACEOF
5609rm -f conftest.$ac_objext
5610if { (ac_try="$ac_compile"
5611case "(($ac_try" in
5612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5613 *) ac_try_echo=$ac_try;;
5614esac
5615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5616 (eval "$ac_compile") 2>conftest.er1
5617 ac_status=$?
5618 grep -v '^ *+' conftest.er1 >conftest.err
5619 rm -f conftest.er1
5620 cat conftest.err >&5
5621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5622 (exit $ac_status); } && {
5623 test -z "$ac_c_werror_flag" ||
5624 test ! -s conftest.err
5625 } && test -s conftest.$ac_objext; then
5626 eval "$as_ac_Header=yes"
5627else
5628 echo "$as_me: failed program was:" >&5
5629sed 's/^/| /' conftest.$ac_ext >&5
5630
5631 eval "$as_ac_Header=no"
5632fi
5633
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5635fi
5636ac_res=`eval echo '${'$as_ac_Header'}'`
5637 { echo "$as_me:$LINENO: result: $ac_res" >&5
5638echo "${ECHO_T}$ac_res" >&6; }
5639if test `eval echo '${'$as_ac_Header'}'` = yes; then
5640 cat >>confdefs.h <<_ACEOF
5641#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5642_ACEOF
5643
5644fi
5645
5646done
5647
5648
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005649
Martin v. Löwis11437992002-04-12 09:54:03 +00005650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
Anthony Baxter8a560de2004-10-13 15:30:56 +00005685
Martin v. Löwisc3001752005-01-23 09:27:24 +00005686
Martin v. Löwis11017b12006-01-14 18:12:57 +00005687
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005688
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005689
5690
5691
5692
5693
5694
5695
5696
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005697
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005698
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005699
5700
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005701
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005702
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005703
5704
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005705for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5706fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005707ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005708shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005709unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005710sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5711sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005712sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005713sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005714sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00005715sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005716bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005717do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005718as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005720 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005723 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005724fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005725ac_res=`eval echo '${'$as_ac_Header'}'`
5726 { echo "$as_me:$LINENO: result: $ac_res" >&5
5727echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728else
Martin v. Löwis11437992002-04-12 09:54:03 +00005729 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005730{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5731echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005733/* confdefs.h. */
5734_ACEOF
5735cat confdefs.h >>conftest.$ac_ext
5736cat >>conftest.$ac_ext <<_ACEOF
5737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005738$ac_includes_default
5739#include <$ac_header>
5740_ACEOF
5741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005742if { (ac_try="$ac_compile"
5743case "(($ac_try" in
5744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5745 *) ac_try_echo=$ac_try;;
5746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750 grep -v '^ *+' conftest.er1 >conftest.err
5751 rm -f conftest.er1
5752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005754 (exit $ac_status); } && {
5755 test -z "$ac_c_werror_flag" ||
5756 test ! -s conftest.err
5757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005761sed 's/^/| /' conftest.$ac_ext >&5
5762
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005765
5766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005767{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5768echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005769
5770# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005771{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5772echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005774/* confdefs.h. */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005779#include <$ac_header>
5780_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { (ac_try="$ac_cpp conftest.$ac_ext"
5782case "(($ac_try" in
5783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5784 *) ac_try_echo=$ac_try;;
5785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005787 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005788 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005789 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 rm -f conftest.er1
5791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793 (exit $ac_status); } >/dev/null && {
5794 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5795 test ! -s conftest.err
5796 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 ac_header_preproc=yes
5798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005800sed 's/^/| /' conftest.$ac_ext >&5
5801
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005804
Martin v. Löwis11437992002-04-12 09:54:03 +00005805rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5807echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
5809# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5811 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005812 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5813echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5814 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5815echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005816 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005817 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005818 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005819 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5820echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5821 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5822echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5823 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5824echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5825 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5826echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5827 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5828echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5829 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5830echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005832## -------------------------------------- ##
5833## Report this to http://bugs.python.org/ ##
5834## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005835_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005836 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005839{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5840echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005842 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005843else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005844 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005846ac_res=`eval echo '${'$as_ac_Header'}'`
5847 { echo "$as_me:$LINENO: result: $ac_res" >&5
5848echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005849
5850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005851if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005852 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005853#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005854_ACEOF
5855
5856fi
5857
Guido van Rossum627b2d71993-12-24 10:39:16 +00005858done
5859
Martin v. Löwis11437992002-04-12 09:54:03 +00005860
5861
5862
5863
5864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005866for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5868{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5869echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005872else
Martin v. Löwis11437992002-04-12 09:54:03 +00005873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005879#include <sys/types.h>
5880#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005881
Martin v. Löwis11437992002-04-12 09:54:03 +00005882int
5883main ()
5884{
5885if ((DIR *) 0)
5886return 0;
5887 ;
5888 return 0;
5889}
5890_ACEOF
5891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892if { (ac_try="$ac_compile"
5893case "(($ac_try" in
5894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5895 *) ac_try_echo=$ac_try;;
5896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005900 grep -v '^ *+' conftest.er1 >conftest.err
5901 rm -f conftest.er1
5902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005904 (exit $ac_status); } && {
5905 test -z "$ac_c_werror_flag" ||
5906 test ! -s conftest.err
5907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005908 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005911sed 's/^/| /' conftest.$ac_ext >&5
5912
Martin v. Löwiseba40652007-08-30 20:10:57 +00005913 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915
5916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005917fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918ac_res=`eval echo '${'$as_ac_Header'}'`
5919 { echo "$as_me:$LINENO: result: $ac_res" >&5
5920echo "${ECHO_T}$ac_res" >&6; }
5921if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005923#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005924_ACEOF
5925
5926ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005927fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929done
5930# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5931if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005932 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5933echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005934if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005935 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936else
Martin v. Löwis11437992002-04-12 09:54:03 +00005937 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005938cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005939/* confdefs.h. */
5940_ACEOF
5941cat confdefs.h >>conftest.$ac_ext
5942cat >>conftest.$ac_ext <<_ACEOF
5943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005944
Martin v. Löwiseba40652007-08-30 20:10:57 +00005945/* Override any GCC internal prototype to avoid an error.
5946 Use char because int might match the return type of a GCC
5947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005948#ifdef __cplusplus
5949extern "C"
5950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005951char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005952int
5953main ()
5954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005956 ;
5957 return 0;
5958}
5959_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960for ac_lib in '' dir; do
5961 if test -z "$ac_lib"; then
5962 ac_res="none required"
5963 else
5964 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005965 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005966 fi
5967 rm -f conftest.$ac_objext conftest$ac_exeext
5968if { (ac_try="$ac_link"
5969case "(($ac_try" in
5970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5971 *) ac_try_echo=$ac_try;;
5972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005974 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005975 ac_status=$?
5976 grep -v '^ *+' conftest.er1 >conftest.err
5977 rm -f conftest.er1
5978 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005980 (exit $ac_status); } && {
5981 test -z "$ac_c_werror_flag" ||
5982 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005983 } && test -s conftest$ac_exeext &&
5984 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005987 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005988sed 's/^/| /' conftest.$ac_ext >&5
5989
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990
Brett Cannon19fab762007-06-02 03:02:29 +00005991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005992
5993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5994 conftest$ac_exeext
5995 if test "${ac_cv_search_opendir+set}" = set; then
5996 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998done
5999if test "${ac_cv_search_opendir+set}" = set; then
6000 :
6001else
6002 ac_cv_search_opendir=no
6003fi
6004rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006005LIBS=$ac_func_search_save_LIBS
6006fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006007{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6008echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009ac_res=$ac_cv_search_opendir
6010if test "$ac_res" != no; then
6011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006013fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
Michael W. Hudson54241132001-12-07 15:38:26 +00006015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006016 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6017echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006018if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006020else
6021 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006023/* confdefs.h. */
6024_ACEOF
6025cat confdefs.h >>conftest.$ac_ext
6026cat >>conftest.$ac_ext <<_ACEOF
6027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006028
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029/* Override any GCC internal prototype to avoid an error.
6030 Use char because int might match the return type of a GCC
6031 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006032#ifdef __cplusplus
6033extern "C"
6034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006035char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006036int
6037main ()
6038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006039return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006040 ;
6041 return 0;
6042}
6043_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006044for ac_lib in '' x; do
6045 if test -z "$ac_lib"; then
6046 ac_res="none required"
6047 else
6048 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006050 fi
6051 rm -f conftest.$ac_objext conftest$ac_exeext
6052if { (ac_try="$ac_link"
6053case "(($ac_try" in
6054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6055 *) ac_try_echo=$ac_try;;
6056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006059 ac_status=$?
6060 grep -v '^ *+' conftest.er1 >conftest.err
6061 rm -f conftest.er1
6062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006064 (exit $ac_status); } && {
6065 test -z "$ac_c_werror_flag" ||
6066 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067 } && test -s conftest$ac_exeext &&
6068 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006071 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006072sed 's/^/| /' conftest.$ac_ext >&5
6073
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074
Brett Cannon19fab762007-06-02 03:02:29 +00006075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076
6077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6078 conftest$ac_exeext
6079 if test "${ac_cv_search_opendir+set}" = set; then
6080 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006082done
6083if test "${ac_cv_search_opendir+set}" = set; then
6084 :
6085else
6086 ac_cv_search_opendir=no
6087fi
6088rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006089LIBS=$ac_func_search_save_LIBS
6090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6092echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093ac_res=$ac_cv_search_opendir
6094if test "$ac_res" != no; then
6095 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097fi
6098
6099fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6102echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105else
6106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006107/* confdefs.h. */
6108_ACEOF
6109cat confdefs.h >>conftest.$ac_ext
6110cat >>conftest.$ac_ext <<_ACEOF
6111/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113int
6114main ()
6115{
6116return makedev(0, 0);
6117 ;
6118 return 0;
6119}
6120_ACEOF
6121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122if { (ac_try="$ac_link"
6123case "(($ac_try" in
6124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6125 *) ac_try_echo=$ac_try;;
6126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006130 grep -v '^ *+' conftest.er1 >conftest.err
6131 rm -f conftest.er1
6132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134 (exit $ac_status); } && {
6135 test -z "$ac_c_werror_flag" ||
6136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137 } && test -s conftest$ac_exeext &&
6138 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139 ac_cv_header_sys_types_h_makedev=yes
6140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006142sed 's/^/| /' conftest.$ac_ext >&5
6143
Martin v. Löwiseba40652007-08-30 20:10:57 +00006144 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146
6147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149
6150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006151{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6152echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153
6154if test $ac_cv_header_sys_types_h_makedev = no; then
6155if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006156 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6157echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6162echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163else
6164 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006165{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6166echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006168/* confdefs.h. */
6169_ACEOF
6170cat confdefs.h >>conftest.$ac_ext
6171cat >>conftest.$ac_ext <<_ACEOF
6172/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173$ac_includes_default
6174#include <sys/mkdev.h>
6175_ACEOF
6176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177if { (ac_try="$ac_compile"
6178case "(($ac_try" in
6179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6180 *) ac_try_echo=$ac_try;;
6181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185 grep -v '^ *+' conftest.er1 >conftest.err
6186 rm -f conftest.er1
6187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006189 (exit $ac_status); } && {
6190 test -z "$ac_c_werror_flag" ||
6191 test ! -s conftest.err
6192 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193 ac_header_compiler=yes
6194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006196sed 's/^/| /' conftest.$ac_ext >&5
6197
Martin v. Löwiseba40652007-08-30 20:10:57 +00006198 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006200
6201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006202{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6203echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006206{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6207echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214#include <sys/mkdev.h>
6215_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006216if { (ac_try="$ac_cpp conftest.$ac_ext"
6217case "(($ac_try" in
6218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6219 *) ac_try_echo=$ac_try;;
6220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006222 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006224 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225 rm -f conftest.er1
6226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006228 (exit $ac_status); } >/dev/null && {
6229 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6230 test ! -s conftest.err
6231 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_header_preproc=yes
6233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006235sed 's/^/| /' conftest.$ac_ext >&5
6236
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_header_preproc=no
6238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6242echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243
6244# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006245case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6246 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006247 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6248echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6249 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6250echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006251 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006252 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006253 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006254 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6255echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6256 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6257echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6258 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6259echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6260 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6261echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6262 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6263echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6264 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6265echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006267## -------------------------------------- ##
6268## Report this to http://bugs.python.org/ ##
6269## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006270_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006272 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006274{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6275echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006277 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278else
6279 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6280fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006281{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6282echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006285if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287cat >>confdefs.h <<\_ACEOF
6288#define MAJOR_IN_MKDEV 1
6289_ACEOF
6290
6291fi
6292
6293
6294
6295 if test $ac_cv_header_sys_mkdev_h = no; then
6296 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006297 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6298echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006300 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6303echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304else
6305 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006306{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6307echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006309/* confdefs.h. */
6310_ACEOF
6311cat confdefs.h >>conftest.$ac_ext
6312cat >>conftest.$ac_ext <<_ACEOF
6313/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006314$ac_includes_default
6315#include <sys/sysmacros.h>
6316_ACEOF
6317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318if { (ac_try="$ac_compile"
6319case "(($ac_try" in
6320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6321 *) ac_try_echo=$ac_try;;
6322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326 grep -v '^ *+' conftest.er1 >conftest.err
6327 rm -f conftest.er1
6328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006330 (exit $ac_status); } && {
6331 test -z "$ac_c_werror_flag" ||
6332 test ! -s conftest.err
6333 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006334 ac_header_compiler=yes
6335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006337sed 's/^/| /' conftest.$ac_ext >&5
6338
Martin v. Löwiseba40652007-08-30 20:10:57 +00006339 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006341
6342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006343{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6344echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345
6346# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006347{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6348echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006350/* confdefs.h. */
6351_ACEOF
6352cat confdefs.h >>conftest.$ac_ext
6353cat >>conftest.$ac_ext <<_ACEOF
6354/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006355#include <sys/sysmacros.h>
6356_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357if { (ac_try="$ac_cpp conftest.$ac_ext"
6358case "(($ac_try" in
6359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6360 *) ac_try_echo=$ac_try;;
6361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006363 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006365 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366 rm -f conftest.er1
6367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006369 (exit $ac_status); } >/dev/null && {
6370 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6371 test ! -s conftest.err
6372 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006373 ac_header_preproc=yes
6374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006376sed 's/^/| /' conftest.$ac_ext >&5
6377
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378 ac_header_preproc=no
6379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006380
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006381rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6383echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384
6385# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006386case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6387 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006388 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6389echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6390 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6391echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006392 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006393 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006394 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006395 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6396echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6397 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6398echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6399 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6400echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6401 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6402echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6403 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6404echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6405 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6406echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006408## -------------------------------------- ##
6409## Report this to http://bugs.python.org/ ##
6410## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006411_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006412 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006413 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6416echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006417if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006419else
6420 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6423echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006424
6425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006426if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006427
6428cat >>confdefs.h <<\_ACEOF
6429#define MAJOR_IN_SYSMACROS 1
6430_ACEOF
6431
6432fi
6433
6434
6435 fi
6436fi
6437
Michael W. Hudson54241132001-12-07 15:38:26 +00006438
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006439# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006440
6441for ac_header in term.h
6442do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006443as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6444{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6445echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006446if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006448else
6449 cat >conftest.$ac_ext <<_ACEOF
6450/* confdefs.h. */
6451_ACEOF
6452cat confdefs.h >>conftest.$ac_ext
6453cat >>conftest.$ac_ext <<_ACEOF
6454/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006455
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006456#ifdef HAVE_CURSES_H
6457#include <curses.h>
6458#endif
6459
6460
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006461#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006462_ACEOF
6463rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006464if { (ac_try="$ac_compile"
6465case "(($ac_try" in
6466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6467 *) ac_try_echo=$ac_try;;
6468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006471 ac_status=$?
6472 grep -v '^ *+' conftest.er1 >conftest.err
6473 rm -f conftest.er1
6474 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006476 (exit $ac_status); } && {
6477 test -z "$ac_c_werror_flag" ||
6478 test ! -s conftest.err
6479 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006480 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483sed 's/^/| /' conftest.$ac_ext >&5
6484
Martin v. Löwiseba40652007-08-30 20:10:57 +00006485 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006487
6488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006489fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006490ac_res=`eval echo '${'$as_ac_Header'}'`
6491 { echo "$as_me:$LINENO: result: $ac_res" >&5
6492echo "${ECHO_T}$ac_res" >&6; }
6493if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006494 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006496_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006497
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006498fi
6499
6500done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006501
6502
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503# On Linux, netlink.h requires asm/types.h
6504
6505for ac_header in linux/netlink.h
6506do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6508{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6509echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006510if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006512else
6513 cat >conftest.$ac_ext <<_ACEOF
6514/* confdefs.h. */
6515_ACEOF
6516cat confdefs.h >>conftest.$ac_ext
6517cat >>conftest.$ac_ext <<_ACEOF
6518/* end confdefs.h. */
6519
6520#ifdef HAVE_ASM_TYPES_H
6521#include <asm/types.h>
6522#endif
6523#ifdef HAVE_SYS_SOCKET_H
6524#include <sys/socket.h>
6525#endif
6526
6527
6528#include <$ac_header>
6529_ACEOF
6530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if { (ac_try="$ac_compile"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006538 ac_status=$?
6539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
6546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006547 eval "$as_ac_Header=yes"
6548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006549 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006550sed 's/^/| /' conftest.$ac_ext >&5
6551
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554
6555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006557ac_res=`eval echo '${'$as_ac_Header'}'`
6558 { echo "$as_me:$LINENO: result: $ac_res" >&5
6559echo "${ECHO_T}$ac_res" >&6; }
6560if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006561 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006562#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006563_ACEOF
6564
6565fi
6566
6567done
6568
6569
Guido van Rossum627b2d71993-12-24 10:39:16 +00006570# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006571was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006572{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6573echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* confdefs.h. */
6576_ACEOF
6577cat confdefs.h >>conftest.$ac_ext
6578cat >>conftest.$ac_ext <<_ACEOF
6579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006581
6582_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006584 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006585 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006586else
Martin v. Löwis11437992002-04-12 09:54:03 +00006587
6588
6589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006590#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006591_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006592
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006593
Guido van Rossum627b2d71993-12-24 10:39:16 +00006594fi
Matthias Klose5183ebd2010-04-24 16:38:36 +00006595rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006597{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6598echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006599
Neal Norwitz11690112002-07-30 01:08:28 +00006600# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006601{ echo "$as_me:$LINENO: checking for makedev" >&5
6602echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006604/* confdefs.h. */
6605_ACEOF
6606cat confdefs.h >>conftest.$ac_ext
6607cat >>conftest.$ac_ext <<_ACEOF
6608/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006609
6610#if defined(MAJOR_IN_MKDEV)
6611#include <sys/mkdev.h>
6612#elif defined(MAJOR_IN_SYSMACROS)
6613#include <sys/sysmacros.h>
6614#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006615#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006616#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006617int
6618main ()
6619{
6620 makedev(0, 0)
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626if { (ac_try="$ac_link"
6627case "(($ac_try" in
6628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6629 *) ac_try_echo=$ac_try;;
6630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006632 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006634 grep -v '^ *+' conftest.er1 >conftest.err
6635 rm -f conftest.er1
6636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006638 (exit $ac_status); } && {
6639 test -z "$ac_c_werror_flag" ||
6640 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006641 } && test -s conftest$ac_exeext &&
6642 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006643 ac_cv_has_makedev=yes
6644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006646sed 's/^/| /' conftest.$ac_ext >&5
6647
Martin v. Löwiseba40652007-08-30 20:10:57 +00006648 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006650
6651rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006652 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006653if test "$ac_cv_has_makedev" = "no"; then
6654 # we didn't link, try if _OSF_SOURCE will allow us to link
6655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006661
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006662#define _OSF_SOURCE 1
6663#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006664
Neal Norwitz11690112002-07-30 01:08:28 +00006665int
6666main ()
6667{
6668 makedev(0, 0)
6669 ;
6670 return 0;
6671}
6672_ACEOF
6673rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674if { (ac_try="$ac_link"
6675case "(($ac_try" in
6676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6677 *) ac_try_echo=$ac_try;;
6678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006682 grep -v '^ *+' conftest.er1 >conftest.err
6683 rm -f conftest.er1
6684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006686 (exit $ac_status); } && {
6687 test -z "$ac_c_werror_flag" ||
6688 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006689 } && test -s conftest$ac_exeext &&
6690 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006691 ac_cv_has_makedev=yes
6692else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006694sed 's/^/| /' conftest.$ac_ext >&5
6695
Martin v. Löwiseba40652007-08-30 20:10:57 +00006696 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698
6699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006700 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006701 if test "$ac_cv_has_makedev" = "yes"; then
6702
6703cat >>confdefs.h <<\_ACEOF
6704#define _OSF_SOURCE 1
6705_ACEOF
6706
6707 fi
6708fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006709{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6710echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006711if test "$ac_cv_has_makedev" = "yes"; then
6712
6713cat >>confdefs.h <<\_ACEOF
6714#define HAVE_MAKEDEV 1
6715_ACEOF
6716
6717fi
6718
Martin v. Löwis399a6892002-10-04 10:22:02 +00006719# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6720# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6721# defined, but the compiler does not support pragma redefine_extname,
6722# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6723# structures (such as rlimit64) without declaring them. As a
6724# work-around, disable LFS on such configurations
6725
6726use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006727{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6728echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006730/* confdefs.h. */
6731_ACEOF
6732cat confdefs.h >>conftest.$ac_ext
6733cat >>conftest.$ac_ext <<_ACEOF
6734/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006735
6736#define _LARGEFILE_SOURCE 1
6737#define _FILE_OFFSET_BITS 64
6738#include <sys/resource.h>
6739
Martin v. Löwis399a6892002-10-04 10:22:02 +00006740int
6741main ()
6742{
6743struct rlimit foo;
6744 ;
6745 return 0;
6746}
6747_ACEOF
6748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749if { (ac_try="$ac_compile"
6750case "(($ac_try" in
6751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752 *) ac_try_echo=$ac_try;;
6753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006757 grep -v '^ *+' conftest.er1 >conftest.err
6758 rm -f conftest.er1
6759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761 (exit $ac_status); } && {
6762 test -z "$ac_c_werror_flag" ||
6763 test ! -s conftest.err
6764 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006765 sol_lfs_bug=no
6766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006768sed 's/^/| /' conftest.$ac_ext >&5
6769
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006772
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006774{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6775echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006776if test "$sol_lfs_bug" = "yes"; then
6777 use_lfs=no
6778fi
6779
6780if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006781# Two defines needed to enable largefile support on various platforms
6782# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784cat >>confdefs.h <<\_ACEOF
6785#define _LARGEFILE_SOURCE 1
6786_ACEOF
6787
6788
6789cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006790#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006792
Martin v. Löwis399a6892002-10-04 10:22:02 +00006793fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006794
Guido van Rossum84e7b241996-08-19 21:59:00 +00006795# Add some code to confdefs.h so that the test for off_t works on SCO
6796cat >> confdefs.h <<\EOF
6797#if defined(SCO_DS)
6798#undef _OFF_T
6799#endif
6800EOF
6801
Guido van Rossumef2255b2000-03-10 22:30:29 +00006802# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006803{ echo "$as_me:$LINENO: checking for mode_t" >&5
6804echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006805if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006808 cat >conftest.$ac_ext <<_ACEOF
6809/* confdefs.h. */
6810_ACEOF
6811cat confdefs.h >>conftest.$ac_ext
6812cat >>conftest.$ac_ext <<_ACEOF
6813/* end confdefs.h. */
6814$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006815typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816int
6817main ()
6818{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006819if ((ac__type_new_ *) 0)
6820 return 0;
6821if (sizeof (ac__type_new_))
6822 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006823 ;
6824 return 0;
6825}
6826_ACEOF
6827rm -f conftest.$ac_objext
6828if { (ac_try="$ac_compile"
6829case "(($ac_try" in
6830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6831 *) ac_try_echo=$ac_try;;
6832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006834 (eval "$ac_compile") 2>conftest.er1
6835 ac_status=$?
6836 grep -v '^ *+' conftest.er1 >conftest.err
6837 rm -f conftest.er1
6838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006840 (exit $ac_status); } && {
6841 test -z "$ac_c_werror_flag" ||
6842 test ! -s conftest.err
6843 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006844 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006847sed 's/^/| /' conftest.$ac_ext >&5
6848
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006849 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006851
6852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006853fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006854{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6855echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6856if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006857 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006858else
Martin v. Löwis11437992002-04-12 09:54:03 +00006859
6860cat >>confdefs.h <<_ACEOF
6861#define mode_t int
6862_ACEOF
6863
6864fi
6865
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866{ echo "$as_me:$LINENO: checking for off_t" >&5
6867echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006868if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006869 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006870else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871 cat >conftest.$ac_ext <<_ACEOF
6872/* confdefs.h. */
6873_ACEOF
6874cat confdefs.h >>conftest.$ac_ext
6875cat >>conftest.$ac_ext <<_ACEOF
6876/* end confdefs.h. */
6877$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879int
6880main ()
6881{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006882if ((ac__type_new_ *) 0)
6883 return 0;
6884if (sizeof (ac__type_new_))
6885 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
6891if { (ac_try="$ac_compile"
6892case "(($ac_try" in
6893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6894 *) ac_try_echo=$ac_try;;
6895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006897 (eval "$ac_compile") 2>conftest.er1
6898 ac_status=$?
6899 grep -v '^ *+' conftest.er1 >conftest.err
6900 rm -f conftest.er1
6901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006903 (exit $ac_status); } && {
6904 test -z "$ac_c_werror_flag" ||
6905 test ! -s conftest.err
6906 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006907 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006910sed 's/^/| /' conftest.$ac_ext >&5
6911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006912 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914
6915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006917{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6918echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6919if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006920 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006921else
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
6923cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006924#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006925_ACEOF
6926
6927fi
6928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006929{ echo "$as_me:$LINENO: checking for pid_t" >&5
6930echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006931if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006933else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006934 cat >conftest.$ac_ext <<_ACEOF
6935/* confdefs.h. */
6936_ACEOF
6937cat confdefs.h >>conftest.$ac_ext
6938cat >>conftest.$ac_ext <<_ACEOF
6939/* end confdefs.h. */
6940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006941typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006942int
6943main ()
6944{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006945if ((ac__type_new_ *) 0)
6946 return 0;
6947if (sizeof (ac__type_new_))
6948 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
6954if { (ac_try="$ac_compile"
6955case "(($ac_try" in
6956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6957 *) ac_try_echo=$ac_try;;
6958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006960 (eval "$ac_compile") 2>conftest.er1
6961 ac_status=$?
6962 grep -v '^ *+' conftest.er1 >conftest.err
6963 rm -f conftest.er1
6964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006966 (exit $ac_status); } && {
6967 test -z "$ac_c_werror_flag" ||
6968 test ! -s conftest.err
6969 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006970 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006973sed 's/^/| /' conftest.$ac_ext >&5
6974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006975 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006977
6978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6981echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6982if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984else
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
6986cat >>confdefs.h <<_ACEOF
6987#define pid_t int
6988_ACEOF
6989
6990fi
6991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006992{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6993echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006994if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006995 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006996else
6997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007003#include <sys/types.h>
7004#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007005
Martin v. Löwis11437992002-04-12 09:54:03 +00007006int
7007main ()
7008{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007009return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007010 ;
7011 return 0;
7012}
7013_ACEOF
7014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015if { (ac_try="$ac_compile"
7016case "(($ac_try" in
7017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7018 *) ac_try_echo=$ac_try;;
7019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007023 grep -v '^ *+' conftest.er1 >conftest.err
7024 rm -f conftest.er1
7025 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007027 (exit $ac_status); } && {
7028 test -z "$ac_c_werror_flag" ||
7029 test ! -s conftest.err
7030 } && test -s conftest.$ac_objext; then
7031 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007032else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007034sed 's/^/| /' conftest.$ac_ext >&5
7035
Martin v. Löwiseba40652007-08-30 20:10:57 +00007036 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007038
7039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007040fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007041{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7042echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007049{ echo "$as_me:$LINENO: checking for size_t" >&5
7050echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007051if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007052 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007054 cat >conftest.$ac_ext <<_ACEOF
7055/* confdefs.h. */
7056_ACEOF
7057cat confdefs.h >>conftest.$ac_ext
7058cat >>conftest.$ac_ext <<_ACEOF
7059/* end confdefs.h. */
7060$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007061typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007062int
7063main ()
7064{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007065if ((ac__type_new_ *) 0)
7066 return 0;
7067if (sizeof (ac__type_new_))
7068 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
7074if { (ac_try="$ac_compile"
7075case "(($ac_try" in
7076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7077 *) ac_try_echo=$ac_try;;
7078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007080 (eval "$ac_compile") 2>conftest.er1
7081 ac_status=$?
7082 grep -v '^ *+' conftest.er1 >conftest.err
7083 rm -f conftest.er1
7084 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007086 (exit $ac_status); } && {
7087 test -z "$ac_c_werror_flag" ||
7088 test ! -s conftest.err
7089 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007090 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007093sed 's/^/| /' conftest.$ac_ext >&5
7094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007095 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097
7098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007100{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7101echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7102if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007103 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007104else
Martin v. Löwis11437992002-04-12 09:54:03 +00007105
7106cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007107#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007108_ACEOF
7109
7110fi
7111
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007112{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7113echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007114if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007115 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007116else
7117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007118/* confdefs.h. */
7119_ACEOF
7120cat confdefs.h >>conftest.$ac_ext
7121cat >>conftest.$ac_ext <<_ACEOF
7122/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007123#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
7125_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007127 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128 ac_cv_type_uid_t=yes
7129else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130 ac_cv_type_uid_t=no
7131fi
Matthias Klose5183ebd2010-04-24 16:38:36 +00007132rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007135{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7136echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007137if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138
Martin v. Löwis11437992002-04-12 09:54:03 +00007139cat >>confdefs.h <<\_ACEOF
7140#define uid_t int
7141_ACEOF
7142
7143
7144cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007145#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007146_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147
7148fi
7149
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007151 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7152echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007153if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007154 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007155else
7156 ac_cv_c_uint32_t=no
7157 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7158 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7159 cat >conftest.$ac_ext <<_ACEOF
7160/* confdefs.h. */
7161_ACEOF
7162cat confdefs.h >>conftest.$ac_ext
7163cat >>conftest.$ac_ext <<_ACEOF
7164/* end confdefs.h. */
7165$ac_includes_default
7166int
7167main ()
7168{
7169static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7170test_array [0] = 0
7171
7172 ;
7173 return 0;
7174}
7175_ACEOF
7176rm -f conftest.$ac_objext
7177if { (ac_try="$ac_compile"
7178case "(($ac_try" in
7179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7180 *) ac_try_echo=$ac_try;;
7181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007183 (eval "$ac_compile") 2>conftest.er1
7184 ac_status=$?
7185 grep -v '^ *+' conftest.er1 >conftest.err
7186 rm -f conftest.er1
7187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007189 (exit $ac_status); } && {
7190 test -z "$ac_c_werror_flag" ||
7191 test ! -s conftest.err
7192 } && test -s conftest.$ac_objext; then
7193 case $ac_type in
7194 uint32_t) ac_cv_c_uint32_t=yes ;;
7195 *) ac_cv_c_uint32_t=$ac_type ;;
7196esac
7197
7198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007199 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007200sed 's/^/| /' conftest.$ac_ext >&5
7201
7202
7203fi
7204
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206 test "$ac_cv_c_uint32_t" != no && break
7207 done
7208fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007209{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7210echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007211 case $ac_cv_c_uint32_t in #(
7212 no|yes) ;; #(
7213 *)
7214
7215cat >>confdefs.h <<\_ACEOF
7216#define _UINT32_T 1
7217_ACEOF
7218
7219
7220cat >>confdefs.h <<_ACEOF
7221#define uint32_t $ac_cv_c_uint32_t
7222_ACEOF
7223;;
7224 esac
7225
7226
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007227 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7228echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007229if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007230 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007231else
7232 ac_cv_c_uint64_t=no
7233 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7234 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7235 cat >conftest.$ac_ext <<_ACEOF
7236/* confdefs.h. */
7237_ACEOF
7238cat confdefs.h >>conftest.$ac_ext
7239cat >>conftest.$ac_ext <<_ACEOF
7240/* end confdefs.h. */
7241$ac_includes_default
7242int
7243main ()
7244{
7245static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7246test_array [0] = 0
7247
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (ac_try="$ac_compile"
7254case "(($ac_try" in
7255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7256 *) ac_try_echo=$ac_try;;
7257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007259 (eval "$ac_compile") 2>conftest.er1
7260 ac_status=$?
7261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007265 (exit $ac_status); } && {
7266 test -z "$ac_c_werror_flag" ||
7267 test ! -s conftest.err
7268 } && test -s conftest.$ac_objext; then
7269 case $ac_type in
7270 uint64_t) ac_cv_c_uint64_t=yes ;;
7271 *) ac_cv_c_uint64_t=$ac_type ;;
7272esac
7273
7274else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007275 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007276sed 's/^/| /' conftest.$ac_ext >&5
7277
7278
7279fi
7280
7281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7282 test "$ac_cv_c_uint64_t" != no && break
7283 done
7284fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007285{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7286echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007287 case $ac_cv_c_uint64_t in #(
7288 no|yes) ;; #(
7289 *)
7290
7291cat >>confdefs.h <<\_ACEOF
7292#define _UINT64_T 1
7293_ACEOF
7294
7295
7296cat >>confdefs.h <<_ACEOF
7297#define uint64_t $ac_cv_c_uint64_t
7298_ACEOF
7299;;
7300 esac
7301
7302
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303 { echo "$as_me:$LINENO: checking for int32_t" >&5
7304echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007305if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007306 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007307else
7308 ac_cv_c_int32_t=no
7309 for ac_type in 'int32_t' 'int' 'long int' \
7310 'long long int' 'short int' 'signed char'; do
7311 cat >conftest.$ac_ext <<_ACEOF
7312/* confdefs.h. */
7313_ACEOF
7314cat confdefs.h >>conftest.$ac_ext
7315cat >>conftest.$ac_ext <<_ACEOF
7316/* end confdefs.h. */
7317$ac_includes_default
7318int
7319main ()
7320{
7321static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7322test_array [0] = 0
7323
7324 ;
7325 return 0;
7326}
7327_ACEOF
7328rm -f conftest.$ac_objext
7329if { (ac_try="$ac_compile"
7330case "(($ac_try" in
7331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7332 *) ac_try_echo=$ac_try;;
7333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007335 (eval "$ac_compile") 2>conftest.er1
7336 ac_status=$?
7337 grep -v '^ *+' conftest.er1 >conftest.err
7338 rm -f conftest.er1
7339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007341 (exit $ac_status); } && {
7342 test -z "$ac_c_werror_flag" ||
7343 test ! -s conftest.err
7344 } && test -s conftest.$ac_objext; then
7345 cat >conftest.$ac_ext <<_ACEOF
7346/* confdefs.h. */
7347_ACEOF
7348cat confdefs.h >>conftest.$ac_ext
7349cat >>conftest.$ac_ext <<_ACEOF
7350/* end confdefs.h. */
7351$ac_includes_default
7352int
7353main ()
7354{
7355static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007356 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007357test_array [0] = 0
7358
7359 ;
7360 return 0;
7361}
7362_ACEOF
7363rm -f conftest.$ac_objext
7364if { (ac_try="$ac_compile"
7365case "(($ac_try" in
7366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7367 *) ac_try_echo=$ac_try;;
7368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007370 (eval "$ac_compile") 2>conftest.er1
7371 ac_status=$?
7372 grep -v '^ *+' conftest.er1 >conftest.err
7373 rm -f conftest.er1
7374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007376 (exit $ac_status); } && {
7377 test -z "$ac_c_werror_flag" ||
7378 test ! -s conftest.err
7379 } && test -s conftest.$ac_objext; then
7380 :
7381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007382 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383sed 's/^/| /' conftest.$ac_ext >&5
7384
7385 case $ac_type in
7386 int32_t) ac_cv_c_int32_t=yes ;;
7387 *) ac_cv_c_int32_t=$ac_type ;;
7388esac
7389
7390fi
7391
7392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007394 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007395sed 's/^/| /' conftest.$ac_ext >&5
7396
7397
7398fi
7399
7400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7401 test "$ac_cv_c_int32_t" != no && break
7402 done
7403fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007404{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7405echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007406 case $ac_cv_c_int32_t in #(
7407 no|yes) ;; #(
7408 *)
7409
7410cat >>confdefs.h <<_ACEOF
7411#define int32_t $ac_cv_c_int32_t
7412_ACEOF
7413;;
7414 esac
7415
7416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007417 { echo "$as_me:$LINENO: checking for int64_t" >&5
7418echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007419if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007420 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007421else
7422 ac_cv_c_int64_t=no
7423 for ac_type in 'int64_t' 'int' 'long int' \
7424 'long long int' 'short int' 'signed char'; do
7425 cat >conftest.$ac_ext <<_ACEOF
7426/* confdefs.h. */
7427_ACEOF
7428cat confdefs.h >>conftest.$ac_ext
7429cat >>conftest.$ac_ext <<_ACEOF
7430/* end confdefs.h. */
7431$ac_includes_default
7432int
7433main ()
7434{
7435static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7436test_array [0] = 0
7437
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442rm -f conftest.$ac_objext
7443if { (ac_try="$ac_compile"
7444case "(($ac_try" in
7445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7446 *) ac_try_echo=$ac_try;;
7447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007449 (eval "$ac_compile") 2>conftest.er1
7450 ac_status=$?
7451 grep -v '^ *+' conftest.er1 >conftest.err
7452 rm -f conftest.er1
7453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007455 (exit $ac_status); } && {
7456 test -z "$ac_c_werror_flag" ||
7457 test ! -s conftest.err
7458 } && test -s conftest.$ac_objext; then
7459 cat >conftest.$ac_ext <<_ACEOF
7460/* confdefs.h. */
7461_ACEOF
7462cat confdefs.h >>conftest.$ac_ext
7463cat >>conftest.$ac_ext <<_ACEOF
7464/* end confdefs.h. */
7465$ac_includes_default
7466int
7467main ()
7468{
7469static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007470 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007471test_array [0] = 0
7472
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477rm -f conftest.$ac_objext
7478if { (ac_try="$ac_compile"
7479case "(($ac_try" in
7480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7481 *) ac_try_echo=$ac_try;;
7482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007484 (eval "$ac_compile") 2>conftest.er1
7485 ac_status=$?
7486 grep -v '^ *+' conftest.er1 >conftest.err
7487 rm -f conftest.er1
7488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007490 (exit $ac_status); } && {
7491 test -z "$ac_c_werror_flag" ||
7492 test ! -s conftest.err
7493 } && test -s conftest.$ac_objext; then
7494 :
7495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007496 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007497sed 's/^/| /' conftest.$ac_ext >&5
7498
7499 case $ac_type in
7500 int64_t) ac_cv_c_int64_t=yes ;;
7501 *) ac_cv_c_int64_t=$ac_type ;;
7502esac
7503
7504fi
7505
7506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007508 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007509sed 's/^/| /' conftest.$ac_ext >&5
7510
7511
7512fi
7513
7514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7515 test "$ac_cv_c_int64_t" != no && break
7516 done
7517fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007518{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7519echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007520 case $ac_cv_c_int64_t in #(
7521 no|yes) ;; #(
7522 *)
7523
7524cat >>confdefs.h <<_ACEOF
7525#define int64_t $ac_cv_c_int64_t
7526_ACEOF
7527;;
7528 esac
7529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007530{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7531echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007532if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007533 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007534else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007535 cat >conftest.$ac_ext <<_ACEOF
7536/* confdefs.h. */
7537_ACEOF
7538cat confdefs.h >>conftest.$ac_ext
7539cat >>conftest.$ac_ext <<_ACEOF
7540/* end confdefs.h. */
7541$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007542typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007543int
7544main ()
7545{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007546if ((ac__type_new_ *) 0)
7547 return 0;
7548if (sizeof (ac__type_new_))
7549 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007550 ;
7551 return 0;
7552}
7553_ACEOF
7554rm -f conftest.$ac_objext
7555if { (ac_try="$ac_compile"
7556case "(($ac_try" in
7557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7558 *) ac_try_echo=$ac_try;;
7559esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007561 (eval "$ac_compile") 2>conftest.er1
7562 ac_status=$?
7563 grep -v '^ *+' conftest.er1 >conftest.err
7564 rm -f conftest.er1
7565 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007567 (exit $ac_status); } && {
7568 test -z "$ac_c_werror_flag" ||
7569 test ! -s conftest.err
7570 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007571 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007573 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007574sed 's/^/| /' conftest.$ac_ext >&5
7575
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007576 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578
7579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007580fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007581{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7582echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7583if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007584
7585cat >>confdefs.h <<\_ACEOF
7586#define HAVE_SSIZE_T 1
7587_ACEOF
7588
7589fi
7590
Jack Jansendd19cf82001-12-06 22:36:17 +00007591
Michael W. Hudson54241132001-12-07 15:38:26 +00007592# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007593# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007594{ echo "$as_me:$LINENO: checking for int" >&5
7595echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7596if test "${ac_cv_type_int+set}" = set; then
7597 echo $ECHO_N "(cached) $ECHO_C" >&6
7598else
7599 cat >conftest.$ac_ext <<_ACEOF
7600/* confdefs.h. */
7601_ACEOF
7602cat confdefs.h >>conftest.$ac_ext
7603cat >>conftest.$ac_ext <<_ACEOF
7604/* end confdefs.h. */
7605$ac_includes_default
7606typedef int ac__type_new_;
7607int
7608main ()
7609{
7610if ((ac__type_new_ *) 0)
7611 return 0;
7612if (sizeof (ac__type_new_))
7613 return 0;
7614 ;
7615 return 0;
7616}
7617_ACEOF
7618rm -f conftest.$ac_objext
7619if { (ac_try="$ac_compile"
7620case "(($ac_try" in
7621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7622 *) ac_try_echo=$ac_try;;
7623esac
7624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7625 (eval "$ac_compile") 2>conftest.er1
7626 ac_status=$?
7627 grep -v '^ *+' conftest.er1 >conftest.err
7628 rm -f conftest.er1
7629 cat conftest.err >&5
7630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631 (exit $ac_status); } && {
7632 test -z "$ac_c_werror_flag" ||
7633 test ! -s conftest.err
7634 } && test -s conftest.$ac_objext; then
7635 ac_cv_type_int=yes
7636else
7637 echo "$as_me: failed program was:" >&5
7638sed 's/^/| /' conftest.$ac_ext >&5
7639
7640 ac_cv_type_int=no
7641fi
7642
7643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7644fi
7645{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7646echo "${ECHO_T}$ac_cv_type_int" >&6; }
7647
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648# The cast to long int works around a bug in the HP C Compiler
7649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007652{ echo "$as_me:$LINENO: checking size of int" >&5
7653echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007654if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007655 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 if test "$cross_compiling" = yes; then
7658 # Depending upon the size, compute the lo and hi bounds.
7659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007660/* confdefs.h. */
7661_ACEOF
7662cat confdefs.h >>conftest.$ac_ext
7663cat >>conftest.$ac_ext <<_ACEOF
7664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007665$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007666 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007667int
7668main ()
7669{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007671test_array [0] = 0
7672
7673 ;
7674 return 0;
7675}
7676_ACEOF
7677rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678if { (ac_try="$ac_compile"
7679case "(($ac_try" in
7680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7681 *) ac_try_echo=$ac_try;;
7682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007684 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007685 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007686 grep -v '^ *+' conftest.er1 >conftest.err
7687 rm -f conftest.er1
7688 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690 (exit $ac_status); } && {
7691 test -z "$ac_c_werror_flag" ||
7692 test ! -s conftest.err
7693 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007694 ac_lo=0 ac_mid=0
7695 while :; do
7696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007697/* confdefs.h. */
7698_ACEOF
7699cat confdefs.h >>conftest.$ac_ext
7700cat >>conftest.$ac_ext <<_ACEOF
7701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007702$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007703 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007704int
7705main ()
7706{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007707static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007708test_array [0] = 0
7709
7710 ;
7711 return 0;
7712}
7713_ACEOF
7714rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715if { (ac_try="$ac_compile"
7716case "(($ac_try" in
7717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7718 *) ac_try_echo=$ac_try;;
7719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007723 grep -v '^ *+' conftest.er1 >conftest.err
7724 rm -f conftest.er1
7725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007727 (exit $ac_status); } && {
7728 test -z "$ac_c_werror_flag" ||
7729 test ! -s conftest.err
7730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 ac_hi=$ac_mid; break
7732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007734sed 's/^/| /' conftest.$ac_ext >&5
7735
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736 ac_lo=`expr $ac_mid + 1`
7737 if test $ac_lo -le $ac_mid; then
7738 ac_lo= ac_hi=
7739 break
7740 fi
7741 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743
7744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 done
7746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007748sed 's/^/| /' conftest.$ac_ext >&5
7749
Martin v. Löwiseba40652007-08-30 20:10:57 +00007750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007751/* confdefs.h. */
7752_ACEOF
7753cat confdefs.h >>conftest.$ac_ext
7754cat >>conftest.$ac_ext <<_ACEOF
7755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007756$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007758int
7759main ()
7760{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007762test_array [0] = 0
7763
7764 ;
7765 return 0;
7766}
7767_ACEOF
7768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769if { (ac_try="$ac_compile"
7770case "(($ac_try" in
7771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7772 *) ac_try_echo=$ac_try;;
7773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007777 grep -v '^ *+' conftest.er1 >conftest.err
7778 rm -f conftest.er1
7779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781 (exit $ac_status); } && {
7782 test -z "$ac_c_werror_flag" ||
7783 test ! -s conftest.err
7784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 ac_hi=-1 ac_mid=-1
7786 while :; do
7787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007788/* confdefs.h. */
7789_ACEOF
7790cat confdefs.h >>conftest.$ac_ext
7791cat >>conftest.$ac_ext <<_ACEOF
7792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007794 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007795int
7796main ()
7797{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007799test_array [0] = 0
7800
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806if { (ac_try="$ac_compile"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007814 grep -v '^ *+' conftest.er1 >conftest.err
7815 rm -f conftest.er1
7816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007818 (exit $ac_status); } && {
7819 test -z "$ac_c_werror_flag" ||
7820 test ! -s conftest.err
7821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_lo=$ac_mid; break
7823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007825sed 's/^/| /' conftest.$ac_ext >&5
7826
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827 ac_hi=`expr '(' $ac_mid ')' - 1`
7828 if test $ac_mid -le $ac_hi; then
7829 ac_lo= ac_hi=
7830 break
7831 fi
7832 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834
7835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 done
7837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007839sed 's/^/| /' conftest.$ac_ext >&5
7840
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007843
7844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846
7847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007848# Binary search between lo and hi bounds.
7849while test "x$ac_lo" != "x$ac_hi"; do
7850 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007858 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007859int
7860main ()
7861{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007863test_array [0] = 0
7864
7865 ;
7866 return 0;
7867}
7868_ACEOF
7869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870if { (ac_try="$ac_compile"
7871case "(($ac_try" in
7872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7873 *) ac_try_echo=$ac_try;;
7874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882 (exit $ac_status); } && {
7883 test -z "$ac_c_werror_flag" ||
7884 test ! -s conftest.err
7885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_hi=$ac_mid
7887else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007889sed 's/^/| /' conftest.$ac_ext >&5
7890
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893
7894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007895done
7896case $ac_lo in
7897?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007900See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007901echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007902See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007903 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904 else
7905 ac_cv_sizeof_int=0
7906 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007907esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007908else
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* confdefs.h. */
7911_ACEOF
7912cat confdefs.h >>conftest.$ac_ext
7913cat >>conftest.$ac_ext <<_ACEOF
7914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007915$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007916 typedef int ac__type_sizeof_;
7917static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7918static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007919#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007920#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007921int
7922main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923{
Martin v. Löwis11437992002-04-12 09:54:03 +00007924
7925 FILE *f = fopen ("conftest.val", "w");
7926 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007928 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007931 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007933 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 }
7935 else
7936 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007938 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007940 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
7944 ;
7945 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007946}
Martin v. Löwis11437992002-04-12 09:54:03 +00007947_ACEOF
7948rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949if { (ac_try="$ac_link"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007955 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959 { (case "(($ac_try" in
7960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7961 *) ac_try_echo=$ac_try;;
7962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 (exit $ac_status); }; }; then
7968 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007970 echo "$as_me: program exited with status $ac_status" >&5
7971echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007972sed 's/^/| /' conftest.$ac_ext >&5
7973
Martin v. Löwis11437992002-04-12 09:54:03 +00007974( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007975if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007976 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007977See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007978echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007979See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007980 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 else
7982 ac_cv_sizeof_int=0
7983 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985rm -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 +00007986fi
7987rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007989{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7990echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007991
7992
7993
Martin v. Löwis11437992002-04-12 09:54:03 +00007994cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007995#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007996_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007997
7998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999{ echo "$as_me:$LINENO: checking for long" >&5
8000echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8001if test "${ac_cv_type_long+set}" = set; then
8002 echo $ECHO_N "(cached) $ECHO_C" >&6
8003else
8004 cat >conftest.$ac_ext <<_ACEOF
8005/* confdefs.h. */
8006_ACEOF
8007cat confdefs.h >>conftest.$ac_ext
8008cat >>conftest.$ac_ext <<_ACEOF
8009/* end confdefs.h. */
8010$ac_includes_default
8011typedef long ac__type_new_;
8012int
8013main ()
8014{
8015if ((ac__type_new_ *) 0)
8016 return 0;
8017if (sizeof (ac__type_new_))
8018 return 0;
8019 ;
8020 return 0;
8021}
8022_ACEOF
8023rm -f conftest.$ac_objext
8024if { (ac_try="$ac_compile"
8025case "(($ac_try" in
8026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8027 *) ac_try_echo=$ac_try;;
8028esac
8029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8030 (eval "$ac_compile") 2>conftest.er1
8031 ac_status=$?
8032 grep -v '^ *+' conftest.er1 >conftest.err
8033 rm -f conftest.er1
8034 cat conftest.err >&5
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); } && {
8037 test -z "$ac_c_werror_flag" ||
8038 test ! -s conftest.err
8039 } && test -s conftest.$ac_objext; then
8040 ac_cv_type_long=yes
8041else
8042 echo "$as_me: failed program was:" >&5
8043sed 's/^/| /' conftest.$ac_ext >&5
8044
8045 ac_cv_type_long=no
8046fi
8047
8048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8049fi
8050{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8051echo "${ECHO_T}$ac_cv_type_long" >&6; }
8052
Martin v. Löwiseba40652007-08-30 20:10:57 +00008053# The cast to long int works around a bug in the HP C Compiler
8054# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8055# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8056# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008057{ echo "$as_me:$LINENO: checking size of long" >&5
8058echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008059if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 if test "$cross_compiling" = yes; then
8063 # Depending upon the size, compute the lo and hi bounds.
8064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008065/* confdefs.h. */
8066_ACEOF
8067cat confdefs.h >>conftest.$ac_ext
8068cat >>conftest.$ac_ext <<_ACEOF
8069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008070$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008071 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008072int
8073main ()
8074{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008075static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008076test_array [0] = 0
8077
8078 ;
8079 return 0;
8080}
8081_ACEOF
8082rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083if { (ac_try="$ac_compile"
8084case "(($ac_try" in
8085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8086 *) ac_try_echo=$ac_try;;
8087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008089 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008091 grep -v '^ *+' conftest.er1 >conftest.err
8092 rm -f conftest.er1
8093 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095 (exit $ac_status); } && {
8096 test -z "$ac_c_werror_flag" ||
8097 test ! -s conftest.err
8098 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_lo=0 ac_mid=0
8100 while :; do
8101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* confdefs.h. */
8103_ACEOF
8104cat confdefs.h >>conftest.$ac_ext
8105cat >>conftest.$ac_ext <<_ACEOF
8106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008108 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008109int
8110main ()
8111{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008113test_array [0] = 0
8114
8115 ;
8116 return 0;
8117}
8118_ACEOF
8119rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120if { (ac_try="$ac_compile"
8121case "(($ac_try" in
8122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8123 *) ac_try_echo=$ac_try;;
8124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008128 grep -v '^ *+' conftest.er1 >conftest.err
8129 rm -f conftest.er1
8130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132 (exit $ac_status); } && {
8133 test -z "$ac_c_werror_flag" ||
8134 test ! -s conftest.err
8135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008136 ac_hi=$ac_mid; break
8137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008139sed 's/^/| /' conftest.$ac_ext >&5
8140
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141 ac_lo=`expr $ac_mid + 1`
8142 if test $ac_lo -le $ac_mid; then
8143 ac_lo= ac_hi=
8144 break
8145 fi
8146 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148
8149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 done
8151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008153sed 's/^/| /' conftest.$ac_ext >&5
8154
Martin v. Löwiseba40652007-08-30 20:10:57 +00008155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008156/* confdefs.h. */
8157_ACEOF
8158cat confdefs.h >>conftest.$ac_ext
8159cat >>conftest.$ac_ext <<_ACEOF
8160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008161$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008163int
8164main ()
8165{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008166static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008167test_array [0] = 0
8168
8169 ;
8170 return 0;
8171}
8172_ACEOF
8173rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174if { (ac_try="$ac_compile"
8175case "(($ac_try" in
8176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8177 *) ac_try_echo=$ac_try;;
8178esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008182 grep -v '^ *+' conftest.er1 >conftest.err
8183 rm -f conftest.er1
8184 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008186 (exit $ac_status); } && {
8187 test -z "$ac_c_werror_flag" ||
8188 test ! -s conftest.err
8189 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ac_hi=-1 ac_mid=-1
8191 while :; do
8192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008193/* confdefs.h. */
8194_ACEOF
8195cat confdefs.h >>conftest.$ac_ext
8196cat >>conftest.$ac_ext <<_ACEOF
8197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008198$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008199 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008200int
8201main ()
8202{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008204test_array [0] = 0
8205
8206 ;
8207 return 0;
8208}
8209_ACEOF
8210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008211if { (ac_try="$ac_compile"
8212case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008219 grep -v '^ *+' conftest.er1 >conftest.err
8220 rm -f conftest.er1
8221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008223 (exit $ac_status); } && {
8224 test -z "$ac_c_werror_flag" ||
8225 test ! -s conftest.err
8226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_lo=$ac_mid; break
8228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008230sed 's/^/| /' conftest.$ac_ext >&5
8231
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232 ac_hi=`expr '(' $ac_mid ')' - 1`
8233 if test $ac_mid -le $ac_hi; then
8234 ac_lo= ac_hi=
8235 break
8236 fi
8237 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239
8240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 done
8242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008244sed 's/^/| /' conftest.$ac_ext >&5
8245
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008248
8249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251
8252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008253# Binary search between lo and hi bounds.
8254while test "x$ac_lo" != "x$ac_hi"; do
8255 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* confdefs.h. */
8258_ACEOF
8259cat confdefs.h >>conftest.$ac_ext
8260cat >>conftest.$ac_ext <<_ACEOF
8261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008263 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008264int
8265main ()
8266{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008267static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008268test_array [0] = 0
8269
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275if { (ac_try="$ac_compile"
8276case "(($ac_try" in
8277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8278 *) ac_try_echo=$ac_try;;
8279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008283 grep -v '^ *+' conftest.er1 >conftest.err
8284 rm -f conftest.er1
8285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287 (exit $ac_status); } && {
8288 test -z "$ac_c_werror_flag" ||
8289 test ! -s conftest.err
8290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_hi=$ac_mid
8292else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008294sed 's/^/| /' conftest.$ac_ext >&5
8295
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008298
8299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008300done
8301case $ac_lo in
8302?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008305See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008306echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008307See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008308 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309 else
8310 ac_cv_sizeof_long=0
8311 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008312esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008313else
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008315/* confdefs.h. */
8316_ACEOF
8317cat confdefs.h >>conftest.$ac_ext
8318cat >>conftest.$ac_ext <<_ACEOF
8319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008320$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008321 typedef long ac__type_sizeof_;
8322static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8323static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008324#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008325#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008326int
8327main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328{
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
8330 FILE *f = fopen ("conftest.val", "w");
8331 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008333 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008335 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008336 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008338 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 }
8340 else
8341 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008343 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008345 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
8349 ;
8350 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008351}
Martin v. Löwis11437992002-04-12 09:54:03 +00008352_ACEOF
8353rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354if { (ac_try="$ac_link"
8355case "(($ac_try" in
8356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8357 *) ac_try_echo=$ac_try;;
8358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364 { (case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 (exit $ac_status); }; }; then
8373 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008375 echo "$as_me: program exited with status $ac_status" >&5
8376echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008377sed 's/^/| /' conftest.$ac_ext >&5
8378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008381 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008382See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008383echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008384See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008385 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 else
8387 ac_cv_sizeof_long=0
8388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390rm -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 +00008391fi
8392rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008393fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008394{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8395echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008396
8397
8398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008400#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008401_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008402
8403
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404{ echo "$as_me:$LINENO: checking for void *" >&5
8405echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8406if test "${ac_cv_type_void_p+set}" = set; then
8407 echo $ECHO_N "(cached) $ECHO_C" >&6
8408else
8409 cat >conftest.$ac_ext <<_ACEOF
8410/* confdefs.h. */
8411_ACEOF
8412cat confdefs.h >>conftest.$ac_ext
8413cat >>conftest.$ac_ext <<_ACEOF
8414/* end confdefs.h. */
8415$ac_includes_default
8416typedef void * ac__type_new_;
8417int
8418main ()
8419{
8420if ((ac__type_new_ *) 0)
8421 return 0;
8422if (sizeof (ac__type_new_))
8423 return 0;
8424 ;
8425 return 0;
8426}
8427_ACEOF
8428rm -f conftest.$ac_objext
8429if { (ac_try="$ac_compile"
8430case "(($ac_try" in
8431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8432 *) ac_try_echo=$ac_try;;
8433esac
8434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8435 (eval "$ac_compile") 2>conftest.er1
8436 ac_status=$?
8437 grep -v '^ *+' conftest.er1 >conftest.err
8438 rm -f conftest.er1
8439 cat conftest.err >&5
8440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8441 (exit $ac_status); } && {
8442 test -z "$ac_c_werror_flag" ||
8443 test ! -s conftest.err
8444 } && test -s conftest.$ac_objext; then
8445 ac_cv_type_void_p=yes
8446else
8447 echo "$as_me: failed program was:" >&5
8448sed 's/^/| /' conftest.$ac_ext >&5
8449
8450 ac_cv_type_void_p=no
8451fi
8452
8453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8454fi
8455{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8456echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8457
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458# The cast to long int works around a bug in the HP C Compiler
8459# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8460# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8461# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008462{ echo "$as_me:$LINENO: checking size of void *" >&5
8463echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008464if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008465 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008466else
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 if test "$cross_compiling" = yes; then
8468 # Depending upon the size, compute the lo and hi bounds.
8469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* confdefs.h. */
8471_ACEOF
8472cat confdefs.h >>conftest.$ac_ext
8473cat >>conftest.$ac_ext <<_ACEOF
8474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008476 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008477int
8478main ()
8479{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008480static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008481test_array [0] = 0
8482
8483 ;
8484 return 0;
8485}
8486_ACEOF
8487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488if { (ac_try="$ac_compile"
8489case "(($ac_try" in
8490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8491 *) ac_try_echo=$ac_try;;
8492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008496 grep -v '^ *+' conftest.er1 >conftest.err
8497 rm -f conftest.er1
8498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008500 (exit $ac_status); } && {
8501 test -z "$ac_c_werror_flag" ||
8502 test ! -s conftest.err
8503 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ac_lo=0 ac_mid=0
8505 while :; do
8506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008507/* confdefs.h. */
8508_ACEOF
8509cat confdefs.h >>conftest.$ac_ext
8510cat >>conftest.$ac_ext <<_ACEOF
8511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008513 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
8516{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008517static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008518test_array [0] = 0
8519
8520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525if { (ac_try="$ac_compile"
8526case "(($ac_try" in
8527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8528 *) ac_try_echo=$ac_try;;
8529esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008533 grep -v '^ *+' conftest.er1 >conftest.err
8534 rm -f conftest.er1
8535 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008537 (exit $ac_status); } && {
8538 test -z "$ac_c_werror_flag" ||
8539 test ! -s conftest.err
8540 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 ac_hi=$ac_mid; break
8542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008544sed 's/^/| /' conftest.$ac_ext >&5
8545
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546 ac_lo=`expr $ac_mid + 1`
8547 if test $ac_lo -le $ac_mid; then
8548 ac_lo= ac_hi=
8549 break
8550 fi
8551 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553
8554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 done
8556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008558sed 's/^/| /' conftest.$ac_ext >&5
8559
Martin v. Löwiseba40652007-08-30 20:10:57 +00008560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008561/* confdefs.h. */
8562_ACEOF
8563cat confdefs.h >>conftest.$ac_ext
8564cat >>conftest.$ac_ext <<_ACEOF
8565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008566$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008568int
8569main ()
8570{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008572test_array [0] = 0
8573
8574 ;
8575 return 0;
8576}
8577_ACEOF
8578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579if { (ac_try="$ac_compile"
8580case "(($ac_try" in
8581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8582 *) ac_try_echo=$ac_try;;
8583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008587 grep -v '^ *+' conftest.er1 >conftest.err
8588 rm -f conftest.er1
8589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008591 (exit $ac_status); } && {
8592 test -z "$ac_c_werror_flag" ||
8593 test ! -s conftest.err
8594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_hi=-1 ac_mid=-1
8596 while :; do
8597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008598/* confdefs.h. */
8599_ACEOF
8600cat confdefs.h >>conftest.$ac_ext
8601cat >>conftest.$ac_ext <<_ACEOF
8602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008604 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008609test_array [0] = 0
8610
8611 ;
8612 return 0;
8613}
8614_ACEOF
8615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008616if { (ac_try="$ac_compile"
8617case "(($ac_try" in
8618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8619 *) ac_try_echo=$ac_try;;
8620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008624 grep -v '^ *+' conftest.er1 >conftest.err
8625 rm -f conftest.er1
8626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628 (exit $ac_status); } && {
8629 test -z "$ac_c_werror_flag" ||
8630 test ! -s conftest.err
8631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_lo=$ac_mid; break
8633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008635sed 's/^/| /' conftest.$ac_ext >&5
8636
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637 ac_hi=`expr '(' $ac_mid ')' - 1`
8638 if test $ac_mid -le $ac_hi; then
8639 ac_lo= ac_hi=
8640 break
8641 fi
8642 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644
8645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 done
8647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008649sed 's/^/| /' conftest.$ac_ext >&5
8650
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008653
8654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656
8657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008658# Binary search between lo and hi bounds.
8659while test "x$ac_lo" != "x$ac_hi"; do
8660 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008668 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008669int
8670main ()
8671{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008673test_array [0] = 0
8674
8675 ;
8676 return 0;
8677}
8678_ACEOF
8679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680if { (ac_try="$ac_compile"
8681case "(($ac_try" in
8682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8683 *) ac_try_echo=$ac_try;;
8684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008688 grep -v '^ *+' conftest.er1 >conftest.err
8689 rm -f conftest.er1
8690 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692 (exit $ac_status); } && {
8693 test -z "$ac_c_werror_flag" ||
8694 test ! -s conftest.err
8695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_hi=$ac_mid
8697else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008699sed 's/^/| /' conftest.$ac_ext >&5
8700
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008703
8704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008705done
8706case $ac_lo in
8707?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008710See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008711echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008712See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008713 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714 else
8715 ac_cv_sizeof_void_p=0
8716 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008717esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008718else
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008720/* confdefs.h. */
8721_ACEOF
8722cat confdefs.h >>conftest.$ac_ext
8723cat >>conftest.$ac_ext <<_ACEOF
8724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008725$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008726 typedef void * ac__type_sizeof_;
8727static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8728static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008729#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008730#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008731int
8732main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008733{
Martin v. Löwis11437992002-04-12 09:54:03 +00008734
8735 FILE *f = fopen ("conftest.val", "w");
8736 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008738 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008740 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008741 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008743 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 }
8745 else
8746 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008748 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008750 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008753
8754 ;
8755 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008756}
Martin v. Löwis11437992002-04-12 09:54:03 +00008757_ACEOF
8758rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759if { (ac_try="$ac_link"
8760case "(($ac_try" in
8761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8762 *) ac_try_echo=$ac_try;;
8763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769 { (case "(($ac_try" in
8770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8771 *) ac_try_echo=$ac_try;;
8772esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 (exit $ac_status); }; }; then
8778 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008780 echo "$as_me: program exited with status $ac_status" >&5
8781echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008782sed 's/^/| /' conftest.$ac_ext >&5
8783
Martin v. Löwis11437992002-04-12 09:54:03 +00008784( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008786 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008787See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008788echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008789See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008790 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 else
8792 ac_cv_sizeof_void_p=0
8793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795rm -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 +00008796fi
8797rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008799{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8800echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008801
8802
8803
Martin v. Löwis11437992002-04-12 09:54:03 +00008804cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008805#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008806_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008807
8808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809{ echo "$as_me:$LINENO: checking for short" >&5
8810echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8811if test "${ac_cv_type_short+set}" = set; then
8812 echo $ECHO_N "(cached) $ECHO_C" >&6
8813else
8814 cat >conftest.$ac_ext <<_ACEOF
8815/* confdefs.h. */
8816_ACEOF
8817cat confdefs.h >>conftest.$ac_ext
8818cat >>conftest.$ac_ext <<_ACEOF
8819/* end confdefs.h. */
8820$ac_includes_default
8821typedef short ac__type_new_;
8822int
8823main ()
8824{
8825if ((ac__type_new_ *) 0)
8826 return 0;
8827if (sizeof (ac__type_new_))
8828 return 0;
8829 ;
8830 return 0;
8831}
8832_ACEOF
8833rm -f conftest.$ac_objext
8834if { (ac_try="$ac_compile"
8835case "(($ac_try" in
8836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8837 *) ac_try_echo=$ac_try;;
8838esac
8839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8840 (eval "$ac_compile") 2>conftest.er1
8841 ac_status=$?
8842 grep -v '^ *+' conftest.er1 >conftest.err
8843 rm -f conftest.er1
8844 cat conftest.err >&5
8845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8846 (exit $ac_status); } && {
8847 test -z "$ac_c_werror_flag" ||
8848 test ! -s conftest.err
8849 } && test -s conftest.$ac_objext; then
8850 ac_cv_type_short=yes
8851else
8852 echo "$as_me: failed program was:" >&5
8853sed 's/^/| /' conftest.$ac_ext >&5
8854
8855 ac_cv_type_short=no
8856fi
8857
8858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8859fi
8860{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8861echo "${ECHO_T}$ac_cv_type_short" >&6; }
8862
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863# The cast to long int works around a bug in the HP C Compiler
8864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8866# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008867{ echo "$as_me:$LINENO: checking size of short" >&5
8868echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008869if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008870 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008871else
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 if test "$cross_compiling" = yes; then
8873 # Depending upon the size, compute the lo and hi bounds.
8874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* confdefs.h. */
8876_ACEOF
8877cat confdefs.h >>conftest.$ac_ext
8878cat >>conftest.$ac_ext <<_ACEOF
8879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008881 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008882int
8883main ()
8884{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008885static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008886test_array [0] = 0
8887
8888 ;
8889 return 0;
8890}
8891_ACEOF
8892rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893if { (ac_try="$ac_compile"
8894case "(($ac_try" in
8895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8896 *) ac_try_echo=$ac_try;;
8897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008901 grep -v '^ *+' conftest.er1 >conftest.err
8902 rm -f conftest.er1
8903 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905 (exit $ac_status); } && {
8906 test -z "$ac_c_werror_flag" ||
8907 test ! -s conftest.err
8908 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 ac_lo=0 ac_mid=0
8910 while :; do
8911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* confdefs.h. */
8913_ACEOF
8914cat confdefs.h >>conftest.$ac_ext
8915cat >>conftest.$ac_ext <<_ACEOF
8916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008918 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008919int
8920main ()
8921{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008922static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008923test_array [0] = 0
8924
8925 ;
8926 return 0;
8927}
8928_ACEOF
8929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930if { (ac_try="$ac_compile"
8931case "(($ac_try" in
8932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8933 *) ac_try_echo=$ac_try;;
8934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008938 grep -v '^ *+' conftest.er1 >conftest.err
8939 rm -f conftest.er1
8940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008942 (exit $ac_status); } && {
8943 test -z "$ac_c_werror_flag" ||
8944 test ! -s conftest.err
8945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ac_hi=$ac_mid; break
8947else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008949sed 's/^/| /' conftest.$ac_ext >&5
8950
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951 ac_lo=`expr $ac_mid + 1`
8952 if test $ac_lo -le $ac_mid; then
8953 ac_lo= ac_hi=
8954 break
8955 fi
8956 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958
8959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 done
8961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008963sed 's/^/| /' conftest.$ac_ext >&5
8964
Martin v. Löwiseba40652007-08-30 20:10:57 +00008965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008966/* confdefs.h. */
8967_ACEOF
8968cat confdefs.h >>conftest.$ac_ext
8969cat >>conftest.$ac_ext <<_ACEOF
8970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008971$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008973int
8974main ()
8975{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008976static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008977test_array [0] = 0
8978
8979 ;
8980 return 0;
8981}
8982_ACEOF
8983rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984if { (ac_try="$ac_compile"
8985case "(($ac_try" in
8986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8987 *) ac_try_echo=$ac_try;;
8988esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008992 grep -v '^ *+' conftest.er1 >conftest.err
8993 rm -f conftest.er1
8994 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996 (exit $ac_status); } && {
8997 test -z "$ac_c_werror_flag" ||
8998 test ! -s conftest.err
8999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 ac_hi=-1 ac_mid=-1
9001 while :; do
9002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009003/* confdefs.h. */
9004_ACEOF
9005cat confdefs.h >>conftest.$ac_ext
9006cat >>conftest.$ac_ext <<_ACEOF
9007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009008$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009009 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009010int
9011main ()
9012{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009014test_array [0] = 0
9015
9016 ;
9017 return 0;
9018}
9019_ACEOF
9020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009021if { (ac_try="$ac_compile"
9022case "(($ac_try" in
9023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9024 *) ac_try_echo=$ac_try;;
9025esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009029 grep -v '^ *+' conftest.er1 >conftest.err
9030 rm -f conftest.er1
9031 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033 (exit $ac_status); } && {
9034 test -z "$ac_c_werror_flag" ||
9035 test ! -s conftest.err
9036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_lo=$ac_mid; break
9038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009040sed 's/^/| /' conftest.$ac_ext >&5
9041
Martin v. Löwiseba40652007-08-30 20:10:57 +00009042 ac_hi=`expr '(' $ac_mid ')' - 1`
9043 if test $ac_mid -le $ac_hi; then
9044 ac_lo= ac_hi=
9045 break
9046 fi
9047 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049
9050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 done
9052else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009054sed 's/^/| /' conftest.$ac_ext >&5
9055
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009058
9059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061
9062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009063# Binary search between lo and hi bounds.
9064while test "x$ac_lo" != "x$ac_hi"; do
9065 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* confdefs.h. */
9068_ACEOF
9069cat confdefs.h >>conftest.$ac_ext
9070cat >>conftest.$ac_ext <<_ACEOF
9071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009073 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009074int
9075main ()
9076{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009077static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009078test_array [0] = 0
9079
9080 ;
9081 return 0;
9082}
9083_ACEOF
9084rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085if { (ac_try="$ac_compile"
9086case "(($ac_try" in
9087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9088 *) ac_try_echo=$ac_try;;
9089esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009093 grep -v '^ *+' conftest.er1 >conftest.err
9094 rm -f conftest.er1
9095 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097 (exit $ac_status); } && {
9098 test -z "$ac_c_werror_flag" ||
9099 test ! -s conftest.err
9100 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_hi=$ac_mid
9102else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009104sed 's/^/| /' conftest.$ac_ext >&5
9105
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108
9109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009110done
9111case $ac_lo in
9112?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009115See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009116echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009117See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009118 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119 else
9120 ac_cv_sizeof_short=0
9121 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009122esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009125/* confdefs.h. */
9126_ACEOF
9127cat confdefs.h >>conftest.$ac_ext
9128cat >>conftest.$ac_ext <<_ACEOF
9129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009130$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009131 typedef short ac__type_sizeof_;
9132static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9133static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009134#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009135#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009136int
9137main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138{
Martin v. Löwis11437992002-04-12 09:54:03 +00009139
9140 FILE *f = fopen ("conftest.val", "w");
9141 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009143 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009145 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009146 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009148 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 }
9150 else
9151 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009153 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009155 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009156 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009158
9159 ;
9160 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009161}
Martin v. Löwis11437992002-04-12 09:54:03 +00009162_ACEOF
9163rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164if { (ac_try="$ac_link"
9165case "(($ac_try" in
9166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9167 *) ac_try_echo=$ac_try;;
9168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009170 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174 { (case "(($ac_try" in
9175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9176 *) ac_try_echo=$ac_try;;
9177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 (exit $ac_status); }; }; then
9183 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009185 echo "$as_me: program exited with status $ac_status" >&5
9186echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009187sed 's/^/| /' conftest.$ac_ext >&5
9188
Martin v. Löwis11437992002-04-12 09:54:03 +00009189( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009191 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009192See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009193echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009194See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009195 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 else
9197 ac_cv_sizeof_short=0
9198 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200rm -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 +00009201fi
9202rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009203fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009204{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9205echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009206
9207
9208
Martin v. Löwis11437992002-04-12 09:54:03 +00009209cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009210#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009211_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009212
9213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214{ echo "$as_me:$LINENO: checking for float" >&5
9215echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9216if test "${ac_cv_type_float+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
9218else
9219 cat >conftest.$ac_ext <<_ACEOF
9220/* confdefs.h. */
9221_ACEOF
9222cat confdefs.h >>conftest.$ac_ext
9223cat >>conftest.$ac_ext <<_ACEOF
9224/* end confdefs.h. */
9225$ac_includes_default
9226typedef float ac__type_new_;
9227int
9228main ()
9229{
9230if ((ac__type_new_ *) 0)
9231 return 0;
9232if (sizeof (ac__type_new_))
9233 return 0;
9234 ;
9235 return 0;
9236}
9237_ACEOF
9238rm -f conftest.$ac_objext
9239if { (ac_try="$ac_compile"
9240case "(($ac_try" in
9241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9242 *) ac_try_echo=$ac_try;;
9243esac
9244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9245 (eval "$ac_compile") 2>conftest.er1
9246 ac_status=$?
9247 grep -v '^ *+' conftest.er1 >conftest.err
9248 rm -f conftest.er1
9249 cat conftest.err >&5
9250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); } && {
9252 test -z "$ac_c_werror_flag" ||
9253 test ! -s conftest.err
9254 } && test -s conftest.$ac_objext; then
9255 ac_cv_type_float=yes
9256else
9257 echo "$as_me: failed program was:" >&5
9258sed 's/^/| /' conftest.$ac_ext >&5
9259
9260 ac_cv_type_float=no
9261fi
9262
9263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9264fi
9265{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9266echo "${ECHO_T}$ac_cv_type_float" >&6; }
9267
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268# The cast to long int works around a bug in the HP C Compiler
9269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9271# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009272{ echo "$as_me:$LINENO: checking size of float" >&5
9273echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009274if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009275 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009276else
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 if test "$cross_compiling" = yes; then
9278 # Depending upon the size, compute the lo and hi bounds.
9279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009280/* confdefs.h. */
9281_ACEOF
9282cat confdefs.h >>conftest.$ac_ext
9283cat >>conftest.$ac_ext <<_ACEOF
9284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009285$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009286 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009287int
9288main ()
9289{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009290static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009291test_array [0] = 0
9292
9293 ;
9294 return 0;
9295}
9296_ACEOF
9297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298if { (ac_try="$ac_compile"
9299case "(($ac_try" in
9300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9301 *) ac_try_echo=$ac_try;;
9302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009306 grep -v '^ *+' conftest.er1 >conftest.err
9307 rm -f conftest.er1
9308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009310 (exit $ac_status); } && {
9311 test -z "$ac_c_werror_flag" ||
9312 test ! -s conftest.err
9313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009314 ac_lo=0 ac_mid=0
9315 while :; do
9316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009317/* confdefs.h. */
9318_ACEOF
9319cat confdefs.h >>conftest.$ac_ext
9320cat >>conftest.$ac_ext <<_ACEOF
9321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009322$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009323 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009324int
9325main ()
9326{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009327static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009328test_array [0] = 0
9329
9330 ;
9331 return 0;
9332}
9333_ACEOF
9334rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335if { (ac_try="$ac_compile"
9336case "(($ac_try" in
9337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9338 *) ac_try_echo=$ac_try;;
9339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009343 grep -v '^ *+' conftest.er1 >conftest.err
9344 rm -f conftest.er1
9345 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009347 (exit $ac_status); } && {
9348 test -z "$ac_c_werror_flag" ||
9349 test ! -s conftest.err
9350 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 ac_hi=$ac_mid; break
9352else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009354sed 's/^/| /' conftest.$ac_ext >&5
9355
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356 ac_lo=`expr $ac_mid + 1`
9357 if test $ac_lo -le $ac_mid; then
9358 ac_lo= ac_hi=
9359 break
9360 fi
9361 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363
9364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 done
9366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009368sed 's/^/| /' conftest.$ac_ext >&5
9369
Martin v. Löwiseba40652007-08-30 20:10:57 +00009370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009371/* confdefs.h. */
9372_ACEOF
9373cat confdefs.h >>conftest.$ac_ext
9374cat >>conftest.$ac_ext <<_ACEOF
9375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009376$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009378int
9379main ()
9380{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009381static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009382test_array [0] = 0
9383
9384 ;
9385 return 0;
9386}
9387_ACEOF
9388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389if { (ac_try="$ac_compile"
9390case "(($ac_try" in
9391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9392 *) ac_try_echo=$ac_try;;
9393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009397 grep -v '^ *+' conftest.er1 >conftest.err
9398 rm -f conftest.er1
9399 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009401 (exit $ac_status); } && {
9402 test -z "$ac_c_werror_flag" ||
9403 test ! -s conftest.err
9404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_hi=-1 ac_mid=-1
9406 while :; do
9407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* confdefs.h. */
9409_ACEOF
9410cat confdefs.h >>conftest.$ac_ext
9411cat >>conftest.$ac_ext <<_ACEOF
9412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009414 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009415int
9416main ()
9417{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009419test_array [0] = 0
9420
9421 ;
9422 return 0;
9423}
9424_ACEOF
9425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009426if { (ac_try="$ac_compile"
9427case "(($ac_try" in
9428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9429 *) ac_try_echo=$ac_try;;
9430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009434 grep -v '^ *+' conftest.er1 >conftest.err
9435 rm -f conftest.er1
9436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438 (exit $ac_status); } && {
9439 test -z "$ac_c_werror_flag" ||
9440 test ! -s conftest.err
9441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_lo=$ac_mid; break
9443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009445sed 's/^/| /' conftest.$ac_ext >&5
9446
Martin v. Löwiseba40652007-08-30 20:10:57 +00009447 ac_hi=`expr '(' $ac_mid ')' - 1`
9448 if test $ac_mid -le $ac_hi; then
9449 ac_lo= ac_hi=
9450 break
9451 fi
9452 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454
9455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 done
9457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009459sed 's/^/| /' conftest.$ac_ext >&5
9460
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009463
9464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466
9467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009468# Binary search between lo and hi bounds.
9469while test "x$ac_lo" != "x$ac_hi"; do
9470 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* confdefs.h. */
9473_ACEOF
9474cat confdefs.h >>conftest.$ac_ext
9475cat >>conftest.$ac_ext <<_ACEOF
9476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009478 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009479int
9480main ()
9481{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009482static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009483test_array [0] = 0
9484
9485 ;
9486 return 0;
9487}
9488_ACEOF
9489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490if { (ac_try="$ac_compile"
9491case "(($ac_try" in
9492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9493 *) ac_try_echo=$ac_try;;
9494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009498 grep -v '^ *+' conftest.er1 >conftest.err
9499 rm -f conftest.er1
9500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502 (exit $ac_status); } && {
9503 test -z "$ac_c_werror_flag" ||
9504 test ! -s conftest.err
9505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_hi=$ac_mid
9507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009509sed 's/^/| /' conftest.$ac_ext >&5
9510
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009513
9514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009515done
9516case $ac_lo in
9517?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009520See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009521echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009522See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009523 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524 else
9525 ac_cv_sizeof_float=0
9526 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009527esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009528else
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009536 typedef float ac__type_sizeof_;
9537static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9538static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009539#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009540#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009541int
9542main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543{
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
9545 FILE *f = fopen ("conftest.val", "w");
9546 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009547 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009548 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009550 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009551 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009553 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 }
9555 else
9556 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009558 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009559 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009560 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
9564 ;
9565 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009566}
Martin v. Löwis11437992002-04-12 09:54:03 +00009567_ACEOF
9568rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569if { (ac_try="$ac_link"
9570case "(($ac_try" in
9571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572 *) ac_try_echo=$ac_try;;
9573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009575 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579 { (case "(($ac_try" in
9580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9581 *) ac_try_echo=$ac_try;;
9582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 (exit $ac_status); }; }; then
9588 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009590 echo "$as_me: program exited with status $ac_status" >&5
9591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009592sed 's/^/| /' conftest.$ac_ext >&5
9593
Martin v. Löwis11437992002-04-12 09:54:03 +00009594( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009595if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009596 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009597See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009598echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009599See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009600 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 else
9602 ac_cv_sizeof_float=0
9603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605rm -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 +00009606fi
9607rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009609{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9610echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009611
9612
9613
Martin v. Löwis11437992002-04-12 09:54:03 +00009614cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009615#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009616_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009617
9618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619{ echo "$as_me:$LINENO: checking for double" >&5
9620echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9621if test "${ac_cv_type_double+set}" = set; then
9622 echo $ECHO_N "(cached) $ECHO_C" >&6
9623else
9624 cat >conftest.$ac_ext <<_ACEOF
9625/* confdefs.h. */
9626_ACEOF
9627cat confdefs.h >>conftest.$ac_ext
9628cat >>conftest.$ac_ext <<_ACEOF
9629/* end confdefs.h. */
9630$ac_includes_default
9631typedef double ac__type_new_;
9632int
9633main ()
9634{
9635if ((ac__type_new_ *) 0)
9636 return 0;
9637if (sizeof (ac__type_new_))
9638 return 0;
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643rm -f conftest.$ac_objext
9644if { (ac_try="$ac_compile"
9645case "(($ac_try" in
9646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9647 *) ac_try_echo=$ac_try;;
9648esac
9649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9650 (eval "$ac_compile") 2>conftest.er1
9651 ac_status=$?
9652 grep -v '^ *+' conftest.er1 >conftest.err
9653 rm -f conftest.er1
9654 cat conftest.err >&5
9655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9656 (exit $ac_status); } && {
9657 test -z "$ac_c_werror_flag" ||
9658 test ! -s conftest.err
9659 } && test -s conftest.$ac_objext; then
9660 ac_cv_type_double=yes
9661else
9662 echo "$as_me: failed program was:" >&5
9663sed 's/^/| /' conftest.$ac_ext >&5
9664
9665 ac_cv_type_double=no
9666fi
9667
9668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9669fi
9670{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9671echo "${ECHO_T}$ac_cv_type_double" >&6; }
9672
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673# The cast to long int works around a bug in the HP C Compiler
9674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9676# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009677{ echo "$as_me:$LINENO: checking size of double" >&5
9678echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009679if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009681else
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 if test "$cross_compiling" = yes; then
9683 # Depending upon the size, compute the lo and hi bounds.
9684cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009685/* confdefs.h. */
9686_ACEOF
9687cat confdefs.h >>conftest.$ac_ext
9688cat >>conftest.$ac_ext <<_ACEOF
9689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009690$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009691 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009692int
9693main ()
9694{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009695static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009696test_array [0] = 0
9697
9698 ;
9699 return 0;
9700}
9701_ACEOF
9702rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703if { (ac_try="$ac_compile"
9704case "(($ac_try" in
9705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9706 *) ac_try_echo=$ac_try;;
9707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009711 grep -v '^ *+' conftest.er1 >conftest.err
9712 rm -f conftest.er1
9713 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009715 (exit $ac_status); } && {
9716 test -z "$ac_c_werror_flag" ||
9717 test ! -s conftest.err
9718 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_lo=0 ac_mid=0
9720 while :; do
9721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* confdefs.h. */
9723_ACEOF
9724cat confdefs.h >>conftest.$ac_ext
9725cat >>conftest.$ac_ext <<_ACEOF
9726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009728 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009729int
9730main ()
9731{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009732static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009733test_array [0] = 0
9734
9735 ;
9736 return 0;
9737}
9738_ACEOF
9739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740if { (ac_try="$ac_compile"
9741case "(($ac_try" in
9742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9743 *) ac_try_echo=$ac_try;;
9744esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009748 grep -v '^ *+' conftest.er1 >conftest.err
9749 rm -f conftest.er1
9750 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009752 (exit $ac_status); } && {
9753 test -z "$ac_c_werror_flag" ||
9754 test ! -s conftest.err
9755 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009756 ac_hi=$ac_mid; break
9757else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009759sed 's/^/| /' conftest.$ac_ext >&5
9760
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761 ac_lo=`expr $ac_mid + 1`
9762 if test $ac_lo -le $ac_mid; then
9763 ac_lo= ac_hi=
9764 break
9765 fi
9766 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768
9769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009770 done
9771else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009773sed 's/^/| /' conftest.$ac_ext >&5
9774
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009776/* confdefs.h. */
9777_ACEOF
9778cat confdefs.h >>conftest.$ac_ext
9779cat >>conftest.$ac_ext <<_ACEOF
9780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009781$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009783int
9784main ()
9785{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009787test_array [0] = 0
9788
9789 ;
9790 return 0;
9791}
9792_ACEOF
9793rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794if { (ac_try="$ac_compile"
9795case "(($ac_try" in
9796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9797 *) ac_try_echo=$ac_try;;
9798esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009802 grep -v '^ *+' conftest.er1 >conftest.err
9803 rm -f conftest.er1
9804 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009806 (exit $ac_status); } && {
9807 test -z "$ac_c_werror_flag" ||
9808 test ! -s conftest.err
9809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_hi=-1 ac_mid=-1
9811 while :; do
9812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009813/* confdefs.h. */
9814_ACEOF
9815cat confdefs.h >>conftest.$ac_ext
9816cat >>conftest.$ac_ext <<_ACEOF
9817/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009818$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009819 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009820int
9821main ()
9822{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009824test_array [0] = 0
9825
9826 ;
9827 return 0;
9828}
9829_ACEOF
9830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009831if { (ac_try="$ac_compile"
9832case "(($ac_try" in
9833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834 *) ac_try_echo=$ac_try;;
9835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009839 grep -v '^ *+' conftest.er1 >conftest.err
9840 rm -f conftest.er1
9841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009843 (exit $ac_status); } && {
9844 test -z "$ac_c_werror_flag" ||
9845 test ! -s conftest.err
9846 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_lo=$ac_mid; break
9848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009850sed 's/^/| /' conftest.$ac_ext >&5
9851
Martin v. Löwiseba40652007-08-30 20:10:57 +00009852 ac_hi=`expr '(' $ac_mid ')' - 1`
9853 if test $ac_mid -le $ac_hi; then
9854 ac_lo= ac_hi=
9855 break
9856 fi
9857 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859
9860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 done
9862else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009864sed 's/^/| /' conftest.$ac_ext >&5
9865
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009868
9869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871
9872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009873# Binary search between lo and hi bounds.
9874while test "x$ac_lo" != "x$ac_hi"; do
9875 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* confdefs.h. */
9878_ACEOF
9879cat confdefs.h >>conftest.$ac_ext
9880cat >>conftest.$ac_ext <<_ACEOF
9881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009883 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009888test_array [0] = 0
9889
9890 ;
9891 return 0;
9892}
9893_ACEOF
9894rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895if { (ac_try="$ac_compile"
9896case "(($ac_try" in
9897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9898 *) ac_try_echo=$ac_try;;
9899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009903 grep -v '^ *+' conftest.er1 >conftest.err
9904 rm -f conftest.er1
9905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907 (exit $ac_status); } && {
9908 test -z "$ac_c_werror_flag" ||
9909 test ! -s conftest.err
9910 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_hi=$ac_mid
9912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009914sed 's/^/| /' conftest.$ac_ext >&5
9915
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009918
9919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009920done
9921case $ac_lo in
9922?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009925See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009926echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009927See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009928 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929 else
9930 ac_cv_sizeof_double=0
9931 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009932esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009933else
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* confdefs.h. */
9936_ACEOF
9937cat confdefs.h >>conftest.$ac_ext
9938cat >>conftest.$ac_ext <<_ACEOF
9939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009941 typedef double ac__type_sizeof_;
9942static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9943static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009944#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009945#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009946int
9947main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948{
Martin v. Löwis11437992002-04-12 09:54:03 +00009949
9950 FILE *f = fopen ("conftest.val", "w");
9951 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009952 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009953 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009958 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 }
9960 else
9961 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009963 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009965 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009966 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009968
9969 ;
9970 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009971}
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
9973rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974if { (ac_try="$ac_link"
9975case "(($ac_try" in
9976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9977 *) ac_try_echo=$ac_try;;
9978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009980 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984 { (case "(($ac_try" in
9985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9986 *) ac_try_echo=$ac_try;;
9987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009992 (exit $ac_status); }; }; then
9993 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009995 echo "$as_me: program exited with status $ac_status" >&5
9996echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009997sed 's/^/| /' conftest.$ac_ext >&5
9998
Martin v. Löwis11437992002-04-12 09:54:03 +00009999( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010000if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010001 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010002See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010003echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010004See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010005 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 else
10007 ac_cv_sizeof_double=0
10008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010rm -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 +000010011fi
10012rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010013fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010014{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10015echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016
10017
10018
Martin v. Löwis11437992002-04-12 09:54:03 +000010019cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010020#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010021_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010022
10023
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10025echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10026if test "${ac_cv_type_fpos_t+set}" = set; then
10027 echo $ECHO_N "(cached) $ECHO_C" >&6
10028else
10029 cat >conftest.$ac_ext <<_ACEOF
10030/* confdefs.h. */
10031_ACEOF
10032cat confdefs.h >>conftest.$ac_ext
10033cat >>conftest.$ac_ext <<_ACEOF
10034/* end confdefs.h. */
10035$ac_includes_default
10036typedef fpos_t ac__type_new_;
10037int
10038main ()
10039{
10040if ((ac__type_new_ *) 0)
10041 return 0;
10042if (sizeof (ac__type_new_))
10043 return 0;
10044 ;
10045 return 0;
10046}
10047_ACEOF
10048rm -f conftest.$ac_objext
10049if { (ac_try="$ac_compile"
10050case "(($ac_try" in
10051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10052 *) ac_try_echo=$ac_try;;
10053esac
10054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10055 (eval "$ac_compile") 2>conftest.er1
10056 ac_status=$?
10057 grep -v '^ *+' conftest.er1 >conftest.err
10058 rm -f conftest.er1
10059 cat conftest.err >&5
10060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10061 (exit $ac_status); } && {
10062 test -z "$ac_c_werror_flag" ||
10063 test ! -s conftest.err
10064 } && test -s conftest.$ac_objext; then
10065 ac_cv_type_fpos_t=yes
10066else
10067 echo "$as_me: failed program was:" >&5
10068sed 's/^/| /' conftest.$ac_ext >&5
10069
10070 ac_cv_type_fpos_t=no
10071fi
10072
10073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10074fi
10075{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10076echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10077
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078# The cast to long int works around a bug in the HP C Compiler
10079# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10080# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10081# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10083echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010084if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010086else
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 if test "$cross_compiling" = yes; then
10088 # Depending upon the size, compute the lo and hi bounds.
10089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010090/* confdefs.h. */
10091_ACEOF
10092cat confdefs.h >>conftest.$ac_ext
10093cat >>conftest.$ac_ext <<_ACEOF
10094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010095$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010097int
10098main ()
10099{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010100static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010101test_array [0] = 0
10102
10103 ;
10104 return 0;
10105}
10106_ACEOF
10107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108if { (ac_try="$ac_compile"
10109case "(($ac_try" in
10110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10111 *) ac_try_echo=$ac_try;;
10112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010116 grep -v '^ *+' conftest.er1 >conftest.err
10117 rm -f conftest.er1
10118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120 (exit $ac_status); } && {
10121 test -z "$ac_c_werror_flag" ||
10122 test ! -s conftest.err
10123 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 ac_lo=0 ac_mid=0
10125 while :; do
10126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010127/* confdefs.h. */
10128_ACEOF
10129cat confdefs.h >>conftest.$ac_ext
10130cat >>conftest.$ac_ext <<_ACEOF
10131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010132$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010133 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010134int
10135main ()
10136{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010137static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010138test_array [0] = 0
10139
10140 ;
10141 return 0;
10142}
10143_ACEOF
10144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145if { (ac_try="$ac_compile"
10146case "(($ac_try" in
10147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10148 *) ac_try_echo=$ac_try;;
10149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010153 grep -v '^ *+' conftest.er1 >conftest.err
10154 rm -f conftest.er1
10155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010157 (exit $ac_status); } && {
10158 test -z "$ac_c_werror_flag" ||
10159 test ! -s conftest.err
10160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010161 ac_hi=$ac_mid; break
10162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010164sed 's/^/| /' conftest.$ac_ext >&5
10165
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166 ac_lo=`expr $ac_mid + 1`
10167 if test $ac_lo -le $ac_mid; then
10168 ac_lo= ac_hi=
10169 break
10170 fi
10171 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173
10174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 done
10176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010178sed 's/^/| /' conftest.$ac_ext >&5
10179
Martin v. Löwiseba40652007-08-30 20:10:57 +000010180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* confdefs.h. */
10182_ACEOF
10183cat confdefs.h >>conftest.$ac_ext
10184cat >>conftest.$ac_ext <<_ACEOF
10185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010186$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010188int
10189main ()
10190{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010192test_array [0] = 0
10193
10194 ;
10195 return 0;
10196}
10197_ACEOF
10198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010199if { (ac_try="$ac_compile"
10200case "(($ac_try" in
10201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10202 *) ac_try_echo=$ac_try;;
10203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010207 grep -v '^ *+' conftest.er1 >conftest.err
10208 rm -f conftest.er1
10209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211 (exit $ac_status); } && {
10212 test -z "$ac_c_werror_flag" ||
10213 test ! -s conftest.err
10214 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 ac_hi=-1 ac_mid=-1
10216 while :; do
10217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010218/* confdefs.h. */
10219_ACEOF
10220cat confdefs.h >>conftest.$ac_ext
10221cat >>conftest.$ac_ext <<_ACEOF
10222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010223$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010224 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
10226main ()
10227{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010228static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010229test_array [0] = 0
10230
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236if { (ac_try="$ac_compile"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010244 grep -v '^ *+' conftest.er1 >conftest.err
10245 rm -f conftest.er1
10246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010248 (exit $ac_status); } && {
10249 test -z "$ac_c_werror_flag" ||
10250 test ! -s conftest.err
10251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_lo=$ac_mid; break
10253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010255sed 's/^/| /' conftest.$ac_ext >&5
10256
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257 ac_hi=`expr '(' $ac_mid ')' - 1`
10258 if test $ac_mid -le $ac_hi; then
10259 ac_lo= ac_hi=
10260 break
10261 fi
10262 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264
10265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 done
10267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010269sed 's/^/| /' conftest.$ac_ext >&5
10270
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273
10274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276
10277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010278# Binary search between lo and hi bounds.
10279while test "x$ac_lo" != "x$ac_hi"; do
10280 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010287$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010289int
10290main ()
10291{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010293test_array [0] = 0
10294
10295 ;
10296 return 0;
10297}
10298_ACEOF
10299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300if { (ac_try="$ac_compile"
10301case "(($ac_try" in
10302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10303 *) ac_try_echo=$ac_try;;
10304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010308 grep -v '^ *+' conftest.er1 >conftest.err
10309 rm -f conftest.er1
10310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312 (exit $ac_status); } && {
10313 test -z "$ac_c_werror_flag" ||
10314 test ! -s conftest.err
10315 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ac_hi=$ac_mid
10317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010319sed 's/^/| /' conftest.$ac_ext >&5
10320
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010323
10324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010325done
10326case $ac_lo in
10327?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010328'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010330See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010331echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010332See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010333 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334 else
10335 ac_cv_sizeof_fpos_t=0
10336 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010337esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010338else
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010340/* confdefs.h. */
10341_ACEOF
10342cat confdefs.h >>conftest.$ac_ext
10343cat >>conftest.$ac_ext <<_ACEOF
10344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010345$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010346 typedef fpos_t ac__type_sizeof_;
10347static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10348static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010349#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010350#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010351int
10352main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353{
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
10355 FILE *f = fopen ("conftest.val", "w");
10356 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010357 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010358 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010359 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010360 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010361 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010362 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010363 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 }
10365 else
10366 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010368 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010369 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010370 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010373
10374 ;
10375 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010376}
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
10378rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379if { (ac_try="$ac_link"
10380case "(($ac_try" in
10381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10382 *) ac_try_echo=$ac_try;;
10383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010389 { (case "(($ac_try" in
10390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10391 *) ac_try_echo=$ac_try;;
10392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010395 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 (exit $ac_status); }; }; then
10398 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010400 echo "$as_me: program exited with status $ac_status" >&5
10401echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010402sed 's/^/| /' conftest.$ac_ext >&5
10403
Martin v. Löwis11437992002-04-12 09:54:03 +000010404( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010405if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010406 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010407See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010408echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010409See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010410 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411 else
10412 ac_cv_sizeof_fpos_t=0
10413 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010415rm -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 +000010416fi
10417rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010418fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010419{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10420echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010421
10422
10423
Martin v. Löwis11437992002-04-12 09:54:03 +000010424cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010425#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010426_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010427
Michael W. Hudson54241132001-12-07 15:38:26 +000010428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429{ echo "$as_me:$LINENO: checking for size_t" >&5
10430echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10431if test "${ac_cv_type_size_t+set}" = set; then
10432 echo $ECHO_N "(cached) $ECHO_C" >&6
10433else
10434 cat >conftest.$ac_ext <<_ACEOF
10435/* confdefs.h. */
10436_ACEOF
10437cat confdefs.h >>conftest.$ac_ext
10438cat >>conftest.$ac_ext <<_ACEOF
10439/* end confdefs.h. */
10440$ac_includes_default
10441typedef size_t ac__type_new_;
10442int
10443main ()
10444{
10445if ((ac__type_new_ *) 0)
10446 return 0;
10447if (sizeof (ac__type_new_))
10448 return 0;
10449 ;
10450 return 0;
10451}
10452_ACEOF
10453rm -f conftest.$ac_objext
10454if { (ac_try="$ac_compile"
10455case "(($ac_try" in
10456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10457 *) ac_try_echo=$ac_try;;
10458esac
10459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10460 (eval "$ac_compile") 2>conftest.er1
10461 ac_status=$?
10462 grep -v '^ *+' conftest.er1 >conftest.err
10463 rm -f conftest.er1
10464 cat conftest.err >&5
10465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10466 (exit $ac_status); } && {
10467 test -z "$ac_c_werror_flag" ||
10468 test ! -s conftest.err
10469 } && test -s conftest.$ac_objext; then
10470 ac_cv_type_size_t=yes
10471else
10472 echo "$as_me: failed program was:" >&5
10473sed 's/^/| /' conftest.$ac_ext >&5
10474
10475 ac_cv_type_size_t=no
10476fi
10477
10478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10479fi
10480{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10481echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10482
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483# The cast to long int works around a bug in the HP C Compiler
10484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10486# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010487{ echo "$as_me:$LINENO: checking size of size_t" >&5
10488echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010489if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010490 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010492 if test "$cross_compiling" = yes; then
10493 # Depending upon the size, compute the lo and hi bounds.
10494cat >conftest.$ac_ext <<_ACEOF
10495/* confdefs.h. */
10496_ACEOF
10497cat confdefs.h >>conftest.$ac_ext
10498cat >>conftest.$ac_ext <<_ACEOF
10499/* end confdefs.h. */
10500$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010501 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502int
10503main ()
10504{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506test_array [0] = 0
10507
10508 ;
10509 return 0;
10510}
10511_ACEOF
10512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513if { (ac_try="$ac_compile"
10514case "(($ac_try" in
10515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10516 *) ac_try_echo=$ac_try;;
10517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010520 ac_status=$?
10521 grep -v '^ *+' conftest.er1 >conftest.err
10522 rm -f conftest.er1
10523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525 (exit $ac_status); } && {
10526 test -z "$ac_c_werror_flag" ||
10527 test ! -s conftest.err
10528 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529 ac_lo=0 ac_mid=0
10530 while :; do
10531 cat >conftest.$ac_ext <<_ACEOF
10532/* confdefs.h. */
10533_ACEOF
10534cat confdefs.h >>conftest.$ac_ext
10535cat >>conftest.$ac_ext <<_ACEOF
10536/* end confdefs.h. */
10537$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010538 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539int
10540main ()
10541{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543test_array [0] = 0
10544
10545 ;
10546 return 0;
10547}
10548_ACEOF
10549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550if { (ac_try="$ac_compile"
10551case "(($ac_try" in
10552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10553 *) ac_try_echo=$ac_try;;
10554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010557 ac_status=$?
10558 grep -v '^ *+' conftest.er1 >conftest.err
10559 rm -f conftest.er1
10560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010562 (exit $ac_status); } && {
10563 test -z "$ac_c_werror_flag" ||
10564 test ! -s conftest.err
10565 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010566 ac_hi=$ac_mid; break
10567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010568 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569sed 's/^/| /' conftest.$ac_ext >&5
10570
Martin v. Löwiseba40652007-08-30 20:10:57 +000010571 ac_lo=`expr $ac_mid + 1`
10572 if test $ac_lo -le $ac_mid; then
10573 ac_lo= ac_hi=
10574 break
10575 fi
10576 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578
10579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010580 done
10581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010582 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583sed 's/^/| /' conftest.$ac_ext >&5
10584
Martin v. Löwiseba40652007-08-30 20:10:57 +000010585 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010586/* confdefs.h. */
10587_ACEOF
10588cat confdefs.h >>conftest.$ac_ext
10589cat >>conftest.$ac_ext <<_ACEOF
10590/* end confdefs.h. */
10591$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593int
10594main ()
10595{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010596static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597test_array [0] = 0
10598
10599 ;
10600 return 0;
10601}
10602_ACEOF
10603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010604if { (ac_try="$ac_compile"
10605case "(($ac_try" in
10606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10607 *) ac_try_echo=$ac_try;;
10608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611 ac_status=$?
10612 grep -v '^ *+' conftest.er1 >conftest.err
10613 rm -f conftest.er1
10614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010616 (exit $ac_status); } && {
10617 test -z "$ac_c_werror_flag" ||
10618 test ! -s conftest.err
10619 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620 ac_hi=-1 ac_mid=-1
10621 while :; do
10622 cat >conftest.$ac_ext <<_ACEOF
10623/* confdefs.h. */
10624_ACEOF
10625cat confdefs.h >>conftest.$ac_ext
10626cat >>conftest.$ac_ext <<_ACEOF
10627/* end confdefs.h. */
10628$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010629 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630int
10631main ()
10632{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010633static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010634test_array [0] = 0
10635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010641if { (ac_try="$ac_compile"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 ac_status=$?
10649 grep -v '^ *+' conftest.er1 >conftest.err
10650 rm -f conftest.er1
10651 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010653 (exit $ac_status); } && {
10654 test -z "$ac_c_werror_flag" ||
10655 test ! -s conftest.err
10656 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 ac_lo=$ac_mid; break
10658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010659 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660sed 's/^/| /' conftest.$ac_ext >&5
10661
Martin v. Löwiseba40652007-08-30 20:10:57 +000010662 ac_hi=`expr '(' $ac_mid ')' - 1`
10663 if test $ac_mid -le $ac_hi; then
10664 ac_lo= ac_hi=
10665 break
10666 fi
10667 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669
10670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671 done
10672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010673 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674sed 's/^/| /' conftest.$ac_ext >&5
10675
Martin v. Löwiseba40652007-08-30 20:10:57 +000010676 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678
10679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010681
10682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683# Binary search between lo and hi bounds.
10684while test "x$ac_lo" != "x$ac_hi"; do
10685 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10686 cat >conftest.$ac_ext <<_ACEOF
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
10692$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010693 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694int
10695main ()
10696{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010698test_array [0] = 0
10699
10700 ;
10701 return 0;
10702}
10703_ACEOF
10704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705if { (ac_try="$ac_compile"
10706case "(($ac_try" in
10707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10708 *) ac_try_echo=$ac_try;;
10709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712 ac_status=$?
10713 grep -v '^ *+' conftest.er1 >conftest.err
10714 rm -f conftest.er1
10715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717 (exit $ac_status); } && {
10718 test -z "$ac_c_werror_flag" ||
10719 test ! -s conftest.err
10720 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 ac_hi=$ac_mid
10722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010723 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724sed 's/^/| /' conftest.$ac_ext >&5
10725
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010728
10729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730done
10731case $ac_lo in
10732?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010736echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739 else
10740 ac_cv_sizeof_size_t=0
10741 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742esac
10743else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744 cat >conftest.$ac_ext <<_ACEOF
10745/* confdefs.h. */
10746_ACEOF
10747cat confdefs.h >>conftest.$ac_ext
10748cat >>conftest.$ac_ext <<_ACEOF
10749/* end confdefs.h. */
10750$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010751 typedef size_t ac__type_sizeof_;
10752static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10753static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754#include <stdio.h>
10755#include <stdlib.h>
10756int
10757main ()
10758{
10759
10760 FILE *f = fopen ("conftest.val", "w");
10761 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010763 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010764 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010765 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010767 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010768 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010769 }
10770 else
10771 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010773 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010774 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010775 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010776 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010778
10779 ;
10780 return 0;
10781}
10782_ACEOF
10783rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010784if { (ac_try="$ac_link"
10785case "(($ac_try" in
10786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10787 *) ac_try_echo=$ac_try;;
10788esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010790 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010791 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794 { (case "(($ac_try" in
10795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10796 *) ac_try_echo=$ac_try;;
10797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010800 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010802 (exit $ac_status); }; }; then
10803 ac_cv_sizeof_size_t=`cat conftest.val`
10804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010805 echo "$as_me: program exited with status $ac_status" >&5
10806echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010807sed 's/^/| /' conftest.$ac_ext >&5
10808
10809( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010811 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010813echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010814See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010815 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816 else
10817 ac_cv_sizeof_size_t=0
10818 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820rm -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 +000010821fi
10822rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010823fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010824{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10825echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826
10827
10828
Martin v. Löwis18e16552006-02-15 17:27:45 +000010829cat >>confdefs.h <<_ACEOF
10830#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10831_ACEOF
10832
10833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834{ echo "$as_me:$LINENO: checking for pid_t" >&5
10835echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10836if test "${ac_cv_type_pid_t+set}" = set; then
10837 echo $ECHO_N "(cached) $ECHO_C" >&6
10838else
10839 cat >conftest.$ac_ext <<_ACEOF
10840/* confdefs.h. */
10841_ACEOF
10842cat confdefs.h >>conftest.$ac_ext
10843cat >>conftest.$ac_ext <<_ACEOF
10844/* end confdefs.h. */
10845$ac_includes_default
10846typedef pid_t ac__type_new_;
10847int
10848main ()
10849{
10850if ((ac__type_new_ *) 0)
10851 return 0;
10852if (sizeof (ac__type_new_))
10853 return 0;
10854 ;
10855 return 0;
10856}
10857_ACEOF
10858rm -f conftest.$ac_objext
10859if { (ac_try="$ac_compile"
10860case "(($ac_try" in
10861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10862 *) ac_try_echo=$ac_try;;
10863esac
10864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10865 (eval "$ac_compile") 2>conftest.er1
10866 ac_status=$?
10867 grep -v '^ *+' conftest.er1 >conftest.err
10868 rm -f conftest.er1
10869 cat conftest.err >&5
10870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10871 (exit $ac_status); } && {
10872 test -z "$ac_c_werror_flag" ||
10873 test ! -s conftest.err
10874 } && test -s conftest.$ac_objext; then
10875 ac_cv_type_pid_t=yes
10876else
10877 echo "$as_me: failed program was:" >&5
10878sed 's/^/| /' conftest.$ac_ext >&5
10879
10880 ac_cv_type_pid_t=no
10881fi
10882
10883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10884fi
10885{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10886echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10887
Christian Heimes951cc0f2008-01-31 23:08:23 +000010888# The cast to long int works around a bug in the HP C Compiler
10889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10891# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010892{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10893echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010894if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010895 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010896else
10897 if test "$cross_compiling" = yes; then
10898 # Depending upon the size, compute the lo and hi bounds.
10899cat >conftest.$ac_ext <<_ACEOF
10900/* confdefs.h. */
10901_ACEOF
10902cat confdefs.h >>conftest.$ac_ext
10903cat >>conftest.$ac_ext <<_ACEOF
10904/* end confdefs.h. */
10905$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010906 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010907int
10908main ()
10909{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010910static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010911test_array [0] = 0
10912
10913 ;
10914 return 0;
10915}
10916_ACEOF
10917rm -f conftest.$ac_objext
10918if { (ac_try="$ac_compile"
10919case "(($ac_try" in
10920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10921 *) ac_try_echo=$ac_try;;
10922esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010924 (eval "$ac_compile") 2>conftest.er1
10925 ac_status=$?
10926 grep -v '^ *+' conftest.er1 >conftest.err
10927 rm -f conftest.er1
10928 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930 (exit $ac_status); } && {
10931 test -z "$ac_c_werror_flag" ||
10932 test ! -s conftest.err
10933 } && test -s conftest.$ac_objext; then
10934 ac_lo=0 ac_mid=0
10935 while :; do
10936 cat >conftest.$ac_ext <<_ACEOF
10937/* confdefs.h. */
10938_ACEOF
10939cat confdefs.h >>conftest.$ac_ext
10940cat >>conftest.$ac_ext <<_ACEOF
10941/* end confdefs.h. */
10942$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010943 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010944int
10945main ()
10946{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010948test_array [0] = 0
10949
10950 ;
10951 return 0;
10952}
10953_ACEOF
10954rm -f conftest.$ac_objext
10955if { (ac_try="$ac_compile"
10956case "(($ac_try" in
10957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10958 *) ac_try_echo=$ac_try;;
10959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010961 (eval "$ac_compile") 2>conftest.er1
10962 ac_status=$?
10963 grep -v '^ *+' conftest.er1 >conftest.err
10964 rm -f conftest.er1
10965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967 (exit $ac_status); } && {
10968 test -z "$ac_c_werror_flag" ||
10969 test ! -s conftest.err
10970 } && test -s conftest.$ac_objext; then
10971 ac_hi=$ac_mid; break
10972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010973 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010974sed 's/^/| /' conftest.$ac_ext >&5
10975
10976 ac_lo=`expr $ac_mid + 1`
10977 if test $ac_lo -le $ac_mid; then
10978 ac_lo= ac_hi=
10979 break
10980 fi
10981 ac_mid=`expr 2 '*' $ac_mid + 1`
10982fi
10983
10984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10985 done
10986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010987 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010988sed 's/^/| /' conftest.$ac_ext >&5
10989
10990 cat >conftest.$ac_ext <<_ACEOF
10991/* confdefs.h. */
10992_ACEOF
10993cat confdefs.h >>conftest.$ac_ext
10994cat >>conftest.$ac_ext <<_ACEOF
10995/* end confdefs.h. */
10996$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998int
10999main ()
11000{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011001static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011002test_array [0] = 0
11003
11004 ;
11005 return 0;
11006}
11007_ACEOF
11008rm -f conftest.$ac_objext
11009if { (ac_try="$ac_compile"
11010case "(($ac_try" in
11011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11012 *) ac_try_echo=$ac_try;;
11013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011015 (eval "$ac_compile") 2>conftest.er1
11016 ac_status=$?
11017 grep -v '^ *+' conftest.er1 >conftest.err
11018 rm -f conftest.er1
11019 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011021 (exit $ac_status); } && {
11022 test -z "$ac_c_werror_flag" ||
11023 test ! -s conftest.err
11024 } && test -s conftest.$ac_objext; then
11025 ac_hi=-1 ac_mid=-1
11026 while :; do
11027 cat >conftest.$ac_ext <<_ACEOF
11028/* confdefs.h. */
11029_ACEOF
11030cat confdefs.h >>conftest.$ac_ext
11031cat >>conftest.$ac_ext <<_ACEOF
11032/* end confdefs.h. */
11033$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011034 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035int
11036main ()
11037{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011038static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011039test_array [0] = 0
11040
11041 ;
11042 return 0;
11043}
11044_ACEOF
11045rm -f conftest.$ac_objext
11046if { (ac_try="$ac_compile"
11047case "(($ac_try" in
11048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11049 *) ac_try_echo=$ac_try;;
11050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011052 (eval "$ac_compile") 2>conftest.er1
11053 ac_status=$?
11054 grep -v '^ *+' conftest.er1 >conftest.err
11055 rm -f conftest.er1
11056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011058 (exit $ac_status); } && {
11059 test -z "$ac_c_werror_flag" ||
11060 test ! -s conftest.err
11061 } && test -s conftest.$ac_objext; then
11062 ac_lo=$ac_mid; break
11063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011064 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011065sed 's/^/| /' conftest.$ac_ext >&5
11066
11067 ac_hi=`expr '(' $ac_mid ')' - 1`
11068 if test $ac_mid -le $ac_hi; then
11069 ac_lo= ac_hi=
11070 break
11071 fi
11072 ac_mid=`expr 2 '*' $ac_mid`
11073fi
11074
11075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11076 done
11077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011078 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011079sed 's/^/| /' conftest.$ac_ext >&5
11080
11081 ac_lo= ac_hi=
11082fi
11083
11084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11085fi
11086
11087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11088# Binary search between lo and hi bounds.
11089while test "x$ac_lo" != "x$ac_hi"; do
11090 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11091 cat >conftest.$ac_ext <<_ACEOF
11092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
11096/* end confdefs.h. */
11097$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011098 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011099int
11100main ()
11101{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011103test_array [0] = 0
11104
11105 ;
11106 return 0;
11107}
11108_ACEOF
11109rm -f conftest.$ac_objext
11110if { (ac_try="$ac_compile"
11111case "(($ac_try" in
11112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11113 *) ac_try_echo=$ac_try;;
11114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011116 (eval "$ac_compile") 2>conftest.er1
11117 ac_status=$?
11118 grep -v '^ *+' conftest.er1 >conftest.err
11119 rm -f conftest.er1
11120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011122 (exit $ac_status); } && {
11123 test -z "$ac_c_werror_flag" ||
11124 test ! -s conftest.err
11125 } && test -s conftest.$ac_objext; then
11126 ac_hi=$ac_mid
11127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011129sed 's/^/| /' conftest.$ac_ext >&5
11130
11131 ac_lo=`expr '(' $ac_mid ')' + 1`
11132fi
11133
11134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11135done
11136case $ac_lo in
11137?*) ac_cv_sizeof_pid_t=$ac_lo;;
11138'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011141echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011142See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011143 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011144 else
11145 ac_cv_sizeof_pid_t=0
11146 fi ;;
11147esac
11148else
11149 cat >conftest.$ac_ext <<_ACEOF
11150/* confdefs.h. */
11151_ACEOF
11152cat confdefs.h >>conftest.$ac_ext
11153cat >>conftest.$ac_ext <<_ACEOF
11154/* end confdefs.h. */
11155$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011156 typedef pid_t ac__type_sizeof_;
11157static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11158static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011159#include <stdio.h>
11160#include <stdlib.h>
11161int
11162main ()
11163{
11164
11165 FILE *f = fopen ("conftest.val", "w");
11166 if (! f)
11167 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011168 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011169 {
11170 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011171 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011172 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011173 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011174 }
11175 else
11176 {
11177 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011178 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011179 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011180 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011181 }
11182 return ferror (f) || fclose (f) != 0;
11183
11184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest$ac_exeext
11189if { (ac_try="$ac_link"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011195 (eval "$ac_link") 2>&5
11196 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11199 { (case "(($ac_try" in
11200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11201 *) ac_try_echo=$ac_try;;
11202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011204 (eval "$ac_try") 2>&5
11205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011207 (exit $ac_status); }; }; then
11208 ac_cv_sizeof_pid_t=`cat conftest.val`
11209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011210 echo "$as_me: program exited with status $ac_status" >&5
11211echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011212sed 's/^/| /' conftest.$ac_ext >&5
11213
11214( exit $ac_status )
11215if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011216 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011217See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011218echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011219See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011220 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011221 else
11222 ac_cv_sizeof_pid_t=0
11223 fi
11224fi
11225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11226fi
11227rm -f conftest.val
11228fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011229{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11230echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011231
11232
11233
11234cat >>confdefs.h <<_ACEOF
11235#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11236_ACEOF
11237
11238
Michael W. Hudson54241132001-12-07 15:38:26 +000011239
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011240{ echo "$as_me:$LINENO: checking for long long support" >&5
11241echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011242have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250int
11251main ()
11252{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011253long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ;
11255 return 0;
11256}
11257_ACEOF
11258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011259if { (ac_try="$ac_compile"
11260case "(($ac_try" in
11261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11262 *) ac_try_echo=$ac_try;;
11263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011267 grep -v '^ *+' conftest.er1 >conftest.err
11268 rm -f conftest.er1
11269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271 (exit $ac_status); } && {
11272 test -z "$ac_c_werror_flag" ||
11273 test ! -s conftest.err
11274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
11276
11277cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011278#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011279_ACEOF
11280
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011281 have_long_long=yes
11282
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011285sed 's/^/| /' conftest.$ac_ext >&5
11286
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289
11290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011291{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11292echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011293if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294{ echo "$as_me:$LINENO: checking for long long" >&5
11295echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11296if test "${ac_cv_type_long_long+set}" = set; then
11297 echo $ECHO_N "(cached) $ECHO_C" >&6
11298else
11299 cat >conftest.$ac_ext <<_ACEOF
11300/* confdefs.h. */
11301_ACEOF
11302cat confdefs.h >>conftest.$ac_ext
11303cat >>conftest.$ac_ext <<_ACEOF
11304/* end confdefs.h. */
11305$ac_includes_default
11306typedef long long ac__type_new_;
11307int
11308main ()
11309{
11310if ((ac__type_new_ *) 0)
11311 return 0;
11312if (sizeof (ac__type_new_))
11313 return 0;
11314 ;
11315 return 0;
11316}
11317_ACEOF
11318rm -f conftest.$ac_objext
11319if { (ac_try="$ac_compile"
11320case "(($ac_try" in
11321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11322 *) ac_try_echo=$ac_try;;
11323esac
11324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11325 (eval "$ac_compile") 2>conftest.er1
11326 ac_status=$?
11327 grep -v '^ *+' conftest.er1 >conftest.err
11328 rm -f conftest.er1
11329 cat conftest.err >&5
11330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11331 (exit $ac_status); } && {
11332 test -z "$ac_c_werror_flag" ||
11333 test ! -s conftest.err
11334 } && test -s conftest.$ac_objext; then
11335 ac_cv_type_long_long=yes
11336else
11337 echo "$as_me: failed program was:" >&5
11338sed 's/^/| /' conftest.$ac_ext >&5
11339
11340 ac_cv_type_long_long=no
11341fi
11342
11343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11344fi
11345{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11346echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11347
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348# The cast to long int works around a bug in the HP C Compiler
11349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11351# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011352{ echo "$as_me:$LINENO: checking size of long long" >&5
11353echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011354if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011356else
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 if test "$cross_compiling" = yes; then
11358 # Depending upon the size, compute the lo and hi bounds.
11359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* confdefs.h. */
11361_ACEOF
11362cat confdefs.h >>conftest.$ac_ext
11363cat >>conftest.$ac_ext <<_ACEOF
11364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011365$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011366 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011367int
11368main ()
11369{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011371test_array [0] = 0
11372
11373 ;
11374 return 0;
11375}
11376_ACEOF
11377rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378if { (ac_try="$ac_compile"
11379case "(($ac_try" in
11380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11381 *) ac_try_echo=$ac_try;;
11382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011386 grep -v '^ *+' conftest.er1 >conftest.err
11387 rm -f conftest.er1
11388 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011390 (exit $ac_status); } && {
11391 test -z "$ac_c_werror_flag" ||
11392 test ! -s conftest.err
11393 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ac_lo=0 ac_mid=0
11395 while :; do
11396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* confdefs.h. */
11398_ACEOF
11399cat confdefs.h >>conftest.$ac_ext
11400cat >>conftest.$ac_ext <<_ACEOF
11401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011402$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011403 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011404int
11405main ()
11406{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011408test_array [0] = 0
11409
11410 ;
11411 return 0;
11412}
11413_ACEOF
11414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415if { (ac_try="$ac_compile"
11416case "(($ac_try" in
11417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11418 *) ac_try_echo=$ac_try;;
11419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011423 grep -v '^ *+' conftest.er1 >conftest.err
11424 rm -f conftest.er1
11425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011427 (exit $ac_status); } && {
11428 test -z "$ac_c_werror_flag" ||
11429 test ! -s conftest.err
11430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ac_hi=$ac_mid; break
11432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011434sed 's/^/| /' conftest.$ac_ext >&5
11435
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436 ac_lo=`expr $ac_mid + 1`
11437 if test $ac_lo -le $ac_mid; then
11438 ac_lo= ac_hi=
11439 break
11440 fi
11441 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443
11444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011445 done
11446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011448sed 's/^/| /' conftest.$ac_ext >&5
11449
Martin v. Löwiseba40652007-08-30 20:10:57 +000011450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011451/* confdefs.h. */
11452_ACEOF
11453cat confdefs.h >>conftest.$ac_ext
11454cat >>conftest.$ac_ext <<_ACEOF
11455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011456$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011458int
11459main ()
11460{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011462test_array [0] = 0
11463
11464 ;
11465 return 0;
11466}
11467_ACEOF
11468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469if { (ac_try="$ac_compile"
11470case "(($ac_try" in
11471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11472 *) ac_try_echo=$ac_try;;
11473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011477 grep -v '^ *+' conftest.er1 >conftest.err
11478 rm -f conftest.er1
11479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011481 (exit $ac_status); } && {
11482 test -z "$ac_c_werror_flag" ||
11483 test ! -s conftest.err
11484 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 ac_hi=-1 ac_mid=-1
11486 while :; do
11487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011488/* confdefs.h. */
11489_ACEOF
11490cat confdefs.h >>conftest.$ac_ext
11491cat >>conftest.$ac_ext <<_ACEOF
11492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011493$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011494 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011495int
11496main ()
11497{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011499test_array [0] = 0
11500
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011506if { (ac_try="$ac_compile"
11507case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011514 grep -v '^ *+' conftest.er1 >conftest.err
11515 rm -f conftest.er1
11516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518 (exit $ac_status); } && {
11519 test -z "$ac_c_werror_flag" ||
11520 test ! -s conftest.err
11521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ac_lo=$ac_mid; break
11523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011525sed 's/^/| /' conftest.$ac_ext >&5
11526
Martin v. Löwiseba40652007-08-30 20:10:57 +000011527 ac_hi=`expr '(' $ac_mid ')' - 1`
11528 if test $ac_mid -le $ac_hi; then
11529 ac_lo= ac_hi=
11530 break
11531 fi
11532 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534
11535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 done
11537else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011539sed 's/^/| /' conftest.$ac_ext >&5
11540
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543
11544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546
11547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011548# Binary search between lo and hi bounds.
11549while test "x$ac_lo" != "x$ac_hi"; do
11550 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* confdefs.h. */
11553_ACEOF
11554cat confdefs.h >>conftest.$ac_ext
11555cat >>conftest.$ac_ext <<_ACEOF
11556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011557$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011558 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011559int
11560main ()
11561{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011563test_array [0] = 0
11564
11565 ;
11566 return 0;
11567}
11568_ACEOF
11569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570if { (ac_try="$ac_compile"
11571case "(($ac_try" in
11572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11573 *) ac_try_echo=$ac_try;;
11574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011578 grep -v '^ *+' conftest.er1 >conftest.err
11579 rm -f conftest.er1
11580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582 (exit $ac_status); } && {
11583 test -z "$ac_c_werror_flag" ||
11584 test ! -s conftest.err
11585 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_hi=$ac_mid
11587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011589sed 's/^/| /' conftest.$ac_ext >&5
11590
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593
11594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011595done
11596case $ac_lo in
11597?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011600See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011601echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011602See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011603 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604 else
11605 ac_cv_sizeof_long_long=0
11606 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011607esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011608else
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011610/* confdefs.h. */
11611_ACEOF
11612cat confdefs.h >>conftest.$ac_ext
11613cat >>conftest.$ac_ext <<_ACEOF
11614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011615$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011616 typedef long long ac__type_sizeof_;
11617static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11618static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011619#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011620#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011621int
11622main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623{
Martin v. Löwis11437992002-04-12 09:54:03 +000011624
11625 FILE *f = fopen ("conftest.val", "w");
11626 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011627 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011628 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011630 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011631 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011633 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 }
11635 else
11636 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011638 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011639 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011640 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011641 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011643
11644 ;
11645 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011646}
Martin v. Löwis11437992002-04-12 09:54:03 +000011647_ACEOF
11648rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649if { (ac_try="$ac_link"
11650case "(($ac_try" in
11651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11652 *) ac_try_echo=$ac_try;;
11653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011659 { (case "(($ac_try" in
11660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11661 *) ac_try_echo=$ac_try;;
11662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011664 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 (exit $ac_status); }; }; then
11668 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011670 echo "$as_me: program exited with status $ac_status" >&5
11671echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011672sed 's/^/| /' conftest.$ac_ext >&5
11673
Martin v. Löwis11437992002-04-12 09:54:03 +000011674( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011675if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011676 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011677See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011679See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011680 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011681 else
11682 ac_cv_sizeof_long_long=0
11683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011685rm -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 +000011686fi
11687rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011688fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011689{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11690echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011691
11692
11693
Martin v. Löwis11437992002-04-12 09:54:03 +000011694cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011695#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011696_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011697
Michael W. Hudson54241132001-12-07 15:38:26 +000011698
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011699fi
11700
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011701{ echo "$as_me:$LINENO: checking for long double support" >&5
11702echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011703have_long_double=no
11704cat >conftest.$ac_ext <<_ACEOF
11705/* confdefs.h. */
11706_ACEOF
11707cat confdefs.h >>conftest.$ac_ext
11708cat >>conftest.$ac_ext <<_ACEOF
11709/* end confdefs.h. */
11710
11711int
11712main ()
11713{
11714long double x; x = (long double)0.;
11715 ;
11716 return 0;
11717}
11718_ACEOF
11719rm -f conftest.$ac_objext
11720if { (ac_try="$ac_compile"
11721case "(($ac_try" in
11722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11723 *) ac_try_echo=$ac_try;;
11724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011726 (eval "$ac_compile") 2>conftest.er1
11727 ac_status=$?
11728 grep -v '^ *+' conftest.er1 >conftest.err
11729 rm -f conftest.er1
11730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011732 (exit $ac_status); } && {
11733 test -z "$ac_c_werror_flag" ||
11734 test ! -s conftest.err
11735 } && test -s conftest.$ac_objext; then
11736
11737
11738cat >>confdefs.h <<\_ACEOF
11739#define HAVE_LONG_DOUBLE 1
11740_ACEOF
11741
11742 have_long_double=yes
11743
11744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011746sed 's/^/| /' conftest.$ac_ext >&5
11747
11748
11749fi
11750
11751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011752{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11753echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011754if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755{ echo "$as_me:$LINENO: checking for long double" >&5
11756echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11757if test "${ac_cv_type_long_double+set}" = set; then
11758 echo $ECHO_N "(cached) $ECHO_C" >&6
11759else
11760 cat >conftest.$ac_ext <<_ACEOF
11761/* confdefs.h. */
11762_ACEOF
11763cat confdefs.h >>conftest.$ac_ext
11764cat >>conftest.$ac_ext <<_ACEOF
11765/* end confdefs.h. */
11766$ac_includes_default
11767typedef long double ac__type_new_;
11768int
11769main ()
11770{
11771if ((ac__type_new_ *) 0)
11772 return 0;
11773if (sizeof (ac__type_new_))
11774 return 0;
11775 ;
11776 return 0;
11777}
11778_ACEOF
11779rm -f conftest.$ac_objext
11780if { (ac_try="$ac_compile"
11781case "(($ac_try" in
11782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11783 *) ac_try_echo=$ac_try;;
11784esac
11785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11786 (eval "$ac_compile") 2>conftest.er1
11787 ac_status=$?
11788 grep -v '^ *+' conftest.er1 >conftest.err
11789 rm -f conftest.er1
11790 cat conftest.err >&5
11791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11792 (exit $ac_status); } && {
11793 test -z "$ac_c_werror_flag" ||
11794 test ! -s conftest.err
11795 } && test -s conftest.$ac_objext; then
11796 ac_cv_type_long_double=yes
11797else
11798 echo "$as_me: failed program was:" >&5
11799sed 's/^/| /' conftest.$ac_ext >&5
11800
11801 ac_cv_type_long_double=no
11802fi
11803
11804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11805fi
11806{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11807echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11808
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011809# The cast to long int works around a bug in the HP C Compiler
11810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11812# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011813{ echo "$as_me:$LINENO: checking size of long double" >&5
11814echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011815if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011816 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011817else
11818 if test "$cross_compiling" = yes; then
11819 # Depending upon the size, compute the lo and hi bounds.
11820cat >conftest.$ac_ext <<_ACEOF
11821/* confdefs.h. */
11822_ACEOF
11823cat confdefs.h >>conftest.$ac_ext
11824cat >>conftest.$ac_ext <<_ACEOF
11825/* end confdefs.h. */
11826$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011827 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011828int
11829main ()
11830{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011832test_array [0] = 0
11833
11834 ;
11835 return 0;
11836}
11837_ACEOF
11838rm -f conftest.$ac_objext
11839if { (ac_try="$ac_compile"
11840case "(($ac_try" in
11841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11842 *) ac_try_echo=$ac_try;;
11843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011845 (eval "$ac_compile") 2>conftest.er1
11846 ac_status=$?
11847 grep -v '^ *+' conftest.er1 >conftest.err
11848 rm -f conftest.er1
11849 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851 (exit $ac_status); } && {
11852 test -z "$ac_c_werror_flag" ||
11853 test ! -s conftest.err
11854 } && test -s conftest.$ac_objext; then
11855 ac_lo=0 ac_mid=0
11856 while :; do
11857 cat >conftest.$ac_ext <<_ACEOF
11858/* confdefs.h. */
11859_ACEOF
11860cat confdefs.h >>conftest.$ac_ext
11861cat >>conftest.$ac_ext <<_ACEOF
11862/* end confdefs.h. */
11863$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011864 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011865int
11866main ()
11867{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011868static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011869test_array [0] = 0
11870
11871 ;
11872 return 0;
11873}
11874_ACEOF
11875rm -f conftest.$ac_objext
11876if { (ac_try="$ac_compile"
11877case "(($ac_try" in
11878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11879 *) ac_try_echo=$ac_try;;
11880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011882 (eval "$ac_compile") 2>conftest.er1
11883 ac_status=$?
11884 grep -v '^ *+' conftest.er1 >conftest.err
11885 rm -f conftest.er1
11886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888 (exit $ac_status); } && {
11889 test -z "$ac_c_werror_flag" ||
11890 test ! -s conftest.err
11891 } && test -s conftest.$ac_objext; then
11892 ac_hi=$ac_mid; break
11893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011894 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011895sed 's/^/| /' conftest.$ac_ext >&5
11896
11897 ac_lo=`expr $ac_mid + 1`
11898 if test $ac_lo -le $ac_mid; then
11899 ac_lo= ac_hi=
11900 break
11901 fi
11902 ac_mid=`expr 2 '*' $ac_mid + 1`
11903fi
11904
11905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11906 done
11907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011908 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011909sed 's/^/| /' conftest.$ac_ext >&5
11910
11911 cat >conftest.$ac_ext <<_ACEOF
11912/* confdefs.h. */
11913_ACEOF
11914cat confdefs.h >>conftest.$ac_ext
11915cat >>conftest.$ac_ext <<_ACEOF
11916/* end confdefs.h. */
11917$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919int
11920main ()
11921{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011922static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011923test_array [0] = 0
11924
11925 ;
11926 return 0;
11927}
11928_ACEOF
11929rm -f conftest.$ac_objext
11930if { (ac_try="$ac_compile"
11931case "(($ac_try" in
11932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11933 *) ac_try_echo=$ac_try;;
11934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011936 (eval "$ac_compile") 2>conftest.er1
11937 ac_status=$?
11938 grep -v '^ *+' conftest.er1 >conftest.err
11939 rm -f conftest.er1
11940 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011942 (exit $ac_status); } && {
11943 test -z "$ac_c_werror_flag" ||
11944 test ! -s conftest.err
11945 } && test -s conftest.$ac_objext; then
11946 ac_hi=-1 ac_mid=-1
11947 while :; do
11948 cat >conftest.$ac_ext <<_ACEOF
11949/* confdefs.h. */
11950_ACEOF
11951cat confdefs.h >>conftest.$ac_ext
11952cat >>conftest.$ac_ext <<_ACEOF
11953/* end confdefs.h. */
11954$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011955 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011956int
11957main ()
11958{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011960test_array [0] = 0
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest.$ac_objext
11967if { (ac_try="$ac_compile"
11968case "(($ac_try" in
11969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11970 *) ac_try_echo=$ac_try;;
11971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011973 (eval "$ac_compile") 2>conftest.er1
11974 ac_status=$?
11975 grep -v '^ *+' conftest.er1 >conftest.err
11976 rm -f conftest.er1
11977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011979 (exit $ac_status); } && {
11980 test -z "$ac_c_werror_flag" ||
11981 test ! -s conftest.err
11982 } && test -s conftest.$ac_objext; then
11983 ac_lo=$ac_mid; break
11984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011985 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011986sed 's/^/| /' conftest.$ac_ext >&5
11987
11988 ac_hi=`expr '(' $ac_mid ')' - 1`
11989 if test $ac_mid -le $ac_hi; then
11990 ac_lo= ac_hi=
11991 break
11992 fi
11993 ac_mid=`expr 2 '*' $ac_mid`
11994fi
11995
11996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11997 done
11998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011999 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012000sed 's/^/| /' conftest.$ac_ext >&5
12001
12002 ac_lo= ac_hi=
12003fi
12004
12005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12006fi
12007
12008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12009# Binary search between lo and hi bounds.
12010while test "x$ac_lo" != "x$ac_hi"; do
12011 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12012 cat >conftest.$ac_ext <<_ACEOF
12013/* confdefs.h. */
12014_ACEOF
12015cat confdefs.h >>conftest.$ac_ext
12016cat >>conftest.$ac_ext <<_ACEOF
12017/* end confdefs.h. */
12018$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012019 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012020int
12021main ()
12022{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012024test_array [0] = 0
12025
12026 ;
12027 return 0;
12028}
12029_ACEOF
12030rm -f conftest.$ac_objext
12031if { (ac_try="$ac_compile"
12032case "(($ac_try" in
12033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12034 *) ac_try_echo=$ac_try;;
12035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012037 (eval "$ac_compile") 2>conftest.er1
12038 ac_status=$?
12039 grep -v '^ *+' conftest.er1 >conftest.err
12040 rm -f conftest.er1
12041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012043 (exit $ac_status); } && {
12044 test -z "$ac_c_werror_flag" ||
12045 test ! -s conftest.err
12046 } && test -s conftest.$ac_objext; then
12047 ac_hi=$ac_mid
12048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012049 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012050sed 's/^/| /' conftest.$ac_ext >&5
12051
12052 ac_lo=`expr '(' $ac_mid ')' + 1`
12053fi
12054
12055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12056done
12057case $ac_lo in
12058?*) ac_cv_sizeof_long_double=$ac_lo;;
12059'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012062echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012063See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012064 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012065 else
12066 ac_cv_sizeof_long_double=0
12067 fi ;;
12068esac
12069else
12070 cat >conftest.$ac_ext <<_ACEOF
12071/* confdefs.h. */
12072_ACEOF
12073cat confdefs.h >>conftest.$ac_ext
12074cat >>conftest.$ac_ext <<_ACEOF
12075/* end confdefs.h. */
12076$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012077 typedef long double ac__type_sizeof_;
12078static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12079static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012080#include <stdio.h>
12081#include <stdlib.h>
12082int
12083main ()
12084{
12085
12086 FILE *f = fopen ("conftest.val", "w");
12087 if (! f)
12088 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012089 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012090 {
12091 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012092 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012093 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012094 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012095 }
12096 else
12097 {
12098 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012101 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012102 }
12103 return ferror (f) || fclose (f) != 0;
12104
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109rm -f conftest$ac_exeext
12110if { (ac_try="$ac_link"
12111case "(($ac_try" in
12112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12113 *) ac_try_echo=$ac_try;;
12114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012116 (eval "$ac_link") 2>&5
12117 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12120 { (case "(($ac_try" in
12121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12122 *) ac_try_echo=$ac_try;;
12123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012125 (eval "$ac_try") 2>&5
12126 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012128 (exit $ac_status); }; }; then
12129 ac_cv_sizeof_long_double=`cat conftest.val`
12130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012131 echo "$as_me: program exited with status $ac_status" >&5
12132echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012133sed 's/^/| /' conftest.$ac_ext >&5
12134
12135( exit $ac_status )
12136if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012137 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012138See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012140See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012141 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012142 else
12143 ac_cv_sizeof_long_double=0
12144 fi
12145fi
12146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12147fi
12148rm -f conftest.val
12149fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012150{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12151echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012152
12153
12154
12155cat >>confdefs.h <<_ACEOF
12156#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12157_ACEOF
12158
12159
12160fi
12161
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012162{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12163echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012164have_c99_bool=no
12165cat >conftest.$ac_ext <<_ACEOF
12166/* confdefs.h. */
12167_ACEOF
12168cat confdefs.h >>conftest.$ac_ext
12169cat >>conftest.$ac_ext <<_ACEOF
12170/* end confdefs.h. */
12171
12172int
12173main ()
12174{
12175_Bool x; x = (_Bool)0;
12176 ;
12177 return 0;
12178}
12179_ACEOF
12180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012181if { (ac_try="$ac_compile"
12182case "(($ac_try" in
12183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12184 *) ac_try_echo=$ac_try;;
12185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012188 ac_status=$?
12189 grep -v '^ *+' conftest.er1 >conftest.err
12190 rm -f conftest.er1
12191 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012193 (exit $ac_status); } && {
12194 test -z "$ac_c_werror_flag" ||
12195 test ! -s conftest.err
12196 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012197
12198
12199cat >>confdefs.h <<\_ACEOF
12200#define HAVE_C99_BOOL 1
12201_ACEOF
12202
12203 have_c99_bool=yes
12204
12205else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012207sed 's/^/| /' conftest.$ac_ext >&5
12208
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012211
12212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012213{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12214echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012215if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216{ echo "$as_me:$LINENO: checking for _Bool" >&5
12217echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12218if test "${ac_cv_type__Bool+set}" = set; then
12219 echo $ECHO_N "(cached) $ECHO_C" >&6
12220else
12221 cat >conftest.$ac_ext <<_ACEOF
12222/* confdefs.h. */
12223_ACEOF
12224cat confdefs.h >>conftest.$ac_ext
12225cat >>conftest.$ac_ext <<_ACEOF
12226/* end confdefs.h. */
12227$ac_includes_default
12228typedef _Bool ac__type_new_;
12229int
12230main ()
12231{
12232if ((ac__type_new_ *) 0)
12233 return 0;
12234if (sizeof (ac__type_new_))
12235 return 0;
12236 ;
12237 return 0;
12238}
12239_ACEOF
12240rm -f conftest.$ac_objext
12241if { (ac_try="$ac_compile"
12242case "(($ac_try" in
12243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12244 *) ac_try_echo=$ac_try;;
12245esac
12246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12247 (eval "$ac_compile") 2>conftest.er1
12248 ac_status=$?
12249 grep -v '^ *+' conftest.er1 >conftest.err
12250 rm -f conftest.er1
12251 cat conftest.err >&5
12252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12253 (exit $ac_status); } && {
12254 test -z "$ac_c_werror_flag" ||
12255 test ! -s conftest.err
12256 } && test -s conftest.$ac_objext; then
12257 ac_cv_type__Bool=yes
12258else
12259 echo "$as_me: failed program was:" >&5
12260sed 's/^/| /' conftest.$ac_ext >&5
12261
12262 ac_cv_type__Bool=no
12263fi
12264
12265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12266fi
12267{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12268echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12269
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270# The cast to long int works around a bug in the HP C Compiler
12271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12273# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012274{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12275echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012276if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012277 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012278else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012279 if test "$cross_compiling" = yes; then
12280 # Depending upon the size, compute the lo and hi bounds.
12281cat >conftest.$ac_ext <<_ACEOF
12282/* confdefs.h. */
12283_ACEOF
12284cat confdefs.h >>conftest.$ac_ext
12285cat >>conftest.$ac_ext <<_ACEOF
12286/* end confdefs.h. */
12287$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012288 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289int
12290main ()
12291{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012292static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012293test_array [0] = 0
12294
12295 ;
12296 return 0;
12297}
12298_ACEOF
12299rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300if { (ac_try="$ac_compile"
12301case "(($ac_try" in
12302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12303 *) ac_try_echo=$ac_try;;
12304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012306 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012307 ac_status=$?
12308 grep -v '^ *+' conftest.er1 >conftest.err
12309 rm -f conftest.er1
12310 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012312 (exit $ac_status); } && {
12313 test -z "$ac_c_werror_flag" ||
12314 test ! -s conftest.err
12315 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012316 ac_lo=0 ac_mid=0
12317 while :; do
12318 cat >conftest.$ac_ext <<_ACEOF
12319/* confdefs.h. */
12320_ACEOF
12321cat confdefs.h >>conftest.$ac_ext
12322cat >>conftest.$ac_ext <<_ACEOF
12323/* end confdefs.h. */
12324$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012325 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326int
12327main ()
12328{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012329static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012330test_array [0] = 0
12331
12332 ;
12333 return 0;
12334}
12335_ACEOF
12336rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012337if { (ac_try="$ac_compile"
12338case "(($ac_try" in
12339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12340 *) ac_try_echo=$ac_try;;
12341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012344 ac_status=$?
12345 grep -v '^ *+' conftest.er1 >conftest.err
12346 rm -f conftest.er1
12347 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 (exit $ac_status); } && {
12350 test -z "$ac_c_werror_flag" ||
12351 test ! -s conftest.err
12352 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012353 ac_hi=$ac_mid; break
12354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012355 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012356sed 's/^/| /' conftest.$ac_ext >&5
12357
Martin v. Löwiseba40652007-08-30 20:10:57 +000012358 ac_lo=`expr $ac_mid + 1`
12359 if test $ac_lo -le $ac_mid; then
12360 ac_lo= ac_hi=
12361 break
12362 fi
12363 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365
12366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012367 done
12368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012369 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012370sed 's/^/| /' conftest.$ac_ext >&5
12371
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012373/* confdefs.h. */
12374_ACEOF
12375cat confdefs.h >>conftest.$ac_ext
12376cat >>conftest.$ac_ext <<_ACEOF
12377/* end confdefs.h. */
12378$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380int
12381main ()
12382{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012384test_array [0] = 0
12385
12386 ;
12387 return 0;
12388}
12389_ACEOF
12390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391if { (ac_try="$ac_compile"
12392case "(($ac_try" in
12393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12394 *) ac_try_echo=$ac_try;;
12395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398 ac_status=$?
12399 grep -v '^ *+' conftest.er1 >conftest.err
12400 rm -f conftest.er1
12401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403 (exit $ac_status); } && {
12404 test -z "$ac_c_werror_flag" ||
12405 test ! -s conftest.err
12406 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012407 ac_hi=-1 ac_mid=-1
12408 while :; do
12409 cat >conftest.$ac_ext <<_ACEOF
12410/* confdefs.h. */
12411_ACEOF
12412cat confdefs.h >>conftest.$ac_ext
12413cat >>conftest.$ac_ext <<_ACEOF
12414/* end confdefs.h. */
12415$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012416 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417int
12418main ()
12419{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012420static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012421test_array [0] = 0
12422
12423 ;
12424 return 0;
12425}
12426_ACEOF
12427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428if { (ac_try="$ac_compile"
12429case "(($ac_try" in
12430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12431 *) ac_try_echo=$ac_try;;
12432esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012435 ac_status=$?
12436 grep -v '^ *+' conftest.er1 >conftest.err
12437 rm -f conftest.er1
12438 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440 (exit $ac_status); } && {
12441 test -z "$ac_c_werror_flag" ||
12442 test ! -s conftest.err
12443 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444 ac_lo=$ac_mid; break
12445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012446 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447sed 's/^/| /' conftest.$ac_ext >&5
12448
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449 ac_hi=`expr '(' $ac_mid ')' - 1`
12450 if test $ac_mid -le $ac_hi; then
12451 ac_lo= ac_hi=
12452 break
12453 fi
12454 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456
12457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012458 done
12459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012460 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012461sed 's/^/| /' conftest.$ac_ext >&5
12462
Martin v. Löwiseba40652007-08-30 20:10:57 +000012463 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012465
12466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468
12469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012470# Binary search between lo and hi bounds.
12471while test "x$ac_lo" != "x$ac_hi"; do
12472 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12473 cat >conftest.$ac_ext <<_ACEOF
12474/* confdefs.h. */
12475_ACEOF
12476cat confdefs.h >>conftest.$ac_ext
12477cat >>conftest.$ac_ext <<_ACEOF
12478/* end confdefs.h. */
12479$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012480 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012481int
12482main ()
12483{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012485test_array [0] = 0
12486
12487 ;
12488 return 0;
12489}
12490_ACEOF
12491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492if { (ac_try="$ac_compile"
12493case "(($ac_try" in
12494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12495 *) ac_try_echo=$ac_try;;
12496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012499 ac_status=$?
12500 grep -v '^ *+' conftest.er1 >conftest.err
12501 rm -f conftest.er1
12502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504 (exit $ac_status); } && {
12505 test -z "$ac_c_werror_flag" ||
12506 test ! -s conftest.err
12507 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508 ac_hi=$ac_mid
12509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012510 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511sed 's/^/| /' conftest.$ac_ext >&5
12512
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515
12516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517done
12518case $ac_lo in
12519?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012523echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012524See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012525 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526 else
12527 ac_cv_sizeof__Bool=0
12528 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529esac
12530else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531 cat >conftest.$ac_ext <<_ACEOF
12532/* confdefs.h. */
12533_ACEOF
12534cat confdefs.h >>conftest.$ac_ext
12535cat >>conftest.$ac_ext <<_ACEOF
12536/* end confdefs.h. */
12537$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012538 typedef _Bool ac__type_sizeof_;
12539static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12540static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012541#include <stdio.h>
12542#include <stdlib.h>
12543int
12544main ()
12545{
12546
12547 FILE *f = fopen ("conftest.val", "w");
12548 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012549 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012550 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012551 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012552 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012553 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012555 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012556 }
12557 else
12558 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012562 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012563 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012565
12566 ;
12567 return 0;
12568}
12569_ACEOF
12570rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012571if { (ac_try="$ac_link"
12572case "(($ac_try" in
12573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12574 *) ac_try_echo=$ac_try;;
12575esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012577 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012578 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012580 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581 { (case "(($ac_try" in
12582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12583 *) ac_try_echo=$ac_try;;
12584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012587 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012589 (exit $ac_status); }; }; then
12590 ac_cv_sizeof__Bool=`cat conftest.val`
12591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012592 echo "$as_me: program exited with status $ac_status" >&5
12593echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012594sed 's/^/| /' conftest.$ac_ext >&5
12595
12596( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012597if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012598 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012599See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012601See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603 else
12604 ac_cv_sizeof__Bool=0
12605 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012608fi
12609rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012610fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012611{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12612echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613
12614
12615
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012616cat >>confdefs.h <<_ACEOF
12617#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12618_ACEOF
12619
12620
12621fi
12622
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012623{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12624echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012625if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012626 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012627else
12628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* confdefs.h. */
12630_ACEOF
12631cat confdefs.h >>conftest.$ac_ext
12632cat >>conftest.$ac_ext <<_ACEOF
12633/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012634#ifdef HAVE_STDINT_H
12635 #include <stdint.h>
12636 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012638typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012639int
12640main ()
12641{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012642if ((ac__type_new_ *) 0)
12643 return 0;
12644if (sizeof (ac__type_new_))
12645 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 ;
12647 return 0;
12648}
12649_ACEOF
12650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651if { (ac_try="$ac_compile"
12652case "(($ac_try" in
12653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12654 *) ac_try_echo=$ac_try;;
12655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012659 grep -v '^ *+' conftest.er1 >conftest.err
12660 rm -f conftest.er1
12661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012663 (exit $ac_status); } && {
12664 test -z "$ac_c_werror_flag" ||
12665 test ! -s conftest.err
12666 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012667 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012670sed 's/^/| /' conftest.$ac_ext >&5
12671
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012672 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674
12675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012676fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012677{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12678echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12679if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012680
12681cat >>confdefs.h <<_ACEOF
12682#define HAVE_UINTPTR_T 1
12683_ACEOF
12684
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012685{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12686echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12687if test "${ac_cv_type_uintptr_t+set}" = set; then
12688 echo $ECHO_N "(cached) $ECHO_C" >&6
12689else
12690 cat >conftest.$ac_ext <<_ACEOF
12691/* confdefs.h. */
12692_ACEOF
12693cat confdefs.h >>conftest.$ac_ext
12694cat >>conftest.$ac_ext <<_ACEOF
12695/* end confdefs.h. */
12696$ac_includes_default
12697typedef uintptr_t ac__type_new_;
12698int
12699main ()
12700{
12701if ((ac__type_new_ *) 0)
12702 return 0;
12703if (sizeof (ac__type_new_))
12704 return 0;
12705 ;
12706 return 0;
12707}
12708_ACEOF
12709rm -f conftest.$ac_objext
12710if { (ac_try="$ac_compile"
12711case "(($ac_try" in
12712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12713 *) ac_try_echo=$ac_try;;
12714esac
12715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12716 (eval "$ac_compile") 2>conftest.er1
12717 ac_status=$?
12718 grep -v '^ *+' conftest.er1 >conftest.err
12719 rm -f conftest.er1
12720 cat conftest.err >&5
12721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12722 (exit $ac_status); } && {
12723 test -z "$ac_c_werror_flag" ||
12724 test ! -s conftest.err
12725 } && test -s conftest.$ac_objext; then
12726 ac_cv_type_uintptr_t=yes
12727else
12728 echo "$as_me: failed program was:" >&5
12729sed 's/^/| /' conftest.$ac_ext >&5
12730
12731 ac_cv_type_uintptr_t=no
12732fi
12733
12734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12735fi
12736{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12737echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12738
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739# The cast to long int works around a bug in the HP C Compiler
12740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12742# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012743{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12744echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012745if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012746 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012747else
Martin v. Löwis11437992002-04-12 09:54:03 +000012748 if test "$cross_compiling" = yes; then
12749 # Depending upon the size, compute the lo and hi bounds.
12750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* confdefs.h. */
12752_ACEOF
12753cat confdefs.h >>conftest.$ac_ext
12754cat >>conftest.$ac_ext <<_ACEOF
12755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012756$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012757 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012758int
12759main ()
12760{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012762test_array [0] = 0
12763
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769if { (ac_try="$ac_compile"
12770case "(($ac_try" in
12771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12772 *) ac_try_echo=$ac_try;;
12773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012777 grep -v '^ *+' conftest.er1 >conftest.err
12778 rm -f conftest.er1
12779 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012781 (exit $ac_status); } && {
12782 test -z "$ac_c_werror_flag" ||
12783 test ! -s conftest.err
12784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ac_lo=0 ac_mid=0
12786 while :; do
12787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012788/* confdefs.h. */
12789_ACEOF
12790cat confdefs.h >>conftest.$ac_ext
12791cat >>conftest.$ac_ext <<_ACEOF
12792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012793$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012794 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012799test_array [0] = 0
12800
12801 ;
12802 return 0;
12803}
12804_ACEOF
12805rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806if { (ac_try="$ac_compile"
12807case "(($ac_try" in
12808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12809 *) ac_try_echo=$ac_try;;
12810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012814 grep -v '^ *+' conftest.er1 >conftest.err
12815 rm -f conftest.er1
12816 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818 (exit $ac_status); } && {
12819 test -z "$ac_c_werror_flag" ||
12820 test ! -s conftest.err
12821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012822 ac_hi=$ac_mid; break
12823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012825sed 's/^/| /' conftest.$ac_ext >&5
12826
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827 ac_lo=`expr $ac_mid + 1`
12828 if test $ac_lo -le $ac_mid; then
12829 ac_lo= ac_hi=
12830 break
12831 fi
12832 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012833fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834
12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012836 done
12837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012839sed 's/^/| /' conftest.$ac_ext >&5
12840
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012842/* confdefs.h. */
12843_ACEOF
12844cat confdefs.h >>conftest.$ac_ext
12845cat >>conftest.$ac_ext <<_ACEOF
12846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012849int
12850main ()
12851{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012853test_array [0] = 0
12854
12855 ;
12856 return 0;
12857}
12858_ACEOF
12859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860if { (ac_try="$ac_compile"
12861case "(($ac_try" in
12862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12863 *) ac_try_echo=$ac_try;;
12864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012868 grep -v '^ *+' conftest.er1 >conftest.err
12869 rm -f conftest.er1
12870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872 (exit $ac_status); } && {
12873 test -z "$ac_c_werror_flag" ||
12874 test ! -s conftest.err
12875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 ac_hi=-1 ac_mid=-1
12877 while :; do
12878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012879/* confdefs.h. */
12880_ACEOF
12881cat confdefs.h >>conftest.$ac_ext
12882cat >>conftest.$ac_ext <<_ACEOF
12883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012884$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012885 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012886int
12887main ()
12888{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012890test_array [0] = 0
12891
12892 ;
12893 return 0;
12894}
12895_ACEOF
12896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897if { (ac_try="$ac_compile"
12898case "(($ac_try" in
12899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12900 *) ac_try_echo=$ac_try;;
12901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012905 grep -v '^ *+' conftest.er1 >conftest.err
12906 rm -f conftest.er1
12907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012909 (exit $ac_status); } && {
12910 test -z "$ac_c_werror_flag" ||
12911 test ! -s conftest.err
12912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012913 ac_lo=$ac_mid; break
12914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012916sed 's/^/| /' conftest.$ac_ext >&5
12917
Martin v. Löwiseba40652007-08-30 20:10:57 +000012918 ac_hi=`expr '(' $ac_mid ')' - 1`
12919 if test $ac_mid -le $ac_hi; then
12920 ac_lo= ac_hi=
12921 break
12922 fi
12923 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925
12926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 done
12928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012930sed 's/^/| /' conftest.$ac_ext >&5
12931
Martin v. Löwiseba40652007-08-30 20:10:57 +000012932 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934
12935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937
12938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012939# Binary search between lo and hi bounds.
12940while test "x$ac_lo" != "x$ac_hi"; do
12941 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* confdefs.h. */
12944_ACEOF
12945cat confdefs.h >>conftest.$ac_ext
12946cat >>conftest.$ac_ext <<_ACEOF
12947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012948$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012949 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012953static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012954test_array [0] = 0
12955
12956 ;
12957 return 0;
12958}
12959_ACEOF
12960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961if { (ac_try="$ac_compile"
12962case "(($ac_try" in
12963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12964 *) ac_try_echo=$ac_try;;
12965esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012969 grep -v '^ *+' conftest.er1 >conftest.err
12970 rm -f conftest.er1
12971 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973 (exit $ac_status); } && {
12974 test -z "$ac_c_werror_flag" ||
12975 test ! -s conftest.err
12976 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 ac_hi=$ac_mid
12978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012980sed 's/^/| /' conftest.$ac_ext >&5
12981
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984
12985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012986done
12987case $ac_lo in
12988?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012991See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012992echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012993See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012994 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995 else
12996 ac_cv_sizeof_uintptr_t=0
12997 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012998esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012999else
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013001/* confdefs.h. */
13002_ACEOF
13003cat confdefs.h >>conftest.$ac_ext
13004cat >>conftest.$ac_ext <<_ACEOF
13005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013006$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013007 typedef uintptr_t ac__type_sizeof_;
13008static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13009static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013010#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013011#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013012int
13013main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013014{
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
13016 FILE *f = fopen ("conftest.val", "w");
13017 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013018 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013019 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013020 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013021 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013023 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013024 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 }
13026 else
13027 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013030 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013031 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
13035 ;
13036 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013037}
Martin v. Löwis11437992002-04-12 09:54:03 +000013038_ACEOF
13039rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040if { (ac_try="$ac_link"
13041case "(($ac_try" in
13042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13043 *) ac_try_echo=$ac_try;;
13044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013046 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050 { (case "(($ac_try" in
13051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13052 *) ac_try_echo=$ac_try;;
13053esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013056 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 (exit $ac_status); }; }; then
13059 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013061 echo "$as_me: program exited with status $ac_status" >&5
13062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013063sed 's/^/| /' conftest.$ac_ext >&5
13064
Martin v. Löwis11437992002-04-12 09:54:03 +000013065( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013068See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013069echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013070See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013071 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 else
13073 ac_cv_sizeof_uintptr_t=0
13074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013076rm -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 +000013077fi
13078rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013079fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013080{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13081echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013082
13083
13084
Martin v. Löwis11437992002-04-12 09:54:03 +000013085cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013086#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013087_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013088
Michael W. Hudson54241132001-12-07 15:38:26 +000013089
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013090fi
13091
Martin v. Löwisebe26702006-10-02 14:55:51 +000013092
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013093{ echo "$as_me:$LINENO: checking for off_t" >&5
13094echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13095if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013097else
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013099/* confdefs.h. */
13100_ACEOF
13101cat confdefs.h >>conftest.$ac_ext
13102cat >>conftest.$ac_ext <<_ACEOF
13103/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013104
13105#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013106#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013107#endif
13108
13109
13110typedef off_t ac__type_new_;
13111int
13112main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013113{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013114if ((ac__type_new_ *) 0)
13115 return 0;
13116if (sizeof (ac__type_new_))
13117 return 0;
13118 ;
13119 return 0;
13120}
13121_ACEOF
13122rm -f conftest.$ac_objext
13123if { (ac_try="$ac_compile"
13124case "(($ac_try" in
13125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13126 *) ac_try_echo=$ac_try;;
13127esac
13128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13129 (eval "$ac_compile") 2>conftest.er1
13130 ac_status=$?
13131 grep -v '^ *+' conftest.er1 >conftest.err
13132 rm -f conftest.er1
13133 cat conftest.err >&5
13134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13135 (exit $ac_status); } && {
13136 test -z "$ac_c_werror_flag" ||
13137 test ! -s conftest.err
13138 } && test -s conftest.$ac_objext; then
13139 ac_cv_type_off_t=yes
13140else
13141 echo "$as_me: failed program was:" >&5
13142sed 's/^/| /' conftest.$ac_ext >&5
13143
13144 ac_cv_type_off_t=no
13145fi
13146
13147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13148fi
13149{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13150echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13151
13152# The cast to long int works around a bug in the HP C Compiler
13153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13155# This bug is HP SR number 8606223364.
13156{ echo "$as_me:$LINENO: checking size of off_t" >&5
13157echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13158if test "${ac_cv_sizeof_off_t+set}" = set; then
13159 echo $ECHO_N "(cached) $ECHO_C" >&6
13160else
13161 if test "$cross_compiling" = yes; then
13162 # Depending upon the size, compute the lo and hi bounds.
13163cat >conftest.$ac_ext <<_ACEOF
13164/* confdefs.h. */
13165_ACEOF
13166cat confdefs.h >>conftest.$ac_ext
13167cat >>conftest.$ac_ext <<_ACEOF
13168/* end confdefs.h. */
13169
13170#ifdef HAVE_SYS_TYPES_H
13171#include <sys/types.h>
13172#endif
13173
13174
13175 typedef off_t ac__type_sizeof_;
13176int
13177main ()
13178{
13179static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13180test_array [0] = 0
13181
13182 ;
13183 return 0;
13184}
13185_ACEOF
13186rm -f conftest.$ac_objext
13187if { (ac_try="$ac_compile"
13188case "(($ac_try" in
13189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13190 *) ac_try_echo=$ac_try;;
13191esac
13192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13193 (eval "$ac_compile") 2>conftest.er1
13194 ac_status=$?
13195 grep -v '^ *+' conftest.er1 >conftest.err
13196 rm -f conftest.er1
13197 cat conftest.err >&5
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); } && {
13200 test -z "$ac_c_werror_flag" ||
13201 test ! -s conftest.err
13202 } && test -s conftest.$ac_objext; then
13203 ac_lo=0 ac_mid=0
13204 while :; do
13205 cat >conftest.$ac_ext <<_ACEOF
13206/* confdefs.h. */
13207_ACEOF
13208cat confdefs.h >>conftest.$ac_ext
13209cat >>conftest.$ac_ext <<_ACEOF
13210/* end confdefs.h. */
13211
13212#ifdef HAVE_SYS_TYPES_H
13213#include <sys/types.h>
13214#endif
13215
13216
13217 typedef off_t ac__type_sizeof_;
13218int
13219main ()
13220{
13221static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13222test_array [0] = 0
13223
13224 ;
13225 return 0;
13226}
13227_ACEOF
13228rm -f conftest.$ac_objext
13229if { (ac_try="$ac_compile"
13230case "(($ac_try" in
13231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13232 *) ac_try_echo=$ac_try;;
13233esac
13234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13235 (eval "$ac_compile") 2>conftest.er1
13236 ac_status=$?
13237 grep -v '^ *+' conftest.er1 >conftest.err
13238 rm -f conftest.er1
13239 cat conftest.err >&5
13240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241 (exit $ac_status); } && {
13242 test -z "$ac_c_werror_flag" ||
13243 test ! -s conftest.err
13244 } && test -s conftest.$ac_objext; then
13245 ac_hi=$ac_mid; break
13246else
13247 echo "$as_me: failed program was:" >&5
13248sed 's/^/| /' conftest.$ac_ext >&5
13249
13250 ac_lo=`expr $ac_mid + 1`
13251 if test $ac_lo -le $ac_mid; then
13252 ac_lo= ac_hi=
13253 break
13254 fi
13255 ac_mid=`expr 2 '*' $ac_mid + 1`
13256fi
13257
13258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13259 done
13260else
13261 echo "$as_me: failed program was:" >&5
13262sed 's/^/| /' conftest.$ac_ext >&5
13263
13264 cat >conftest.$ac_ext <<_ACEOF
13265/* confdefs.h. */
13266_ACEOF
13267cat confdefs.h >>conftest.$ac_ext
13268cat >>conftest.$ac_ext <<_ACEOF
13269/* end confdefs.h. */
13270
13271#ifdef HAVE_SYS_TYPES_H
13272#include <sys/types.h>
13273#endif
13274
13275
13276 typedef off_t ac__type_sizeof_;
13277int
13278main ()
13279{
13280static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13281test_array [0] = 0
13282
13283 ;
13284 return 0;
13285}
13286_ACEOF
13287rm -f conftest.$ac_objext
13288if { (ac_try="$ac_compile"
13289case "(($ac_try" in
13290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13291 *) ac_try_echo=$ac_try;;
13292esac
13293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13294 (eval "$ac_compile") 2>conftest.er1
13295 ac_status=$?
13296 grep -v '^ *+' conftest.er1 >conftest.err
13297 rm -f conftest.er1
13298 cat conftest.err >&5
13299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13300 (exit $ac_status); } && {
13301 test -z "$ac_c_werror_flag" ||
13302 test ! -s conftest.err
13303 } && test -s conftest.$ac_objext; then
13304 ac_hi=-1 ac_mid=-1
13305 while :; do
13306 cat >conftest.$ac_ext <<_ACEOF
13307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
13312
13313#ifdef HAVE_SYS_TYPES_H
13314#include <sys/types.h>
13315#endif
13316
13317
13318 typedef off_t ac__type_sizeof_;
13319int
13320main ()
13321{
13322static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13323test_array [0] = 0
13324
13325 ;
13326 return 0;
13327}
13328_ACEOF
13329rm -f conftest.$ac_objext
13330if { (ac_try="$ac_compile"
13331case "(($ac_try" in
13332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13333 *) ac_try_echo=$ac_try;;
13334esac
13335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13336 (eval "$ac_compile") 2>conftest.er1
13337 ac_status=$?
13338 grep -v '^ *+' conftest.er1 >conftest.err
13339 rm -f conftest.er1
13340 cat conftest.err >&5
13341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13342 (exit $ac_status); } && {
13343 test -z "$ac_c_werror_flag" ||
13344 test ! -s conftest.err
13345 } && test -s conftest.$ac_objext; then
13346 ac_lo=$ac_mid; break
13347else
13348 echo "$as_me: failed program was:" >&5
13349sed 's/^/| /' conftest.$ac_ext >&5
13350
13351 ac_hi=`expr '(' $ac_mid ')' - 1`
13352 if test $ac_mid -le $ac_hi; then
13353 ac_lo= ac_hi=
13354 break
13355 fi
13356 ac_mid=`expr 2 '*' $ac_mid`
13357fi
13358
13359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13360 done
13361else
13362 echo "$as_me: failed program was:" >&5
13363sed 's/^/| /' conftest.$ac_ext >&5
13364
13365 ac_lo= ac_hi=
13366fi
13367
13368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13369fi
13370
13371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372# Binary search between lo and hi bounds.
13373while test "x$ac_lo" != "x$ac_hi"; do
13374 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13375 cat >conftest.$ac_ext <<_ACEOF
13376/* confdefs.h. */
13377_ACEOF
13378cat confdefs.h >>conftest.$ac_ext
13379cat >>conftest.$ac_ext <<_ACEOF
13380/* end confdefs.h. */
13381
13382#ifdef HAVE_SYS_TYPES_H
13383#include <sys/types.h>
13384#endif
13385
13386
13387 typedef off_t ac__type_sizeof_;
13388int
13389main ()
13390{
13391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13392test_array [0] = 0
13393
13394 ;
13395 return 0;
13396}
13397_ACEOF
13398rm -f conftest.$ac_objext
13399if { (ac_try="$ac_compile"
13400case "(($ac_try" in
13401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13402 *) ac_try_echo=$ac_try;;
13403esac
13404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13405 (eval "$ac_compile") 2>conftest.er1
13406 ac_status=$?
13407 grep -v '^ *+' conftest.er1 >conftest.err
13408 rm -f conftest.er1
13409 cat conftest.err >&5
13410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13411 (exit $ac_status); } && {
13412 test -z "$ac_c_werror_flag" ||
13413 test ! -s conftest.err
13414 } && test -s conftest.$ac_objext; then
13415 ac_hi=$ac_mid
13416else
13417 echo "$as_me: failed program was:" >&5
13418sed 's/^/| /' conftest.$ac_ext >&5
13419
13420 ac_lo=`expr '(' $ac_mid ')' + 1`
13421fi
13422
13423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13424done
13425case $ac_lo in
13426?*) ac_cv_sizeof_off_t=$ac_lo;;
13427'') if test "$ac_cv_type_off_t" = yes; then
13428 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13429See \`config.log' for more details." >&5
13430echo "$as_me: error: cannot compute sizeof (off_t)
13431See \`config.log' for more details." >&2;}
13432 { (exit 77); exit 77; }; }
13433 else
13434 ac_cv_sizeof_off_t=0
13435 fi ;;
13436esac
13437else
13438 cat >conftest.$ac_ext <<_ACEOF
13439/* confdefs.h. */
13440_ACEOF
13441cat confdefs.h >>conftest.$ac_ext
13442cat >>conftest.$ac_ext <<_ACEOF
13443/* end confdefs.h. */
13444
13445#ifdef HAVE_SYS_TYPES_H
13446#include <sys/types.h>
13447#endif
13448
13449
13450 typedef off_t ac__type_sizeof_;
13451static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13452static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13453#include <stdio.h>
13454#include <stdlib.h>
13455int
13456main ()
13457{
13458
13459 FILE *f = fopen ("conftest.val", "w");
13460 if (! f)
13461 return 1;
13462 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13463 {
13464 long int i = longval ();
13465 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13466 return 1;
13467 fprintf (f, "%ld\n", i);
13468 }
13469 else
13470 {
13471 unsigned long int i = ulongval ();
13472 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13473 return 1;
13474 fprintf (f, "%lu\n", i);
13475 }
13476 return ferror (f) || fclose (f) != 0;
13477
13478 ;
13479 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013480}
Martin v. Löwis11437992002-04-12 09:54:03 +000013481_ACEOF
13482rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013483if { (ac_try="$ac_link"
13484case "(($ac_try" in
13485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13486 *) ac_try_echo=$ac_try;;
13487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013489 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013493 { (case "(($ac_try" in
13494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13495 *) ac_try_echo=$ac_try;;
13496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013502 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013504 echo "$as_me: program exited with status $ac_status" >&5
13505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013506sed 's/^/| /' conftest.$ac_ext >&5
13507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013509if test "$ac_cv_type_off_t" = yes; then
13510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13511See \`config.log' for more details." >&5
13512echo "$as_me: error: cannot compute sizeof (off_t)
13513See \`config.log' for more details." >&2;}
13514 { (exit 77); exit 77; }; }
13515 else
13516 ac_cv_sizeof_off_t=0
13517 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013519rm -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 +000013520fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013521rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013522fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013523{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13524echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013525
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013526
13527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013529#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013530_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013531
Michael W. Hudson54241132001-12-07 15:38:26 +000013532
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013534{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13535echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013536if test "$have_long_long" = yes
13537then
13538if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013539 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013540
Martin v. Löwis11437992002-04-12 09:54:03 +000013541cat >>confdefs.h <<\_ACEOF
13542#define HAVE_LARGEFILE_SUPPORT 1
13543_ACEOF
13544
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013545 { echo "$as_me:$LINENO: result: yes" >&5
13546echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013548 { echo "$as_me:$LINENO: result: no" >&5
13549echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013550fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013551else
13552 { echo "$as_me:$LINENO: result: no" >&5
13553echo "${ECHO_T}no" >&6; }
13554fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013555
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013556{ echo "$as_me:$LINENO: checking for time_t" >&5
13557echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13558if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013559 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013560else
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* confdefs.h. */
13563_ACEOF
13564cat confdefs.h >>conftest.$ac_ext
13565cat >>conftest.$ac_ext <<_ACEOF
13566/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013567
13568#ifdef HAVE_SYS_TYPES_H
13569#include <sys/types.h>
13570#endif
13571#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013572#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013573#endif
13574
13575
13576typedef time_t ac__type_new_;
13577int
13578main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013579{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013580if ((ac__type_new_ *) 0)
13581 return 0;
13582if (sizeof (ac__type_new_))
13583 return 0;
13584 ;
13585 return 0;
13586}
13587_ACEOF
13588rm -f conftest.$ac_objext
13589if { (ac_try="$ac_compile"
13590case "(($ac_try" in
13591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13592 *) ac_try_echo=$ac_try;;
13593esac
13594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13595 (eval "$ac_compile") 2>conftest.er1
13596 ac_status=$?
13597 grep -v '^ *+' conftest.er1 >conftest.err
13598 rm -f conftest.er1
13599 cat conftest.err >&5
13600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13601 (exit $ac_status); } && {
13602 test -z "$ac_c_werror_flag" ||
13603 test ! -s conftest.err
13604 } && test -s conftest.$ac_objext; then
13605 ac_cv_type_time_t=yes
13606else
13607 echo "$as_me: failed program was:" >&5
13608sed 's/^/| /' conftest.$ac_ext >&5
13609
13610 ac_cv_type_time_t=no
13611fi
13612
13613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13614fi
13615{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13616echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13617
13618# The cast to long int works around a bug in the HP C Compiler
13619# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13620# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13621# This bug is HP SR number 8606223364.
13622{ echo "$as_me:$LINENO: checking size of time_t" >&5
13623echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13624if test "${ac_cv_sizeof_time_t+set}" = set; then
13625 echo $ECHO_N "(cached) $ECHO_C" >&6
13626else
13627 if test "$cross_compiling" = yes; then
13628 # Depending upon the size, compute the lo and hi bounds.
13629cat >conftest.$ac_ext <<_ACEOF
13630/* confdefs.h. */
13631_ACEOF
13632cat confdefs.h >>conftest.$ac_ext
13633cat >>conftest.$ac_ext <<_ACEOF
13634/* end confdefs.h. */
13635
13636#ifdef HAVE_SYS_TYPES_H
13637#include <sys/types.h>
13638#endif
13639#ifdef HAVE_TIME_H
13640#include <time.h>
13641#endif
13642
13643
13644 typedef time_t ac__type_sizeof_;
13645int
13646main ()
13647{
13648static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13649test_array [0] = 0
13650
13651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
13656if { (ac_try="$ac_compile"
13657case "(($ac_try" in
13658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13659 *) ac_try_echo=$ac_try;;
13660esac
13661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13662 (eval "$ac_compile") 2>conftest.er1
13663 ac_status=$?
13664 grep -v '^ *+' conftest.er1 >conftest.err
13665 rm -f conftest.er1
13666 cat conftest.err >&5
13667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13668 (exit $ac_status); } && {
13669 test -z "$ac_c_werror_flag" ||
13670 test ! -s conftest.err
13671 } && test -s conftest.$ac_objext; then
13672 ac_lo=0 ac_mid=0
13673 while :; do
13674 cat >conftest.$ac_ext <<_ACEOF
13675/* confdefs.h. */
13676_ACEOF
13677cat confdefs.h >>conftest.$ac_ext
13678cat >>conftest.$ac_ext <<_ACEOF
13679/* end confdefs.h. */
13680
13681#ifdef HAVE_SYS_TYPES_H
13682#include <sys/types.h>
13683#endif
13684#ifdef HAVE_TIME_H
13685#include <time.h>
13686#endif
13687
13688
13689 typedef time_t ac__type_sizeof_;
13690int
13691main ()
13692{
13693static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13694test_array [0] = 0
13695
13696 ;
13697 return 0;
13698}
13699_ACEOF
13700rm -f conftest.$ac_objext
13701if { (ac_try="$ac_compile"
13702case "(($ac_try" in
13703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13704 *) ac_try_echo=$ac_try;;
13705esac
13706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13707 (eval "$ac_compile") 2>conftest.er1
13708 ac_status=$?
13709 grep -v '^ *+' conftest.er1 >conftest.err
13710 rm -f conftest.er1
13711 cat conftest.err >&5
13712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13713 (exit $ac_status); } && {
13714 test -z "$ac_c_werror_flag" ||
13715 test ! -s conftest.err
13716 } && test -s conftest.$ac_objext; then
13717 ac_hi=$ac_mid; break
13718else
13719 echo "$as_me: failed program was:" >&5
13720sed 's/^/| /' conftest.$ac_ext >&5
13721
13722 ac_lo=`expr $ac_mid + 1`
13723 if test $ac_lo -le $ac_mid; then
13724 ac_lo= ac_hi=
13725 break
13726 fi
13727 ac_mid=`expr 2 '*' $ac_mid + 1`
13728fi
13729
13730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13731 done
13732else
13733 echo "$as_me: failed program was:" >&5
13734sed 's/^/| /' conftest.$ac_ext >&5
13735
13736 cat >conftest.$ac_ext <<_ACEOF
13737/* confdefs.h. */
13738_ACEOF
13739cat confdefs.h >>conftest.$ac_ext
13740cat >>conftest.$ac_ext <<_ACEOF
13741/* end confdefs.h. */
13742
13743#ifdef HAVE_SYS_TYPES_H
13744#include <sys/types.h>
13745#endif
13746#ifdef HAVE_TIME_H
13747#include <time.h>
13748#endif
13749
13750
13751 typedef time_t ac__type_sizeof_;
13752int
13753main ()
13754{
13755static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13756test_array [0] = 0
13757
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762rm -f conftest.$ac_objext
13763if { (ac_try="$ac_compile"
13764case "(($ac_try" in
13765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13766 *) ac_try_echo=$ac_try;;
13767esac
13768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13769 (eval "$ac_compile") 2>conftest.er1
13770 ac_status=$?
13771 grep -v '^ *+' conftest.er1 >conftest.err
13772 rm -f conftest.er1
13773 cat conftest.err >&5
13774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775 (exit $ac_status); } && {
13776 test -z "$ac_c_werror_flag" ||
13777 test ! -s conftest.err
13778 } && test -s conftest.$ac_objext; then
13779 ac_hi=-1 ac_mid=-1
13780 while :; do
13781 cat >conftest.$ac_ext <<_ACEOF
13782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
13787
13788#ifdef HAVE_SYS_TYPES_H
13789#include <sys/types.h>
13790#endif
13791#ifdef HAVE_TIME_H
13792#include <time.h>
13793#endif
13794
13795
13796 typedef time_t ac__type_sizeof_;
13797int
13798main ()
13799{
13800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13801test_array [0] = 0
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (ac_try="$ac_compile"
13809case "(($ac_try" in
13810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13811 *) ac_try_echo=$ac_try;;
13812esac
13813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13814 (eval "$ac_compile") 2>conftest.er1
13815 ac_status=$?
13816 grep -v '^ *+' conftest.er1 >conftest.err
13817 rm -f conftest.er1
13818 cat conftest.err >&5
13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13820 (exit $ac_status); } && {
13821 test -z "$ac_c_werror_flag" ||
13822 test ! -s conftest.err
13823 } && test -s conftest.$ac_objext; then
13824 ac_lo=$ac_mid; break
13825else
13826 echo "$as_me: failed program was:" >&5
13827sed 's/^/| /' conftest.$ac_ext >&5
13828
13829 ac_hi=`expr '(' $ac_mid ')' - 1`
13830 if test $ac_mid -le $ac_hi; then
13831 ac_lo= ac_hi=
13832 break
13833 fi
13834 ac_mid=`expr 2 '*' $ac_mid`
13835fi
13836
13837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838 done
13839else
13840 echo "$as_me: failed program was:" >&5
13841sed 's/^/| /' conftest.$ac_ext >&5
13842
13843 ac_lo= ac_hi=
13844fi
13845
13846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13847fi
13848
13849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850# Binary search between lo and hi bounds.
13851while test "x$ac_lo" != "x$ac_hi"; do
13852 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13853 cat >conftest.$ac_ext <<_ACEOF
13854/* confdefs.h. */
13855_ACEOF
13856cat confdefs.h >>conftest.$ac_ext
13857cat >>conftest.$ac_ext <<_ACEOF
13858/* end confdefs.h. */
13859
13860#ifdef HAVE_SYS_TYPES_H
13861#include <sys/types.h>
13862#endif
13863#ifdef HAVE_TIME_H
13864#include <time.h>
13865#endif
13866
13867
13868 typedef time_t ac__type_sizeof_;
13869int
13870main ()
13871{
13872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13873test_array [0] = 0
13874
13875 ;
13876 return 0;
13877}
13878_ACEOF
13879rm -f conftest.$ac_objext
13880if { (ac_try="$ac_compile"
13881case "(($ac_try" in
13882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13883 *) ac_try_echo=$ac_try;;
13884esac
13885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13886 (eval "$ac_compile") 2>conftest.er1
13887 ac_status=$?
13888 grep -v '^ *+' conftest.er1 >conftest.err
13889 rm -f conftest.er1
13890 cat conftest.err >&5
13891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13892 (exit $ac_status); } && {
13893 test -z "$ac_c_werror_flag" ||
13894 test ! -s conftest.err
13895 } && test -s conftest.$ac_objext; then
13896 ac_hi=$ac_mid
13897else
13898 echo "$as_me: failed program was:" >&5
13899sed 's/^/| /' conftest.$ac_ext >&5
13900
13901 ac_lo=`expr '(' $ac_mid ')' + 1`
13902fi
13903
13904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13905done
13906case $ac_lo in
13907?*) ac_cv_sizeof_time_t=$ac_lo;;
13908'') if test "$ac_cv_type_time_t" = yes; then
13909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13910See \`config.log' for more details." >&5
13911echo "$as_me: error: cannot compute sizeof (time_t)
13912See \`config.log' for more details." >&2;}
13913 { (exit 77); exit 77; }; }
13914 else
13915 ac_cv_sizeof_time_t=0
13916 fi ;;
13917esac
13918else
13919 cat >conftest.$ac_ext <<_ACEOF
13920/* confdefs.h. */
13921_ACEOF
13922cat confdefs.h >>conftest.$ac_ext
13923cat >>conftest.$ac_ext <<_ACEOF
13924/* end confdefs.h. */
13925
13926#ifdef HAVE_SYS_TYPES_H
13927#include <sys/types.h>
13928#endif
13929#ifdef HAVE_TIME_H
13930#include <time.h>
13931#endif
13932
13933
13934 typedef time_t ac__type_sizeof_;
13935static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13936static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13937#include <stdio.h>
13938#include <stdlib.h>
13939int
13940main ()
13941{
13942
13943 FILE *f = fopen ("conftest.val", "w");
13944 if (! f)
13945 return 1;
13946 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13947 {
13948 long int i = longval ();
13949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13950 return 1;
13951 fprintf (f, "%ld\n", i);
13952 }
13953 else
13954 {
13955 unsigned long int i = ulongval ();
13956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13957 return 1;
13958 fprintf (f, "%lu\n", i);
13959 }
13960 return ferror (f) || fclose (f) != 0;
13961
13962 ;
13963 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013964}
Martin v. Löwis11437992002-04-12 09:54:03 +000013965_ACEOF
13966rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967if { (ac_try="$ac_link"
13968case "(($ac_try" in
13969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13970 *) ac_try_echo=$ac_try;;
13971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013973 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013977 { (case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013982 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013986 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013987else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013988 echo "$as_me: program exited with status $ac_status" >&5
13989echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013990sed 's/^/| /' conftest.$ac_ext >&5
13991
Martin v. Löwis11437992002-04-12 09:54:03 +000013992( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013993if test "$ac_cv_type_time_t" = yes; then
13994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13995See \`config.log' for more details." >&5
13996echo "$as_me: error: cannot compute sizeof (time_t)
13997See \`config.log' for more details." >&2;}
13998 { (exit 77); exit 77; }; }
13999 else
14000 ac_cv_sizeof_time_t=0
14001 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014003rm -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 +000014004fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014005rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014006fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014007{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14008echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014010
14011
Martin v. Löwis11437992002-04-12 09:54:03 +000014012cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014013#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014014_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014015
Michael W. Hudson54241132001-12-07 15:38:26 +000014016
14017
Trent Mick635f6fb2000-08-23 21:33:05 +000014018# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014019ac_save_cc="$CC"
14020if test "$ac_cv_kpthread" = "yes"
14021then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014022elif test "$ac_cv_kthread" = "yes"
14023then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014024elif test "$ac_cv_pthread" = "yes"
14025then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014026fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014027{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14028echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014029have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014030cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014031/* confdefs.h. */
14032_ACEOF
14033cat confdefs.h >>conftest.$ac_ext
14034cat >>conftest.$ac_ext <<_ACEOF
14035/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014036#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014037int
14038main ()
14039{
Guido van Rossum12580492000-09-24 16:47:19 +000014040pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 ;
14042 return 0;
14043}
14044_ACEOF
14045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046if { (ac_try="$ac_compile"
14047case "(($ac_try" in
14048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049 *) ac_try_echo=$ac_try;;
14050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 grep -v '^ *+' conftest.er1 >conftest.err
14055 rm -f conftest.er1
14056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 (exit $ac_status); } && {
14059 test -z "$ac_c_werror_flag" ||
14060 test ! -s conftest.err
14061 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014062 have_pthread_t=yes
14063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014065sed 's/^/| /' conftest.$ac_ext >&5
14066
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067
Trent Mick635f6fb2000-08-23 21:33:05 +000014068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069
14070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014071{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14072echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014073if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014074 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14075echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14076if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014077 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014078else
Martin v. Löwis11437992002-04-12 09:54:03 +000014079 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014080/* confdefs.h. */
14081_ACEOF
14082cat confdefs.h >>conftest.$ac_ext
14083cat >>conftest.$ac_ext <<_ACEOF
14084/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014085
14086#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014087#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014088#endif
14089
14090
14091typedef pthread_t ac__type_new_;
14092int
14093main ()
14094{
14095if ((ac__type_new_ *) 0)
14096 return 0;
14097if (sizeof (ac__type_new_))
14098 return 0;
14099 ;
14100 return 0;
14101}
14102_ACEOF
14103rm -f conftest.$ac_objext
14104if { (ac_try="$ac_compile"
14105case "(($ac_try" in
14106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14107 *) ac_try_echo=$ac_try;;
14108esac
14109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14110 (eval "$ac_compile") 2>conftest.er1
14111 ac_status=$?
14112 grep -v '^ *+' conftest.er1 >conftest.err
14113 rm -f conftest.er1
14114 cat conftest.err >&5
14115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14116 (exit $ac_status); } && {
14117 test -z "$ac_c_werror_flag" ||
14118 test ! -s conftest.err
14119 } && test -s conftest.$ac_objext; then
14120 ac_cv_type_pthread_t=yes
14121else
14122 echo "$as_me: failed program was:" >&5
14123sed 's/^/| /' conftest.$ac_ext >&5
14124
14125 ac_cv_type_pthread_t=no
14126fi
14127
14128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14129fi
14130{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14131echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14132
14133# The cast to long int works around a bug in the HP C Compiler
14134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14136# This bug is HP SR number 8606223364.
14137{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14138echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14139if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14140 echo $ECHO_N "(cached) $ECHO_C" >&6
14141else
14142 if test "$cross_compiling" = yes; then
14143 # Depending upon the size, compute the lo and hi bounds.
14144cat >conftest.$ac_ext <<_ACEOF
14145/* confdefs.h. */
14146_ACEOF
14147cat confdefs.h >>conftest.$ac_ext
14148cat >>conftest.$ac_ext <<_ACEOF
14149/* end confdefs.h. */
14150
14151#ifdef HAVE_PTHREAD_H
14152#include <pthread.h>
14153#endif
14154
14155
14156 typedef pthread_t ac__type_sizeof_;
14157int
14158main ()
14159{
14160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14161test_array [0] = 0
14162
14163 ;
14164 return 0;
14165}
14166_ACEOF
14167rm -f conftest.$ac_objext
14168if { (ac_try="$ac_compile"
14169case "(($ac_try" in
14170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14171 *) ac_try_echo=$ac_try;;
14172esac
14173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14174 (eval "$ac_compile") 2>conftest.er1
14175 ac_status=$?
14176 grep -v '^ *+' conftest.er1 >conftest.err
14177 rm -f conftest.er1
14178 cat conftest.err >&5
14179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14180 (exit $ac_status); } && {
14181 test -z "$ac_c_werror_flag" ||
14182 test ! -s conftest.err
14183 } && test -s conftest.$ac_objext; then
14184 ac_lo=0 ac_mid=0
14185 while :; do
14186 cat >conftest.$ac_ext <<_ACEOF
14187/* confdefs.h. */
14188_ACEOF
14189cat confdefs.h >>conftest.$ac_ext
14190cat >>conftest.$ac_ext <<_ACEOF
14191/* end confdefs.h. */
14192
14193#ifdef HAVE_PTHREAD_H
14194#include <pthread.h>
14195#endif
14196
14197
14198 typedef pthread_t ac__type_sizeof_;
14199int
14200main ()
14201{
14202static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14203test_array [0] = 0
14204
14205 ;
14206 return 0;
14207}
14208_ACEOF
14209rm -f conftest.$ac_objext
14210if { (ac_try="$ac_compile"
14211case "(($ac_try" in
14212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14213 *) ac_try_echo=$ac_try;;
14214esac
14215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14216 (eval "$ac_compile") 2>conftest.er1
14217 ac_status=$?
14218 grep -v '^ *+' conftest.er1 >conftest.err
14219 rm -f conftest.er1
14220 cat conftest.err >&5
14221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14222 (exit $ac_status); } && {
14223 test -z "$ac_c_werror_flag" ||
14224 test ! -s conftest.err
14225 } && test -s conftest.$ac_objext; then
14226 ac_hi=$ac_mid; break
14227else
14228 echo "$as_me: failed program was:" >&5
14229sed 's/^/| /' conftest.$ac_ext >&5
14230
14231 ac_lo=`expr $ac_mid + 1`
14232 if test $ac_lo -le $ac_mid; then
14233 ac_lo= ac_hi=
14234 break
14235 fi
14236 ac_mid=`expr 2 '*' $ac_mid + 1`
14237fi
14238
14239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14240 done
14241else
14242 echo "$as_me: failed program was:" >&5
14243sed 's/^/| /' conftest.$ac_ext >&5
14244
14245 cat >conftest.$ac_ext <<_ACEOF
14246/* confdefs.h. */
14247_ACEOF
14248cat confdefs.h >>conftest.$ac_ext
14249cat >>conftest.$ac_ext <<_ACEOF
14250/* end confdefs.h. */
14251
14252#ifdef HAVE_PTHREAD_H
14253#include <pthread.h>
14254#endif
14255
14256
14257 typedef pthread_t ac__type_sizeof_;
14258int
14259main ()
14260{
14261static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14262test_array [0] = 0
14263
14264 ;
14265 return 0;
14266}
14267_ACEOF
14268rm -f conftest.$ac_objext
14269if { (ac_try="$ac_compile"
14270case "(($ac_try" in
14271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14272 *) ac_try_echo=$ac_try;;
14273esac
14274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14275 (eval "$ac_compile") 2>conftest.er1
14276 ac_status=$?
14277 grep -v '^ *+' conftest.er1 >conftest.err
14278 rm -f conftest.er1
14279 cat conftest.err >&5
14280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14281 (exit $ac_status); } && {
14282 test -z "$ac_c_werror_flag" ||
14283 test ! -s conftest.err
14284 } && test -s conftest.$ac_objext; then
14285 ac_hi=-1 ac_mid=-1
14286 while :; do
14287 cat >conftest.$ac_ext <<_ACEOF
14288/* confdefs.h. */
14289_ACEOF
14290cat confdefs.h >>conftest.$ac_ext
14291cat >>conftest.$ac_ext <<_ACEOF
14292/* end confdefs.h. */
14293
14294#ifdef HAVE_PTHREAD_H
14295#include <pthread.h>
14296#endif
14297
14298
14299 typedef pthread_t ac__type_sizeof_;
14300int
14301main ()
14302{
14303static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14304test_array [0] = 0
14305
14306 ;
14307 return 0;
14308}
14309_ACEOF
14310rm -f conftest.$ac_objext
14311if { (ac_try="$ac_compile"
14312case "(($ac_try" in
14313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14314 *) ac_try_echo=$ac_try;;
14315esac
14316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14317 (eval "$ac_compile") 2>conftest.er1
14318 ac_status=$?
14319 grep -v '^ *+' conftest.er1 >conftest.err
14320 rm -f conftest.er1
14321 cat conftest.err >&5
14322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14323 (exit $ac_status); } && {
14324 test -z "$ac_c_werror_flag" ||
14325 test ! -s conftest.err
14326 } && test -s conftest.$ac_objext; then
14327 ac_lo=$ac_mid; break
14328else
14329 echo "$as_me: failed program was:" >&5
14330sed 's/^/| /' conftest.$ac_ext >&5
14331
14332 ac_hi=`expr '(' $ac_mid ')' - 1`
14333 if test $ac_mid -le $ac_hi; then
14334 ac_lo= ac_hi=
14335 break
14336 fi
14337 ac_mid=`expr 2 '*' $ac_mid`
14338fi
14339
14340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14341 done
14342else
14343 echo "$as_me: failed program was:" >&5
14344sed 's/^/| /' conftest.$ac_ext >&5
14345
14346 ac_lo= ac_hi=
14347fi
14348
14349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14350fi
14351
14352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14353# Binary search between lo and hi bounds.
14354while test "x$ac_lo" != "x$ac_hi"; do
14355 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14356 cat >conftest.$ac_ext <<_ACEOF
14357/* confdefs.h. */
14358_ACEOF
14359cat confdefs.h >>conftest.$ac_ext
14360cat >>conftest.$ac_ext <<_ACEOF
14361/* end confdefs.h. */
14362
14363#ifdef HAVE_PTHREAD_H
14364#include <pthread.h>
14365#endif
14366
14367
14368 typedef pthread_t ac__type_sizeof_;
14369int
14370main ()
14371{
14372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14373test_array [0] = 0
14374
14375 ;
14376 return 0;
14377}
14378_ACEOF
14379rm -f conftest.$ac_objext
14380if { (ac_try="$ac_compile"
14381case "(($ac_try" in
14382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14383 *) ac_try_echo=$ac_try;;
14384esac
14385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14386 (eval "$ac_compile") 2>conftest.er1
14387 ac_status=$?
14388 grep -v '^ *+' conftest.er1 >conftest.err
14389 rm -f conftest.er1
14390 cat conftest.err >&5
14391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14392 (exit $ac_status); } && {
14393 test -z "$ac_c_werror_flag" ||
14394 test ! -s conftest.err
14395 } && test -s conftest.$ac_objext; then
14396 ac_hi=$ac_mid
14397else
14398 echo "$as_me: failed program was:" >&5
14399sed 's/^/| /' conftest.$ac_ext >&5
14400
14401 ac_lo=`expr '(' $ac_mid ')' + 1`
14402fi
14403
14404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14405done
14406case $ac_lo in
14407?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14408'') if test "$ac_cv_type_pthread_t" = yes; then
14409 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14410See \`config.log' for more details." >&5
14411echo "$as_me: error: cannot compute sizeof (pthread_t)
14412See \`config.log' for more details." >&2;}
14413 { (exit 77); exit 77; }; }
14414 else
14415 ac_cv_sizeof_pthread_t=0
14416 fi ;;
14417esac
14418else
14419 cat >conftest.$ac_ext <<_ACEOF
14420/* confdefs.h. */
14421_ACEOF
14422cat confdefs.h >>conftest.$ac_ext
14423cat >>conftest.$ac_ext <<_ACEOF
14424/* end confdefs.h. */
14425
14426#ifdef HAVE_PTHREAD_H
14427#include <pthread.h>
14428#endif
14429
14430
14431 typedef pthread_t ac__type_sizeof_;
14432static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14433static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14434#include <stdio.h>
14435#include <stdlib.h>
14436int
14437main ()
14438{
14439
14440 FILE *f = fopen ("conftest.val", "w");
14441 if (! f)
14442 return 1;
14443 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14444 {
14445 long int i = longval ();
14446 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14447 return 1;
14448 fprintf (f, "%ld\n", i);
14449 }
14450 else
14451 {
14452 unsigned long int i = ulongval ();
14453 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14454 return 1;
14455 fprintf (f, "%lu\n", i);
14456 }
14457 return ferror (f) || fclose (f) != 0;
14458
14459 ;
14460 return 0;
14461}
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
14463rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014464if { (ac_try="$ac_link"
14465case "(($ac_try" in
14466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14467 *) ac_try_echo=$ac_try;;
14468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014474 { (case "(($ac_try" in
14475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14476 *) ac_try_echo=$ac_try;;
14477esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014483 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014485 echo "$as_me: program exited with status $ac_status" >&5
14486echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014487sed 's/^/| /' conftest.$ac_ext >&5
14488
Martin v. Löwis11437992002-04-12 09:54:03 +000014489( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014490if test "$ac_cv_type_pthread_t" = yes; then
14491 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14492See \`config.log' for more details." >&5
14493echo "$as_me: error: cannot compute sizeof (pthread_t)
14494See \`config.log' for more details." >&2;}
14495 { (exit 77); exit 77; }; }
14496 else
14497 ac_cv_sizeof_pthread_t=0
14498 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500rm -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 +000014501fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014502rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014503fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014504{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014505echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014507
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014510#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014511_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014512
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014513
Trent Mick635f6fb2000-08-23 21:33:05 +000014514fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014515CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014517{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14518echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014520if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014521 enableval=$enable_toolbox_glue;
14522fi
Jack Jansene578a632001-08-15 01:27:14 +000014523
14524
14525if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014526then
Jack Jansene578a632001-08-15 01:27:14 +000014527 case $ac_sys_system/$ac_sys_release in
14528 Darwin/*)
14529 enable_toolbox_glue="yes";;
14530 *)
14531 enable_toolbox_glue="no";;
14532 esac
14533fi
14534case "$enable_toolbox_glue" in
14535yes)
Jack Jansene578a632001-08-15 01:27:14 +000014536 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014537 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
14539cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014540#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014541_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014542
14543 ;;
14544*)
Jack Jansene578a632001-08-15 01:27:14 +000014545 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014546 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014547 ;;
14548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014549{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14550echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014551
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014552
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014553
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014554case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014555 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014556 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14557 ;;
14558 Darwin/*)
14559 OTHER_LIBTOOL_OPT=""
14560 ;;
14561esac
14562
14563
Ronald Oussoren25967582009-09-06 10:00:26 +000014564ARCH_RUN_32BIT=""
14565
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014566case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014567 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014568 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14569 if test "${enable_universalsdk}"; then
14570 :
14571 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014572 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014573 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014574 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014575 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014576 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014577 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014578 if test ${gcc_version} '<' 4.0
14579 then
14580 LIBTOOL_CRUFT="-lcc_dynamic"
14581 else
14582 LIBTOOL_CRUFT=""
14583 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014584 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014585 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014586else
14587 cat >conftest.$ac_ext <<_ACEOF
14588/* confdefs.h. */
14589_ACEOF
14590cat confdefs.h >>conftest.$ac_ext
14591cat >>conftest.$ac_ext <<_ACEOF
14592/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014593
Ronald Oussoren25967582009-09-06 10:00:26 +000014594 #include <unistd.h>
14595 int main(int argc, char*argv[])
14596 {
14597 if (sizeof(long) == 4) {
14598 return 0;
14599 } else {
14600 return 1;
14601 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014602 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014603
Ronald Oussoren25967582009-09-06 10:00:26 +000014604_ACEOF
14605rm -f conftest$ac_exeext
14606if { (ac_try="$ac_link"
14607case "(($ac_try" in
14608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14609 *) ac_try_echo=$ac_try;;
14610esac
14611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14612 (eval "$ac_link") 2>&5
14613 ac_status=$?
14614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14616 { (case "(($ac_try" in
14617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14618 *) ac_try_echo=$ac_try;;
14619esac
14620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14621 (eval "$ac_try") 2>&5
14622 ac_status=$?
14623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14624 (exit $ac_status); }; }; then
14625 ac_osx_32bit=yes
14626else
14627 echo "$as_me: program exited with status $ac_status" >&5
14628echo "$as_me: failed program was:" >&5
14629sed 's/^/| /' conftest.$ac_ext >&5
14630
14631( exit $ac_status )
14632ac_osx_32bit=no
14633fi
14634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14635fi
14636
14637
14638
14639 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014640 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014641 i386)
14642 MACOSX_DEFAULT_ARCH="i386"
14643 ;;
14644 ppc)
14645 MACOSX_DEFAULT_ARCH="ppc"
14646 ;;
14647 *)
14648 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14649echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14650 { (exit 1); exit 1; }; }
14651 ;;
14652 esac
14653 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014654 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014655 i386)
14656 MACOSX_DEFAULT_ARCH="x86_64"
14657 ;;
14658 ppc)
14659 MACOSX_DEFAULT_ARCH="ppc64"
14660 ;;
14661 *)
14662 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14663echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14664 { (exit 1); exit 1; }; }
14665 ;;
14666 esac
14667
14668 #ARCH_RUN_32BIT="true"
14669 fi
14670
14671 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014672 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014673 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014674esac
14675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014676{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14677echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014678if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014679then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014680 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014681 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014682 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014683
Martin v. Löwis11437992002-04-12 09:54:03 +000014684cat >>confdefs.h <<\_ACEOF
14685#define WITH_NEXT_FRAMEWORK 1
14686_ACEOF
14687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014688 { echo "$as_me:$LINENO: result: yes" >&5
14689echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014690 if test $enable_shared = "yes"
14691 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014692 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14693echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014694 { (exit 1); exit 1; }; }
14695 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014697 { echo "$as_me:$LINENO: result: no" >&5
14698echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014699fi
14700
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014701{ echo "$as_me:$LINENO: checking for dyld" >&5
14702echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014703case $ac_sys_system/$ac_sys_release in
14704 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706cat >>confdefs.h <<\_ACEOF
14707#define WITH_DYLD 1
14708_ACEOF
14709
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014710 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14711echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014712 ;;
14713 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014714 { echo "$as_me:$LINENO: result: no" >&5
14715echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014716 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014717esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014718
Guido van Rossum0a516c91994-09-12 10:58:40 +000014719# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014720
Michael W. Hudson54241132001-12-07 15:38:26 +000014721
14722
14723
14724
Ronald Oussoren75912852010-04-08 08:13:31 +000014725
Guido van Rossum0a516c91994-09-12 10:58:40 +000014726# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014727# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014728{ echo "$as_me:$LINENO: checking SO" >&5
14729echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730if test -z "$SO"
14731then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014732 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014733 hp*|HP*)
14734 case `uname -m` in
14735 ia64) SO=.so;;
14736 *) SO=.sl;;
14737 esac
14738 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014739 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014740 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014741 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014742else
14743 # this might also be a termcap variable, see #610332
14744 echo
14745 echo '====================================================================='
14746 echo '+ +'
14747 echo '+ WARNING: You have set SO in your environment. +'
14748 echo '+ Do you really mean to change the extension for shared libraries? +'
14749 echo '+ Continuing in 10 seconds to let you to ponder. +'
14750 echo '+ +'
14751 echo '====================================================================='
14752 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014754{ echo "$as_me:$LINENO: result: $SO" >&5
14755echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014756
Ronald Oussoren79f90492009-01-02 10:44:46 +000014757
Neal Norwitz58e28882006-05-19 07:00:58 +000014758cat >>confdefs.h <<_ACEOF
14759#define SHLIB_EXT "$SO"
14760_ACEOF
14761
Guido van Rossum0a516c91994-09-12 10:58:40 +000014762# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014763# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014764# (Shared libraries in this instance are shared modules to be loaded into
14765# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014766{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14767echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014768if test -z "$LDSHARED"
14769then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014770 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014771 AIX*)
14772 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014773 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014774 ;;
14775 BeOS*)
14776 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014777 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014778 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014779 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014780 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014782 if test "$GCC" = "yes" ; then
14783 LDSHARED='$(CC) -shared'
14784 LDCXXSHARED='$(CXX) -shared'
14785 else
14786 LDSHARED='$(CC) -G'
14787 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +000014788 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014789 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014790 if test "$GCC" = "yes" ; then
14791 LDSHARED='$(CC) -shared'
14792 LDCXXSHARED='$(CXX) -shared'
14793 else
14794 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +000014795 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014796 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014797 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014798 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014799 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014800 if test "$enable_framework" ; then
14801 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014802 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14803 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014804 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014805 else
14806 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014807 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +000014808 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014809 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014810 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014811 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014812 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014813 if test "$enable_framework" ; then
14814 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014815 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14816 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014817 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014818 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014819 # No framework, use the Python app as bundle-loader
14820 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014821 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014822 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014823 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014824 Darwin/*)
14825 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14826 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014827
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014828 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014829 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014830 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014831 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014832 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014833 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +000014834 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014835 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014836 else
14837 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014838 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014839 if test "$enable_framework" ; then
14840 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014841 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14842 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014843 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014844 else
14845 # No framework, use the Python app as bundle-loader
14846 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14847 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014848 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014849 fi
14850 fi
14851 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014852 Linux*|GNU*|QNX*)
14853 LDSHARED='$(CC) -shared'
14854 LDCXXSHARED='$(CXX) -shared';;
14855 BSD/OS*/4*)
14856 LDSHARED="gcc -shared"
14857 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014858 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014860 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014861 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014862 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014863 else
14864 LDSHARED="ld -Bshareable ${LDFLAGS}"
14865 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014866 OpenBSD*)
14867 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14868 then
14869 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014870 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014871 else
14872 case `uname -r` in
14873 [01].* | 2.[0-7] | 2.[0-7].*)
14874 LDSHARED="ld -Bshareable ${LDFLAGS}"
14875 ;;
14876 *)
14877 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014878 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014879 ;;
14880 esac
14881 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014882 NetBSD*|DragonFly*)
14883 LDSHARED="cc -shared ${LDFLAGS}"
14884 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014885 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014886 if test "$GCC" = "yes" ; then
14887 LDSHARED='$(CC) -shared'
14888 LDCXXSHARED='$(CXX) -shared'
14889 else
14890 LDSHARED='$(CC) -G'
14891 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014892 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014893 SCO_SV*)
14894 LDSHARED='$(CC) -Wl,-G,-Bexport'
14895 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14896 CYGWIN*)
14897 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14898 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
14899 atheos*)
14900 LDSHARED="gcc -shared"
14901 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014902 *) LDSHARED="ld";;
14903 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014904fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014905{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14906echo "${ECHO_T}$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +000014907LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014908BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014909# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014910# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014911{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14912echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014913if test -z "$CCSHARED"
14914then
Guido van Rossum07397971997-04-29 21:49:50 +000014915 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014916 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014917 then CCSHARED="-fPIC";
14918 elif test `uname -p` = sparc;
14919 then CCSHARED="-xcode=pic32";
14920 else CCSHARED="-Kpic";
14921 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014922 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014923 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014924 else CCSHARED="+z";
14925 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014926 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014927 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014928 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014929 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014930 if test "$GCC" = "yes"
14931 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014932 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014933 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014934 SCO_SV*)
14935 if test "$GCC" = "yes"
14936 then CCSHARED="-fPIC"
14937 else CCSHARED="-Kpic -belf"
14938 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014939 IRIX*/6*) case $CC in
14940 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014941 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014942 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014943 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014944 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014945fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014946{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14947echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014948# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014949# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014950{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14951echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014952if test -z "$LINKFORSHARED"
14953then
Guido van Rossum07397971997-04-29 21:49:50 +000014954 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014955 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014956 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014957 LINKFORSHARED="-Wl,-E -Wl,+s";;
14958# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014959 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014960 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014961 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014963 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14964 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014965 # not used by the core itself but which needs to be in the core so
14966 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014967 # -prebind is no longer used, because it actually seems to give a
14968 # slowdown in stead of a speedup, maybe due to the large number of
14969 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014970
14971 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014972 if test "$enable_framework"
14973 then
Jack Jansenda49e192005-01-07 13:08:22 +000014974 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014975 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014976 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014977 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014978 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014979 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014980 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014981 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14982 then
14983 LINKFORSHARED="-Wl,--export-dynamic"
14984 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014985 SunOS/5*) case $CC in
14986 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014987 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014988 then
14989 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014990 fi;;
14991 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014992 CYGWIN*)
14993 if test $enable_shared = "no"
14994 then
14995 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14996 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014997 QNX*)
14998 # -Wl,-E causes the symbols to be added to the dynamic
14999 # symbol table so that they can be found when a module
15000 # is loaded. -N 2048K causes the stack size to be set
15001 # to 2048 kilobytes so that the stack doesn't overflow
15002 # when running test_compile.py.
15003 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000015004 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000015005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015006{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
15007echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000015008
Michael W. Hudson54241132001-12-07 15:38:26 +000015009
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15012echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015013if test ! "$LIBRARY" = "$LDLIBRARY"
15014then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015015 case $ac_sys_system in
15016 CYGWIN*)
15017 # Cygwin needs CCSHARED when building extension DLLs
15018 # but not when building the interpreter DLL.
15019 CFLAGSFORSHARED='';;
15020 *)
15021 CFLAGSFORSHARED='$(CCSHARED)'
15022 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015024{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15025echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015026
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015027# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15028# library (with --enable-shared).
15029# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015030# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15031# if it is not required, since it creates a dependency of the shared library
15032# to LIBS. This, in turn, means that applications linking the shared libpython
15033# don't need to link LIBS explicitly. The default should be only changed
15034# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015036{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15037echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015038case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015039 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015040 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015042{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15043echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015044
15045
Guido van Rossum627b2d71993-12-24 10:39:16 +000015046# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015048{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15049echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015050if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015051 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015054LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015056/* confdefs.h. */
15057_ACEOF
15058cat confdefs.h >>conftest.$ac_ext
15059cat >>conftest.$ac_ext <<_ACEOF
15060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015061
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062/* Override any GCC internal prototype to avoid an error.
15063 Use char because int might match the return type of a GCC
15064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015065#ifdef __cplusplus
15066extern "C"
15067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015068char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015069int
15070main ()
15071{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015072return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 ;
15074 return 0;
15075}
15076_ACEOF
15077rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015078if { (ac_try="$ac_link"
15079case "(($ac_try" in
15080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15081 *) ac_try_echo=$ac_try;;
15082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015086 grep -v '^ *+' conftest.er1 >conftest.err
15087 rm -f conftest.er1
15088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090 (exit $ac_status); } && {
15091 test -z "$ac_c_werror_flag" ||
15092 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015093 } && test -s conftest$ac_exeext &&
15094 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015098sed 's/^/| /' conftest.$ac_ext >&5
15099
Martin v. Löwiseba40652007-08-30 20:10:57 +000015100 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102
15103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015105LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015106fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015107{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15108echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15109if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 cat >>confdefs.h <<_ACEOF
15111#define HAVE_LIBDL 1
15112_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015113
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015114 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015115
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015116fi
15117 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015118
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015119{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15120echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015121if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015123else
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015125LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015127/* confdefs.h. */
15128_ACEOF
15129cat confdefs.h >>conftest.$ac_ext
15130cat >>conftest.$ac_ext <<_ACEOF
15131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015132
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133/* Override any GCC internal prototype to avoid an error.
15134 Use char because int might match the return type of a GCC
15135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015136#ifdef __cplusplus
15137extern "C"
15138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015139char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015140int
15141main ()
15142{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015144 ;
15145 return 0;
15146}
15147_ACEOF
15148rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149if { (ac_try="$ac_link"
15150case "(($ac_try" in
15151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15152 *) ac_try_echo=$ac_try;;
15153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015157 grep -v '^ *+' conftest.er1 >conftest.err
15158 rm -f conftest.er1
15159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161 (exit $ac_status); } && {
15162 test -z "$ac_c_werror_flag" ||
15163 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015164 } && test -s conftest$ac_exeext &&
15165 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015167else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015169sed 's/^/| /' conftest.$ac_ext >&5
15170
Martin v. Löwiseba40652007-08-30 20:10:57 +000015171 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015173
15174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015176LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015178{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15179echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15180if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 cat >>confdefs.h <<_ACEOF
15182#define HAVE_LIBDLD 1
15183_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015184
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015185 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015186
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015187fi
15188 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015189
Ronald Oussoren79f90492009-01-02 10:44:46 +000015190# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015191if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015192 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15193echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015194if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015196else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015197 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015199/* confdefs.h. */
15200_ACEOF
15201cat confdefs.h >>conftest.$ac_ext
15202cat >>conftest.$ac_ext <<_ACEOF
15203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015204
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205/* Override any GCC internal prototype to avoid an error.
15206 Use char because int might match the return type of a GCC
15207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015208#ifdef __cplusplus
15209extern "C"
15210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015211char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015212int
15213main ()
15214{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015216 ;
15217 return 0;
15218}
15219_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220for ac_lib in '' pthread rt posix4; do
15221 if test -z "$ac_lib"; then
15222 ac_res="none required"
15223 else
15224 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015225 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 fi
15227 rm -f conftest.$ac_objext conftest$ac_exeext
15228if { (ac_try="$ac_link"
15229case "(($ac_try" in
15230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15231 *) ac_try_echo=$ac_try;;
15232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015235 ac_status=$?
15236 grep -v '^ *+' conftest.er1 >conftest.err
15237 rm -f conftest.er1
15238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015240 (exit $ac_status); } && {
15241 test -z "$ac_c_werror_flag" ||
15242 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015243 } && test -s conftest$ac_exeext &&
15244 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015245 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015246else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015247 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015248sed 's/^/| /' conftest.$ac_ext >&5
15249
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250
Brett Cannon19fab762007-06-02 03:02:29 +000015251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015252
15253rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15254 conftest$ac_exeext
15255 if test "${ac_cv_search_sem_init+set}" = set; then
15256 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258done
15259if test "${ac_cv_search_sem_init+set}" = set; then
15260 :
15261else
15262 ac_cv_search_sem_init=no
15263fi
15264rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015265LIBS=$ac_func_search_save_LIBS
15266fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015267{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15268echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269ac_res=$ac_cv_search_sem_init
15270if test "$ac_res" != no; then
15271 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015272
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015273fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015274 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015275 # posix4 on Solaris 2.6
15276 # pthread (first!) on Linux
15277fi
15278
Martin v. Löwis19d17342003-06-14 21:03:05 +000015279# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015280{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15281echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015282if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015284else
15285 ac_check_lib_save_LIBS=$LIBS
15286LIBS="-lintl $LIBS"
15287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015293
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294/* Override any GCC internal prototype to avoid an error.
15295 Use char because int might match the return type of a GCC
15296 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015297#ifdef __cplusplus
15298extern "C"
15299#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015300char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015301int
15302main ()
15303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015304return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015305 ;
15306 return 0;
15307}
15308_ACEOF
15309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310if { (ac_try="$ac_link"
15311case "(($ac_try" in
15312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15313 *) ac_try_echo=$ac_try;;
15314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015318 grep -v '^ *+' conftest.er1 >conftest.err
15319 rm -f conftest.er1
15320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322 (exit $ac_status); } && {
15323 test -z "$ac_c_werror_flag" ||
15324 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015325 } && test -s conftest$ac_exeext &&
15326 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015327 ac_cv_lib_intl_textdomain=yes
15328else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015330sed 's/^/| /' conftest.$ac_ext >&5
15331
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015334
15335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015337LIBS=$ac_check_lib_save_LIBS
15338fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015339{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15340echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15341if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015342
15343cat >>confdefs.h <<\_ACEOF
15344#define WITH_LIBINTL 1
15345_ACEOF
15346
15347fi
15348
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015349
15350# checks for system dependent C++ extensions support
15351case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015352 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15353echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015355/* confdefs.h. */
15356_ACEOF
15357cat confdefs.h >>conftest.$ac_ext
15358cat >>conftest.$ac_ext <<_ACEOF
15359/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015360#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015361int
15362main ()
15363{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015364loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 ;
15366 return 0;
15367}
15368_ACEOF
15369rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015370if { (ac_try="$ac_link"
15371case "(($ac_try" in
15372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15373 *) ac_try_echo=$ac_try;;
15374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015378 grep -v '^ *+' conftest.er1 >conftest.err
15379 rm -f conftest.er1
15380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382 (exit $ac_status); } && {
15383 test -z "$ac_c_werror_flag" ||
15384 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015385 } && test -s conftest$ac_exeext &&
15386 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015387
Martin v. Löwis11437992002-04-12 09:54:03 +000015388cat >>confdefs.h <<\_ACEOF
15389#define AIX_GENUINE_CPLUSPLUS 1
15390_ACEOF
15391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015392 { echo "$as_me:$LINENO: result: yes" >&5
15393echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015396sed 's/^/| /' conftest.$ac_ext >&5
15397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015398 { echo "$as_me:$LINENO: result: no" >&5
15399echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401
15402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015403 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015404 *) ;;
15405esac
15406
Guido van Rossum70c7f481998-03-26 18:44:10 +000015407# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015408# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015409{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15410echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015411if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015413else
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015415LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015417/* confdefs.h. */
15418_ACEOF
15419cat confdefs.h >>conftest.$ac_ext
15420cat >>conftest.$ac_ext <<_ACEOF
15421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
Martin v. Löwiseba40652007-08-30 20:10:57 +000015423/* Override any GCC internal prototype to avoid an error.
15424 Use char because int might match the return type of a GCC
15425 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015426#ifdef __cplusplus
15427extern "C"
15428#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015429char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015430int
15431main ()
15432{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015433return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ;
15435 return 0;
15436}
15437_ACEOF
15438rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439if { (ac_try="$ac_link"
15440case "(($ac_try" in
15441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15442 *) ac_try_echo=$ac_try;;
15443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015447 grep -v '^ *+' conftest.er1 >conftest.err
15448 rm -f conftest.er1
15449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015451 (exit $ac_status); } && {
15452 test -z "$ac_c_werror_flag" ||
15453 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015454 } && test -s conftest$ac_exeext &&
15455 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015456 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015459sed 's/^/| /' conftest.$ac_ext >&5
15460
Martin v. Löwiseba40652007-08-30 20:10:57 +000015461 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463
15464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015466LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015467fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015468{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15469echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15470if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015471 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015472fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015473 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015474{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15475echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015476if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015477 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015478else
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015480LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015482/* confdefs.h. */
15483_ACEOF
15484cat confdefs.h >>conftest.$ac_ext
15485cat >>conftest.$ac_ext <<_ACEOF
15486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488/* Override any GCC internal prototype to avoid an error.
15489 Use char because int might match the return type of a GCC
15490 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015491#ifdef __cplusplus
15492extern "C"
15493#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015494char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015495int
15496main ()
15497{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015498return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015499 ;
15500 return 0;
15501}
15502_ACEOF
15503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504if { (ac_try="$ac_link"
15505case "(($ac_try" in
15506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15507 *) ac_try_echo=$ac_try;;
15508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015512 grep -v '^ *+' conftest.er1 >conftest.err
15513 rm -f conftest.er1
15514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516 (exit $ac_status); } && {
15517 test -z "$ac_c_werror_flag" ||
15518 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015519 } && test -s conftest$ac_exeext &&
15520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015524sed 's/^/| /' conftest.$ac_ext >&5
15525
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015528
15529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015531LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015532fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015533{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15534echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15535if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015536 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015537fi
15538 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015539
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015540case "$ac_sys_system" in
15541BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015542{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15543echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015544if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015546else
Martin v. Löwis11437992002-04-12 09:54:03 +000015547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015548LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015550/* confdefs.h. */
15551_ACEOF
15552cat confdefs.h >>conftest.$ac_ext
15553cat >>conftest.$ac_ext <<_ACEOF
15554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Martin v. Löwiseba40652007-08-30 20:10:57 +000015556/* Override any GCC internal prototype to avoid an error.
15557 Use char because int might match the return type of a GCC
15558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015559#ifdef __cplusplus
15560extern "C"
15561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015562char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015563int
15564main ()
15565{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 ;
15568 return 0;
15569}
15570_ACEOF
15571rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572if { (ac_try="$ac_link"
15573case "(($ac_try" in
15574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15575 *) ac_try_echo=$ac_try;;
15576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015578 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015580 grep -v '^ *+' conftest.er1 >conftest.err
15581 rm -f conftest.er1
15582 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015584 (exit $ac_status); } && {
15585 test -z "$ac_c_werror_flag" ||
15586 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015587 } && test -s conftest$ac_exeext &&
15588 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015592sed 's/^/| /' conftest.$ac_ext >&5
15593
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596
15597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015598 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015599LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015601{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15602echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15603if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015604 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015605fi
15606 # BeOS
15607;;
15608esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015609
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015610{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15611echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015614if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015615 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015616{ echo "$as_me:$LINENO: result: $withval" >&5
15617echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015618LIBS="$withval $LIBS"
15619
15620else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015621 { echo "$as_me:$LINENO: result: no" >&5
15622echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015623fi
15624
Guido van Rossum7f43da71994-08-01 12:15:30 +000015625
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015626if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015627 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15628set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15629{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15630echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15631if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15632 echo $ECHO_N "(cached) $ECHO_C" >&6
15633else
15634 case $PKG_CONFIG in
15635 [\\/]* | ?:[\\/]*)
15636 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15637 ;;
15638 *)
15639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15640for as_dir in $PATH
15641do
15642 IFS=$as_save_IFS
15643 test -z "$as_dir" && as_dir=.
15644 for ac_exec_ext in '' $ac_executable_extensions; do
15645 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15646 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15647 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15648 break 2
15649 fi
15650done
15651done
15652IFS=$as_save_IFS
15653
15654 ;;
15655esac
15656fi
15657PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15658if test -n "$PKG_CONFIG"; then
15659 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15660echo "${ECHO_T}$PKG_CONFIG" >&6; }
15661else
15662 { echo "$as_me:$LINENO: result: no" >&5
15663echo "${ECHO_T}no" >&6; }
15664fi
15665
15666
15667fi
15668if test -z "$ac_cv_path_PKG_CONFIG"; then
15669 ac_pt_PKG_CONFIG=$PKG_CONFIG
15670 # Extract the first word of "pkg-config", so it can be a program name with args.
15671set dummy pkg-config; ac_word=$2
15672{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15674if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15675 echo $ECHO_N "(cached) $ECHO_C" >&6
15676else
15677 case $ac_pt_PKG_CONFIG in
15678 [\\/]* | ?:[\\/]*)
15679 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15680 ;;
15681 *)
15682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15683for as_dir in $PATH
15684do
15685 IFS=$as_save_IFS
15686 test -z "$as_dir" && as_dir=.
15687 for ac_exec_ext in '' $ac_executable_extensions; do
15688 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15689 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15690 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15691 break 2
15692 fi
15693done
15694done
15695IFS=$as_save_IFS
15696
15697 ;;
15698esac
15699fi
15700ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15701if test -n "$ac_pt_PKG_CONFIG"; then
15702 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15703echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15704else
15705 { echo "$as_me:$LINENO: result: no" >&5
15706echo "${ECHO_T}no" >&6; }
15707fi
15708
15709 if test "x$ac_pt_PKG_CONFIG" = x; then
15710 PKG_CONFIG=""
15711 else
15712 case $cross_compiling:$ac_tool_warned in
15713yes:)
15714{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15715whose name does not start with the host triplet. If you think this
15716configuration is useful to you, please write to autoconf@gnu.org." >&5
15717echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15718whose name does not start with the host triplet. If you think this
15719configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15720ac_tool_warned=yes ;;
15721esac
15722 PKG_CONFIG=$ac_pt_PKG_CONFIG
15723 fi
15724else
15725 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15726fi
15727
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015728
15729# Check for use of the system expat library
15730{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15731echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15732
15733# Check whether --with-system_expat was given.
15734if test "${with_system_expat+set}" = set; then
15735 withval=$with_system_expat;
15736fi
15737
15738
15739{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15740echo "${ECHO_T}$with_system_expat" >&6; }
15741
15742# Check for use of the system libffi library
15743{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15744echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15745
15746# Check whether --with-system_ffi was given.
15747if test "${with_system_ffi+set}" = set; then
15748 withval=$with_system_ffi;
15749fi
15750
15751
15752if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015753 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15754else
15755 LIBFFI_INCLUDEDIR=""
15756fi
15757
15758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015759{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15760echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015761
Benjamin Peterson867475c2009-04-29 20:36:25 +000015762# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015763{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15764echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015765
15766# Check whether --with-dbmliborder was given.
15767if test "${with_dbmliborder+set}" = set; then
15768 withval=$with_dbmliborder;
15769if test x$with_dbmliborder = xyes
15770then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015771{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15772echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015773 { (exit 1); exit 1; }; }
15774else
15775 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15776 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15777 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15779echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015780 { (exit 1); exit 1; }; }
15781 fi
15782 done
15783fi
15784fi
15785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015786{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15787echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015788
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015789# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015790
15791
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015792{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15793echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015796if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 withval=$with_signal_module;
15798fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015799
15800
15801if test -z "$with_signal_module"
15802then with_signal_module="yes"
15803fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015804{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15805echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015806
15807if test "${with_signal_module}" = "yes"; then
15808 USE_SIGNAL_MODULE=""
15809 SIGNAL_OBJS=""
15810else
15811 USE_SIGNAL_MODULE="#"
15812 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15813fi
15814
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015815# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015816
Barry Warsawc0d24d82000-06-29 16:12:00 +000015817USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015818
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015819{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15820echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015821
Guido van Rossumec2f0731997-01-22 20:54:01 +000015822
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015824if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826{ echo "$as_me:$LINENO: result: $withval" >&5
15827echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015828LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015829if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015830 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015831fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 { echo "$as_me:$LINENO: result: no" >&5
15834echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835fi
15836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
15838# Templates for things AC_DEFINEd more than once.
15839# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015840
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
15843
15844
15845
15846
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015847{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15848echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015851if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852 withval=$with_threads;
15853fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015854
15855
Barry Warsawc0d24d82000-06-29 16:12:00 +000015856# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015857
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015859if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015860 withval=$with_thread; with_threads=$with_thread
15861fi
15862
Barry Warsawc0d24d82000-06-29 16:12:00 +000015863
15864if test -z "$with_threads"
15865then with_threads="yes"
15866fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015867{ echo "$as_me:$LINENO: result: $with_threads" >&5
15868echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015869
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015870
Barry Warsawc0d24d82000-06-29 16:12:00 +000015871if test "$with_threads" = "no"
15872then
15873 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015874elif test "$ac_cv_pthread_is_default" = yes
15875then
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015877#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015879
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015880 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015882#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015883_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015884
15885 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015887elif test "$ac_cv_kpthread" = "yes"
15888then
15889 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015890 if test "$ac_cv_cxx_thread" = "yes"; then
15891 CXX="$CXX -Kpthread"
15892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015894#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015895_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015896
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015897 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015898 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015899elif test "$ac_cv_kthread" = "yes"
15900then
15901 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015902 if test "$ac_cv_cxx_thread" = "yes"; then
15903 CXX="$CXX -Kthread"
15904 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015905 cat >>confdefs.h <<\_ACEOF
15906#define WITH_THREAD 1
15907_ACEOF
15908
15909 posix_threads=yes
15910 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015911elif test "$ac_cv_pthread" = "yes"
15912then
15913 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015914 if test "$ac_cv_cxx_thread" = "yes"; then
15915 CXX="$CXX -pthread"
15916 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015917 cat >>confdefs.h <<\_ACEOF
15918#define WITH_THREAD 1
15919_ACEOF
15920
15921 posix_threads=yes
15922 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015923else
15924 if test ! -z "$with_threads" -a -d "$with_threads"
15925 then LDFLAGS="$LDFLAGS -L$with_threads"
15926 fi
15927 if test ! -z "$withval" -a -d "$withval"
15928 then LDFLAGS="$LDFLAGS -L$withval"
15929 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015930
15931 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015932 # define _POSIX_THREADS in unistd.h. Some apparently don't
15933 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015934 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15935echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015937/* confdefs.h. */
15938_ACEOF
15939cat confdefs.h >>conftest.$ac_ext
15940cat >>conftest.$ac_ext <<_ACEOF
15941/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015942
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015943#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015944#ifdef _POSIX_THREADS
15945yes
15946#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
15948_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015950 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015951 unistd_defines_pthreads=yes
15952else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015953 unistd_defines_pthreads=no
15954fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000015955rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15958echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015959
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015961#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015962_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015965 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15966echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015967if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015969fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015970{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15971echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015972else
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015974{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15975echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015976cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015977/* confdefs.h. */
15978_ACEOF
15979cat confdefs.h >>conftest.$ac_ext
15980cat >>conftest.$ac_ext <<_ACEOF
15981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015982$ac_includes_default
15983#include <cthreads.h>
15984_ACEOF
15985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015986if { (ac_try="$ac_compile"
15987case "(($ac_try" in
15988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15989 *) ac_try_echo=$ac_try;;
15990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015994 grep -v '^ *+' conftest.er1 >conftest.err
15995 rm -f conftest.er1
15996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998 (exit $ac_status); } && {
15999 test -z "$ac_c_werror_flag" ||
16000 test ! -s conftest.err
16001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 ac_header_compiler=yes
16003else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016005sed 's/^/| /' conftest.$ac_ext >&5
16006
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009
16010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016011{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16012echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
16014# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016015{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16016echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016018/* confdefs.h. */
16019_ACEOF
16020cat confdefs.h >>conftest.$ac_ext
16021cat >>conftest.$ac_ext <<_ACEOF
16022/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016025if { (ac_try="$ac_cpp conftest.$ac_ext"
16026case "(($ac_try" in
16027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16028 *) ac_try_echo=$ac_try;;
16029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016033 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 rm -f conftest.er1
16035 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037 (exit $ac_status); } >/dev/null && {
16038 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16039 test ! -s conftest.err
16040 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 ac_header_preproc=yes
16042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016044sed 's/^/| /' conftest.$ac_ext >&5
16045
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048
Martin v. Löwis11437992002-04-12 09:54:03 +000016049rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16051echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
16053# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016054case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16055 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016056 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16057echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16059echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016060 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016061 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016062 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016063 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16064echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16065 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16066echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16067 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16068echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16069 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16070echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16071 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16072echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16073 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16074echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016075 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016076## -------------------------------------- ##
16077## Report this to http://bugs.python.org/ ##
16078## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016079_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016080 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016081 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016083{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16084echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016085if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016086 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016087else
16088 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016089fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016090{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16091echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
16093fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016094if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016096#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016097_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016098
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016100#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016102
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
16104cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016105#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016106_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016107
16108 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016109 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016110else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016111
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016113 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16114echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016115if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016117fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016118{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16119echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016120else
Martin v. Löwis11437992002-04-12 09:54:03 +000016121 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016122{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16123echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016124cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016125/* confdefs.h. */
16126_ACEOF
16127cat confdefs.h >>conftest.$ac_ext
16128cat >>conftest.$ac_ext <<_ACEOF
16129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016130$ac_includes_default
16131#include <mach/cthreads.h>
16132_ACEOF
16133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016134if { (ac_try="$ac_compile"
16135case "(($ac_try" in
16136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16137 *) ac_try_echo=$ac_try;;
16138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016142 grep -v '^ *+' conftest.er1 >conftest.err
16143 rm -f conftest.er1
16144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146 (exit $ac_status); } && {
16147 test -z "$ac_c_werror_flag" ||
16148 test ! -s conftest.err
16149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016150 ac_header_compiler=yes
16151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016153sed 's/^/| /' conftest.$ac_ext >&5
16154
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016157
16158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016159{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16160echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016161
16162# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016163{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16164echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016166/* confdefs.h. */
16167_ACEOF
16168cat confdefs.h >>conftest.$ac_ext
16169cat >>conftest.$ac_ext <<_ACEOF
16170/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016171#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016172_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173if { (ac_try="$ac_cpp conftest.$ac_ext"
16174case "(($ac_try" in
16175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16176 *) ac_try_echo=$ac_try;;
16177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016179 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016181 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 rm -f conftest.er1
16183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185 (exit $ac_status); } >/dev/null && {
16186 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16187 test ! -s conftest.err
16188 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 ac_header_preproc=yes
16190else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016192sed 's/^/| /' conftest.$ac_ext >&5
16193
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016196
Martin v. Löwis11437992002-04-12 09:54:03 +000016197rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016198{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16199echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016200
16201# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016202case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16203 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016204 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16205echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16206 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16207echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016208 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016209 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016210 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016211 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16212echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16213 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16214echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16215 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16216echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16217 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16218echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16219 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16220echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16221 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16222echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016224## -------------------------------------- ##
16225## Report this to http://bugs.python.org/ ##
16226## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016227_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016229 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016231{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16232echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016233if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016235else
16236 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016237fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016238{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16239echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
16241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016242if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016243 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016244#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016245_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016246
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016248#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016249_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016250
Martin v. Löwis11437992002-04-12 09:54:03 +000016251
16252cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016253#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016254_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016255
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016256 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016257else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016259 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16260echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
Martin v. Löwiseba40652007-08-30 20:10:57 +000016262# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016263if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016264 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16265echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016266 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016267#define WITH_THREAD 1
16268_ACEOF
16269
16270
16271cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016272#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016273_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016274
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016275 LIBS="-lpth $LIBS"
16276 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 { echo "$as_me:$LINENO: result: no" >&5
16279echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016280
16281 # Just looking for pthread_create in libpthread is not enough:
16282 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16283 # So we really have to include pthread.h, and then link.
16284 _libs=$LIBS
16285 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016286 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16287echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016289/* confdefs.h. */
16290_ACEOF
16291cat confdefs.h >>conftest.$ac_ext
16292cat >>conftest.$ac_ext <<_ACEOF
16293/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016294#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016295
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016296void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016297int
16298main ()
16299{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016300
16301pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ;
16303 return 0;
16304}
16305_ACEOF
16306rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307if { (ac_try="$ac_link"
16308case "(($ac_try" in
16309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16310 *) ac_try_echo=$ac_try;;
16311esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016313 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016315 grep -v '^ *+' conftest.er1 >conftest.err
16316 rm -f conftest.er1
16317 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319 (exit $ac_status); } && {
16320 test -z "$ac_c_werror_flag" ||
16321 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016322 } && test -s conftest$ac_exeext &&
16323 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016324
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325 { echo "$as_me:$LINENO: result: yes" >&5
16326echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016328#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016329_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016330
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016331 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016332 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016335sed 's/^/| /' conftest.$ac_ext >&5
16336
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016338 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016339 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16340echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016341if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016343else
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016345/* confdefs.h. */
16346_ACEOF
16347cat confdefs.h >>conftest.$ac_ext
16348cat >>conftest.$ac_ext <<_ACEOF
16349/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016350/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16352#define pthread_detach innocuous_pthread_detach
16353
Guido van Rossumad678af1998-10-02 14:42:15 +000016354/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016355 which can conflict with char pthread_detach (); below.
16356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016357 <limits.h> exists even on freestanding compilers. */
16358
16359#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016360# include <limits.h>
16361#else
16362# include <assert.h>
16363#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016364
16365#undef pthread_detach
16366
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367/* Override any GCC internal prototype to avoid an error.
16368 Use char because int might match the return type of a GCC
16369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016370#ifdef __cplusplus
16371extern "C"
16372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016373char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016374/* The GNU C library defines this for functions which it implements
16375 to always fail with ENOSYS. Some functions are actually named
16376 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016378choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016379#endif
16380
Skip Montanaro6dead952003-09-25 14:50:04 +000016381int
16382main ()
16383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016384return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 ;
16386 return 0;
16387}
16388_ACEOF
16389rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016390if { (ac_try="$ac_link"
16391case "(($ac_try" in
16392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16393 *) ac_try_echo=$ac_try;;
16394esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016398 grep -v '^ *+' conftest.er1 >conftest.err
16399 rm -f conftest.er1
16400 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016402 (exit $ac_status); } && {
16403 test -z "$ac_c_werror_flag" ||
16404 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405 } && test -s conftest$ac_exeext &&
16406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016410sed 's/^/| /' conftest.$ac_ext >&5
16411
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414
16415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016416 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016417fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016418{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16419echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16420if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016422#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016423_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016424
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016425 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016426 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016427else
Guido van Rossumad678af1998-10-02 14:42:15 +000016428
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016429 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016430 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16431echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016432if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016433 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016434fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016435{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16436echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016437else
16438 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016439{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16440echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016442/* confdefs.h. */
16443_ACEOF
16444cat confdefs.h >>conftest.$ac_ext
16445cat >>conftest.$ac_ext <<_ACEOF
16446/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016447$ac_includes_default
16448#include <atheos/threads.h>
16449_ACEOF
16450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016451if { (ac_try="$ac_compile"
16452case "(($ac_try" in
16453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16454 *) ac_try_echo=$ac_try;;
16455esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016459 grep -v '^ *+' conftest.er1 >conftest.err
16460 rm -f conftest.er1
16461 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016463 (exit $ac_status); } && {
16464 test -z "$ac_c_werror_flag" ||
16465 test ! -s conftest.err
16466 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016467 ac_header_compiler=yes
16468else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016470sed 's/^/| /' conftest.$ac_ext >&5
16471
Martin v. Löwiseba40652007-08-30 20:10:57 +000016472 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016474
16475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016476{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16477echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016478
16479# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016480{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16481echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016488#include <atheos/threads.h>
16489_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016490if { (ac_try="$ac_cpp conftest.$ac_ext"
16491case "(($ac_try" in
16492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16493 *) ac_try_echo=$ac_try;;
16494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016497 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016498 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016499 rm -f conftest.er1
16500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016502 (exit $ac_status); } >/dev/null && {
16503 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16504 test ! -s conftest.err
16505 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016506 ac_header_preproc=yes
16507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016509sed 's/^/| /' conftest.$ac_ext >&5
16510
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016511 ac_header_preproc=no
16512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016513
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016514rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016515{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16516echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016517
16518# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016519case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16520 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016521 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16522echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16523 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16524echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016525 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016526 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016528 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16529echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16530 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16531echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16532 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16533echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16534 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16535echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16536 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16537echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16538 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16539echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016540 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016541## -------------------------------------- ##
16542## Report this to http://bugs.python.org/ ##
16543## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016544_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016545 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016546 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016547esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016548{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16549echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016550if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016551 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016552else
16553 ac_cv_header_atheos_threads_h=$ac_header_preproc
16554fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016555{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16556echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016557
16558fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016560 cat >>confdefs.h <<\_ACEOF
16561#define WITH_THREAD 1
16562_ACEOF
16563
16564
16565cat >>confdefs.h <<\_ACEOF
16566#define ATHEOS_THREADS 1
16567_ACEOF
16568
16569 THREADOBJ="Python/thread.o"
16570else
16571
Martin v. Löwis11437992002-04-12 09:54:03 +000016572 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016573 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16574echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016575if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016578{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16579echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016580else
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016582{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16583echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016585/* confdefs.h. */
16586_ACEOF
16587cat confdefs.h >>conftest.$ac_ext
16588cat >>conftest.$ac_ext <<_ACEOF
16589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016590$ac_includes_default
16591#include <kernel/OS.h>
16592_ACEOF
16593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016594if { (ac_try="$ac_compile"
16595case "(($ac_try" in
16596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16597 *) ac_try_echo=$ac_try;;
16598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016602 grep -v '^ *+' conftest.er1 >conftest.err
16603 rm -f conftest.er1
16604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016606 (exit $ac_status); } && {
16607 test -z "$ac_c_werror_flag" ||
16608 test ! -s conftest.err
16609 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016610 ac_header_compiler=yes
16611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016613sed 's/^/| /' conftest.$ac_ext >&5
16614
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617
16618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016619{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16620echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016621
16622# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016623{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16624echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016626/* confdefs.h. */
16627_ACEOF
16628cat confdefs.h >>conftest.$ac_ext
16629cat >>conftest.$ac_ext <<_ACEOF
16630/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016631#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016632_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633if { (ac_try="$ac_cpp conftest.$ac_ext"
16634case "(($ac_try" in
16635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16636 *) ac_try_echo=$ac_try;;
16637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016641 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016642 rm -f conftest.er1
16643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645 (exit $ac_status); } >/dev/null && {
16646 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16647 test ! -s conftest.err
16648 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016649 ac_header_preproc=yes
16650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016652sed 's/^/| /' conftest.$ac_ext >&5
16653
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656
Martin v. Löwis11437992002-04-12 09:54:03 +000016657rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016658{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16659echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016660
Martin v. Löwis11437992002-04-12 09:54:03 +000016661# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16663 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16665echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16667echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016668 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016669 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016670 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016671 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16672echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16673 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16674echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16675 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16676echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16677 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16678echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16679 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16680echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16681 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16682echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016683 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016684## -------------------------------------- ##
16685## Report this to http://bugs.python.org/ ##
16686## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016687_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016689 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016690esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016691{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16692echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016693if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016694 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016695else
16696 ac_cv_header_kernel_OS_h=$ac_header_preproc
16697fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16699echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016700
16701fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 cat >>confdefs.h <<\_ACEOF
16704#define WITH_THREAD 1
16705_ACEOF
16706
16707
16708cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016709#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016710_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016711
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016712 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016713else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016714
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016715 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16716echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016717if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016719else
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016721LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016723/* confdefs.h. */
16724_ACEOF
16725cat confdefs.h >>conftest.$ac_ext
16726cat >>conftest.$ac_ext <<_ACEOF
16727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729/* Override any GCC internal prototype to avoid an error.
16730 Use char because int might match the return type of a GCC
16731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016732#ifdef __cplusplus
16733extern "C"
16734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016735char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016736int
16737main ()
16738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016739return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 ;
16741 return 0;
16742}
16743_ACEOF
16744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016745if { (ac_try="$ac_link"
16746case "(($ac_try" in
16747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16748 *) ac_try_echo=$ac_try;;
16749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016753 grep -v '^ *+' conftest.er1 >conftest.err
16754 rm -f conftest.er1
16755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016757 (exit $ac_status); } && {
16758 test -z "$ac_c_werror_flag" ||
16759 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016760 } && test -s conftest$ac_exeext &&
16761 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016762 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016765sed 's/^/| /' conftest.$ac_ext >&5
16766
Martin v. Löwiseba40652007-08-30 20:10:57 +000016767 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769
16770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016772LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016774{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16775echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16776if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016778#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016779_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016782 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016783 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016784else
Greg Steinadf63d62000-07-05 10:38:09 +000016785
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016786 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16787echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016788if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016789 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016790else
Martin v. Löwis11437992002-04-12 09:54:03 +000016791 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016792LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016794/* confdefs.h. */
16795_ACEOF
16796cat confdefs.h >>conftest.$ac_ext
16797cat >>conftest.$ac_ext <<_ACEOF
16798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016799
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800/* Override any GCC internal prototype to avoid an error.
16801 Use char because int might match the return type of a GCC
16802 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016803#ifdef __cplusplus
16804extern "C"
16805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016806char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016807int
16808main ()
16809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016810return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 ;
16812 return 0;
16813}
16814_ACEOF
16815rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016816if { (ac_try="$ac_link"
16817case "(($ac_try" in
16818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16819 *) ac_try_echo=$ac_try;;
16820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016822 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016824 grep -v '^ *+' conftest.er1 >conftest.err
16825 rm -f conftest.er1
16826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016828 (exit $ac_status); } && {
16829 test -z "$ac_c_werror_flag" ||
16830 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016831 } && test -s conftest$ac_exeext &&
16832 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016833 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016834else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016835 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016836sed 's/^/| /' conftest.$ac_ext >&5
16837
Martin v. Löwiseba40652007-08-30 20:10:57 +000016838 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016840
16841rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016845{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16846echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16847if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016849#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016850_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016851
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016852 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016853 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016854 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016855else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016857 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16858echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016859if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016860 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016861else
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016863LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016865/* confdefs.h. */
16866_ACEOF
16867cat confdefs.h >>conftest.$ac_ext
16868cat >>conftest.$ac_ext <<_ACEOF
16869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016870
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871/* Override any GCC internal prototype to avoid an error.
16872 Use char because int might match the return type of a GCC
16873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016874#ifdef __cplusplus
16875extern "C"
16876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016877char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016878int
16879main ()
16880{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016881return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016882 ;
16883 return 0;
16884}
16885_ACEOF
16886rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887if { (ac_try="$ac_link"
16888case "(($ac_try" in
16889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16890 *) ac_try_echo=$ac_try;;
16891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 grep -v '^ *+' conftest.er1 >conftest.err
16896 rm -f conftest.er1
16897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 (exit $ac_status); } && {
16900 test -z "$ac_c_werror_flag" ||
16901 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016902 } && test -s conftest$ac_exeext &&
16903 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016907sed 's/^/| /' conftest.$ac_ext >&5
16908
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911
16912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016915fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016916{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16917echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16918if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016920#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016921_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016922
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016923 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016924 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016925 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016926else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016928 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16929echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016930if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016932else
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016934LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016935cat >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öwis11437992002-04-12 09:54:03 +000016941
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942/* Override any GCC internal prototype to avoid an error.
16943 Use char because int might match the return type of a GCC
16944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016945#ifdef __cplusplus
16946extern "C"
16947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016948char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016949int
16950main ()
16951{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016952return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 ;
16954 return 0;
16955}
16956_ACEOF
16957rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016958if { (ac_try="$ac_link"
16959case "(($ac_try" in
16960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16961 *) ac_try_echo=$ac_try;;
16962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016966 grep -v '^ *+' conftest.er1 >conftest.err
16967 rm -f conftest.er1
16968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970 (exit $ac_status); } && {
16971 test -z "$ac_c_werror_flag" ||
16972 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016973 } && test -s conftest$ac_exeext &&
16974 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016978sed 's/^/| /' conftest.$ac_ext >&5
16979
Martin v. Löwiseba40652007-08-30 20:10:57 +000016980 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016982
16983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016985LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016986fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16988echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16989if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016990 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016991#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016992_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016993
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016994 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016995 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016996 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016997else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016998
Martin v. Löwis130fb172001-07-19 11:00:41 +000016999 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000017000fi
17001
Guido van Rossum627b2d71993-12-24 10:39:16 +000017002
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017003fi
17004
Guido van Rossum0be3e491997-05-22 20:33:33 +000017005fi
17006
Guido van Rossum49545951997-12-02 19:28:29 +000017007fi
17008
Guido van Rossumb93a8621998-05-07 13:27:32 +000017009fi
17010
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017011
Michael W. Hudson54241132001-12-07 15:38:26 +000017012fi
17013
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017014
17015fi
17016
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018
17019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021fi
17022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023fi
17024
17025
17026fi
17027
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017028
Michael W. Hudson54241132001-12-07 15:38:26 +000017029
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017030 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17031echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017032if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017034else
Martin v. Löwis11437992002-04-12 09:54:03 +000017035 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017036LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017038/* confdefs.h. */
17039_ACEOF
17040cat confdefs.h >>conftest.$ac_ext
17041cat >>conftest.$ac_ext <<_ACEOF
17042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017043
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044/* Override any GCC internal prototype to avoid an error.
17045 Use char because int might match the return type of a GCC
17046 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017047#ifdef __cplusplus
17048extern "C"
17049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017050char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017051int
17052main ()
17053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017054return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 ;
17056 return 0;
17057}
17058_ACEOF
17059rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060if { (ac_try="$ac_link"
17061case "(($ac_try" in
17062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17063 *) ac_try_echo=$ac_try;;
17064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017068 grep -v '^ *+' conftest.er1 >conftest.err
17069 rm -f conftest.er1
17070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017072 (exit $ac_status); } && {
17073 test -z "$ac_c_werror_flag" ||
17074 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017075 } && test -s conftest$ac_exeext &&
17076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017077 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017080sed 's/^/| /' conftest.$ac_ext >&5
17081
Martin v. Löwiseba40652007-08-30 20:10:57 +000017082 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017084
17085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017087LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017088fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017089{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17090echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17091if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017093#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017094_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017095
Martin v. Löwis130fb172001-07-19 11:00:41 +000017096 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017097 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017098 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017099fi
17100
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017101
Neal Norwitza978ab02002-11-02 16:58:05 +000017102 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017103 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17104echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017105if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017107else
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017109LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017111/* confdefs.h. */
17112_ACEOF
17113cat confdefs.h >>conftest.$ac_ext
17114cat >>conftest.$ac_ext <<_ACEOF
17115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017116
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117/* Override any GCC internal prototype to avoid an error.
17118 Use char because int might match the return type of a GCC
17119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017120#ifdef __cplusplus
17121extern "C"
17122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017123char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017124int
17125main ()
17126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ;
17129 return 0;
17130}
17131_ACEOF
17132rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133if { (ac_try="$ac_link"
17134case "(($ac_try" in
17135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17136 *) ac_try_echo=$ac_try;;
17137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017139 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017141 grep -v '^ *+' conftest.er1 >conftest.err
17142 rm -f conftest.er1
17143 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017145 (exit $ac_status); } && {
17146 test -z "$ac_c_werror_flag" ||
17147 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017148 } && test -s conftest$ac_exeext &&
17149 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017150 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017153sed 's/^/| /' conftest.$ac_ext >&5
17154
Martin v. Löwiseba40652007-08-30 20:10:57 +000017155 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017157
17158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017162{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17163echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17164if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017166#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017167_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017168
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017169 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017170 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017171 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017172fi
17173
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017174 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017175
Martin v. Löwis130fb172001-07-19 11:00:41 +000017176 if test "$USE_THREAD_MODULE" != "#"
17177 then
17178 # If the above checks didn't disable threads, (at least) OSF1
17179 # needs this '-threads' argument during linking.
17180 case $ac_sys_system in
17181 OSF1) LDLAST=-threads;;
17182 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017183 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017184fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017185
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017186if test "$posix_threads" = "yes"; then
17187 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017188
17189cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017190#define _POSIX_THREADS 1
17191_ACEOF
17192
17193 fi
17194
17195 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17196 case $ac_sys_system/$ac_sys_release in
17197 SunOS/5.6)
17198cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017199#define HAVE_PTHREAD_DESTRUCTOR 1
17200_ACEOF
17201
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017202 ;;
17203 SunOS/5.8)
17204cat >>confdefs.h <<\_ACEOF
17205#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17206_ACEOF
17207
17208 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017209 AIX/5)
17210cat >>confdefs.h <<\_ACEOF
17211#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17212_ACEOF
17213
17214 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017215 esac
17216
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017217 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17218echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017219 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017220 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017221else
17222 if test "$cross_compiling" = yes; then
17223 ac_cv_pthread_system_supported=no
17224else
17225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017226/* confdefs.h. */
17227_ACEOF
17228cat confdefs.h >>conftest.$ac_ext
17229cat >>conftest.$ac_ext <<_ACEOF
17230/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017231#include <pthread.h>
17232 void *foo(void *parm) {
17233 return NULL;
17234 }
17235 main() {
17236 pthread_attr_t attr;
17237 pthread_t id;
17238 if (pthread_attr_init(&attr)) exit(-1);
17239 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17240 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17241 exit(0);
17242 }
17243_ACEOF
17244rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245if { (ac_try="$ac_link"
17246case "(($ac_try" in
17247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17248 *) ac_try_echo=$ac_try;;
17249esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017251 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017252 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255 { (case "(($ac_try" in
17256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17257 *) ac_try_echo=$ac_try;;
17258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017261 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017263 (exit $ac_status); }; }; then
17264 ac_cv_pthread_system_supported=yes
17265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017266 echo "$as_me: program exited with status $ac_status" >&5
17267echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017268sed 's/^/| /' conftest.$ac_ext >&5
17269
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017270( exit $ac_status )
17271ac_cv_pthread_system_supported=no
17272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017273rm -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 +000017274fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017275
Martin v. Löwiseba40652007-08-30 20:10:57 +000017276
17277
Guido van Rossum627b2d71993-12-24 10:39:16 +000017278fi
17279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017280 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17281echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017282 if test "$ac_cv_pthread_system_supported" = "yes"; then
17283
17284cat >>confdefs.h <<\_ACEOF
17285#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17286_ACEOF
17287
17288 fi
17289
17290for ac_func in pthread_sigmask
17291do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017292as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17293{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17294echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017296 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017297else
17298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017299/* confdefs.h. */
17300_ACEOF
17301cat confdefs.h >>conftest.$ac_ext
17302cat >>conftest.$ac_ext <<_ACEOF
17303/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017304/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17305 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17306#define $ac_func innocuous_$ac_func
17307
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017308/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017309 which can conflict with char $ac_func (); below.
17310 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017311 <limits.h> exists even on freestanding compilers. */
17312
17313#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017314# include <limits.h>
17315#else
17316# include <assert.h>
17317#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017318
17319#undef $ac_func
17320
Martin v. Löwiseba40652007-08-30 20:10:57 +000017321/* Override any GCC internal prototype to avoid an error.
17322 Use char because int might match the return type of a GCC
17323 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017324#ifdef __cplusplus
17325extern "C"
17326#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017327char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017328/* The GNU C library defines this for functions which it implements
17329 to always fail with ENOSYS. Some functions are actually named
17330 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017332choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017333#endif
17334
Skip Montanaro6dead952003-09-25 14:50:04 +000017335int
17336main ()
17337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017338return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017339 ;
17340 return 0;
17341}
17342_ACEOF
17343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017344if { (ac_try="$ac_link"
17345case "(($ac_try" in
17346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17347 *) ac_try_echo=$ac_try;;
17348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017352 grep -v '^ *+' conftest.er1 >conftest.err
17353 rm -f conftest.er1
17354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017356 (exit $ac_status); } && {
17357 test -z "$ac_c_werror_flag" ||
17358 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017359 } && test -s conftest$ac_exeext &&
17360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017361 eval "$as_ac_var=yes"
17362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017364sed 's/^/| /' conftest.$ac_ext >&5
17365
Martin v. Löwiseba40652007-08-30 20:10:57 +000017366 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017368
17369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017372ac_res=`eval echo '${'$as_ac_var'}'`
17373 { echo "$as_me:$LINENO: result: $ac_res" >&5
17374echo "${ECHO_T}$ac_res" >&6; }
17375if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017376 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017377#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017378_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017379 case $ac_sys_system in
17380 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017381
Jason Tishlerfac083d2003-07-22 15:20:49 +000017382cat >>confdefs.h <<\_ACEOF
17383#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17384_ACEOF
17385
17386 ;;
17387 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017388fi
17389done
17390
17391fi
17392
17393
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017394# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017395
17396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017397{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17398echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017399# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017400if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017401 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017402 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017403 { echo "$as_me:$LINENO: result: no" >&5
17404echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405 ipv6=no
17406 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017407 *) { echo "$as_me:$LINENO: result: yes" >&5
17408echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017409 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017411_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017412
17413 ipv6=yes
17414 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017415 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416else
Martin v. Löwis11437992002-04-12 09:54:03 +000017417
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017418 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017419 { echo "$as_me:$LINENO: result: no" >&5
17420echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017421 ipv6=no
17422
17423else
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017425/* confdefs.h. */
17426_ACEOF
17427cat confdefs.h >>conftest.$ac_ext
17428cat >>conftest.$ac_ext <<_ACEOF
17429/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017430 /* AF_INET6 available check */
17431#include <sys/types.h>
17432#include <sys/socket.h>
17433main()
17434{
17435 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17436 exit(1);
17437 else
17438 exit(0);
17439}
17440
Martin v. Löwis11437992002-04-12 09:54:03 +000017441_ACEOF
17442rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017443if { (ac_try="$ac_link"
17444case "(($ac_try" in
17445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17446 *) ac_try_echo=$ac_try;;
17447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017449 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017450 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017452 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017453 { (case "(($ac_try" in
17454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17455 *) ac_try_echo=$ac_try;;
17456esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017458 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017461 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017462 { echo "$as_me:$LINENO: result: yes" >&5
17463echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017464 ipv6=yes
17465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017466 echo "$as_me: program exited with status $ac_status" >&5
17467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017468sed 's/^/| /' conftest.$ac_ext >&5
17469
Martin v. Löwis11437992002-04-12 09:54:03 +000017470( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017471{ echo "$as_me:$LINENO: result: no" >&5
17472echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017473 ipv6=no
17474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475rm -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 +000017476fi
17477
Martin v. Löwiseba40652007-08-30 20:10:57 +000017478
17479
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017480if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017481 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17482echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017484/* confdefs.h. */
17485_ACEOF
17486cat confdefs.h >>conftest.$ac_ext
17487cat >>conftest.$ac_ext <<_ACEOF
17488/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017489#include <sys/types.h>
17490#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017491int
17492main ()
17493{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017494struct sockaddr_in6 x;
17495x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 ;
17497 return 0;
17498}
17499_ACEOF
17500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017501if { (ac_try="$ac_compile"
17502case "(($ac_try" in
17503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17504 *) ac_try_echo=$ac_try;;
17505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017509 grep -v '^ *+' conftest.er1 >conftest.err
17510 rm -f conftest.er1
17511 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513 (exit $ac_status); } && {
17514 test -z "$ac_c_werror_flag" ||
17515 test ! -s conftest.err
17516 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517 { echo "$as_me:$LINENO: result: yes" >&5
17518echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017519 ipv6=yes
17520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017522sed 's/^/| /' conftest.$ac_ext >&5
17523
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017524 { echo "$as_me:$LINENO: result: no" >&5
17525echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017526 ipv6=no
17527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017528
17529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017530fi
17531
17532if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017534#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017535_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017536
17537fi
17538
Martin v. Löwiseba40652007-08-30 20:10:57 +000017539fi
17540
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017541
17542ipv6type=unknown
17543ipv6lib=none
17544ipv6trylibc=no
17545
17546if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017547 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17548echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017549 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17550 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017551 case $i in
17552 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017554/* confdefs.h. */
17555_ACEOF
17556cat confdefs.h >>conftest.$ac_ext
17557cat >>conftest.$ac_ext <<_ACEOF
17558/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017559
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017560#include <netinet/in.h>
17561#ifdef IPV6_INRIA_VERSION
17562yes
17563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017564_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017566 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017567 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017568fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017569rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017570
17571 ;;
17572 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017574/* confdefs.h. */
17575_ACEOF
17576cat confdefs.h >>conftest.$ac_ext
17577cat >>conftest.$ac_ext <<_ACEOF
17578/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017579
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017580#include <netinet/in.h>
17581#ifdef __KAME__
17582yes
17583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017584_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017586 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017587 ipv6type=$i;
17588 ipv6lib=inet6
17589 ipv6libdir=/usr/local/v6/lib
17590 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017591fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017592rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017593
17594 ;;
17595 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017597/* confdefs.h. */
17598_ACEOF
17599cat confdefs.h >>conftest.$ac_ext
17600cat >>conftest.$ac_ext <<_ACEOF
17601/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017602
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017603#include <features.h>
17604#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17605yes
17606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017607_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017609 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017610 ipv6type=$i;
17611 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017612fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017613rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017614
17615 ;;
17616 linux-inet6)
17617 if test -d /usr/inet6; then
17618 ipv6type=$i
17619 ipv6lib=inet6
17620 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017621 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017622 fi
17623 ;;
17624 solaris)
17625 if test -f /etc/netconfig; then
17626 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17627 ipv6type=$i
17628 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017629 fi
17630 fi
17631 ;;
17632 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017634/* confdefs.h. */
17635_ACEOF
17636cat confdefs.h >>conftest.$ac_ext
17637cat >>conftest.$ac_ext <<_ACEOF
17638/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017639
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017640#include <sys/param.h>
17641#ifdef _TOSHIBA_INET6
17642yes
17643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017644_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017646 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017647 ipv6type=$i;
17648 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017649 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017650fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017651rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017652
17653 ;;
17654 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017656/* confdefs.h. */
17657_ACEOF
17658cat confdefs.h >>conftest.$ac_ext
17659cat >>conftest.$ac_ext <<_ACEOF
17660/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017661
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017662#include </usr/local/v6/include/sys/v6config.h>
17663#ifdef __V6D__
17664yes
17665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017666_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017668 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017669 ipv6type=$i;
17670 ipv6lib=v6;
17671 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017672 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017673fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017674rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017675
17676 ;;
17677 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017679/* confdefs.h. */
17680_ACEOF
17681cat confdefs.h >>conftest.$ac_ext
17682cat >>conftest.$ac_ext <<_ACEOF
17683/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017684
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017685#include <sys/param.h>
17686#ifdef _ZETA_MINAMI_INET6
17687yes
17688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017689_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017691 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017692 ipv6type=$i;
17693 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017694 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017695fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000017696rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017697
17698 ;;
17699 esac
17700 if test "$ipv6type" != "unknown"; then
17701 break
17702 fi
17703 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017704 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17705echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017706fi
17707
17708if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17709 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17710 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17711 echo "using lib$ipv6lib"
17712 else
17713 if test $ipv6trylibc = "yes"; then
17714 echo "using libc"
17715 else
17716 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17717 echo "You need to fetch lib$ipv6lib.a from appropriate"
17718 echo 'ipv6 kit and compile beforehand.'
17719 exit 1
17720 fi
17721 fi
17722fi
17723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017724{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17725echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017726cat >conftest.$ac_ext <<_ACEOF
17727/* confdefs.h. */
17728_ACEOF
17729cat confdefs.h >>conftest.$ac_ext
17730cat >>conftest.$ac_ext <<_ACEOF
17731/* end confdefs.h. */
17732#include <Carbon/Carbon.h>
17733int
17734main ()
17735{
17736FSIORefNum fRef = 0
17737 ;
17738 return 0;
17739}
17740_ACEOF
17741rm -f conftest.$ac_objext
17742if { (ac_try="$ac_compile"
17743case "(($ac_try" in
17744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17745 *) ac_try_echo=$ac_try;;
17746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017748 (eval "$ac_compile") 2>conftest.er1
17749 ac_status=$?
17750 grep -v '^ *+' conftest.er1 >conftest.err
17751 rm -f conftest.er1
17752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017754 (exit $ac_status); } && {
17755 test -z "$ac_c_werror_flag" ||
17756 test ! -s conftest.err
17757 } && test -s conftest.$ac_objext; then
17758
17759cat >>confdefs.h <<\_ACEOF
17760#define HAVE_OSX105_SDK 1
17761_ACEOF
17762
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017763 { echo "$as_me:$LINENO: result: yes" >&5
17764echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017765else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017766 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017767sed 's/^/| /' conftest.$ac_ext >&5
17768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017769 { echo "$as_me:$LINENO: result: no" >&5
17770echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017771
17772fi
17773
17774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17775
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017776# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017777{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17778echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017779
Martin v. Löwiseba40652007-08-30 20:10:57 +000017780# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017781if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017782 withval=$with_doc_strings;
17783fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017784
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017785
17786if test -z "$with_doc_strings"
17787then with_doc_strings="yes"
17788fi
17789if test "$with_doc_strings" != "no"
17790then
17791
17792cat >>confdefs.h <<\_ACEOF
17793#define WITH_DOC_STRINGS 1
17794_ACEOF
17795
17796fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017797{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17798echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017799
Neil Schemenauera35c6882001-02-27 04:45:05 +000017800# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017801{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17802echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017803
Martin v. Löwiseba40652007-08-30 20:10:57 +000017804# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017805if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017806 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017807if test "$withval" != no
17808then
17809
17810cat >>confdefs.h <<\_ACEOF
17811#define WITH_TSC 1
17812_ACEOF
17813
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017814 { echo "$as_me:$LINENO: result: yes" >&5
17815echo "${ECHO_T}yes" >&6; }
17816else { echo "$as_me:$LINENO: result: no" >&5
17817echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017818fi
17819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017820 { echo "$as_me:$LINENO: result: no" >&5
17821echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017822fi
17823
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017824
17825# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017826{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17827echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017828
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017830if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017831 withval=$with_pymalloc;
17832fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017833
Neil Schemenauera35c6882001-02-27 04:45:05 +000017834
Neil Schemenauer16c22972002-03-22 15:34:49 +000017835if test -z "$with_pymalloc"
17836then with_pymalloc="yes"
17837fi
17838if test "$with_pymalloc" != "no"
17839then
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
17841cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017842#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017843_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017844
17845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017846{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17847echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017848
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017849# Check for Valgrind support
17850{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17851echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17852
17853# Check whether --with-valgrind was given.
17854if test "${with_valgrind+set}" = set; then
17855 withval=$with_valgrind;
17856else
17857 with_valgrind=no
17858fi
17859
17860{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17861echo "${ECHO_T}$with_valgrind" >&6; }
17862if test "$with_valgrind" != no; then
17863 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17864 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17865echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17866if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17867 echo $ECHO_N "(cached) $ECHO_C" >&6
17868fi
17869{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17870echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17871else
17872 # Is the header compilable?
17873{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17874echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17875cat >conftest.$ac_ext <<_ACEOF
17876/* confdefs.h. */
17877_ACEOF
17878cat confdefs.h >>conftest.$ac_ext
17879cat >>conftest.$ac_ext <<_ACEOF
17880/* end confdefs.h. */
17881$ac_includes_default
17882#include <valgrind/valgrind.h>
17883_ACEOF
17884rm -f conftest.$ac_objext
17885if { (ac_try="$ac_compile"
17886case "(($ac_try" in
17887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17888 *) ac_try_echo=$ac_try;;
17889esac
17890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17891 (eval "$ac_compile") 2>conftest.er1
17892 ac_status=$?
17893 grep -v '^ *+' conftest.er1 >conftest.err
17894 rm -f conftest.er1
17895 cat conftest.err >&5
17896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17897 (exit $ac_status); } && {
17898 test -z "$ac_c_werror_flag" ||
17899 test ! -s conftest.err
17900 } && test -s conftest.$ac_objext; then
17901 ac_header_compiler=yes
17902else
17903 echo "$as_me: failed program was:" >&5
17904sed 's/^/| /' conftest.$ac_ext >&5
17905
17906 ac_header_compiler=no
17907fi
17908
17909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17910{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17911echo "${ECHO_T}$ac_header_compiler" >&6; }
17912
17913# Is the header present?
17914{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17915echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17916cat >conftest.$ac_ext <<_ACEOF
17917/* confdefs.h. */
17918_ACEOF
17919cat confdefs.h >>conftest.$ac_ext
17920cat >>conftest.$ac_ext <<_ACEOF
17921/* end confdefs.h. */
17922#include <valgrind/valgrind.h>
17923_ACEOF
17924if { (ac_try="$ac_cpp conftest.$ac_ext"
17925case "(($ac_try" in
17926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17927 *) ac_try_echo=$ac_try;;
17928esac
17929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17931 ac_status=$?
17932 grep -v '^ *+' conftest.er1 >conftest.err
17933 rm -f conftest.er1
17934 cat conftest.err >&5
17935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17936 (exit $ac_status); } >/dev/null && {
17937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17938 test ! -s conftest.err
17939 }; then
17940 ac_header_preproc=yes
17941else
17942 echo "$as_me: failed program was:" >&5
17943sed 's/^/| /' conftest.$ac_ext >&5
17944
17945 ac_header_preproc=no
17946fi
17947
17948rm -f conftest.err conftest.$ac_ext
17949{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17950echo "${ECHO_T}$ac_header_preproc" >&6; }
17951
17952# So? What about this header?
17953case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17954 yes:no: )
17955 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17956echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17957 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17958echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17959 ac_header_preproc=yes
17960 ;;
17961 no:yes:* )
17962 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17963echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17964 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17965echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17966 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17967echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17968 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17969echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17970 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17971echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17972 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17973echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17974 ( cat <<\_ASBOX
17975## -------------------------------------- ##
17976## Report this to http://bugs.python.org/ ##
17977## -------------------------------------- ##
17978_ASBOX
17979 ) | sed "s/^/$as_me: WARNING: /" >&2
17980 ;;
17981esac
17982{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17983echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17984if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17985 echo $ECHO_N "(cached) $ECHO_C" >&6
17986else
17987 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17988fi
17989{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17990echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17991
17992fi
17993if test $ac_cv_header_valgrind_valgrind_h = yes; then
17994
17995cat >>confdefs.h <<\_ACEOF
17996#define WITH_VALGRIND 1
17997_ACEOF
17998
17999else
18000 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
18001echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
18002 { (exit 1); exit 1; }; }
18003
18004fi
18005
18006
18007fi
18008
Barry Warsawef82cd72000-06-30 16:21:01 +000018009# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018010{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18011echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018012
Martin v. Löwiseba40652007-08-30 20:10:57 +000018013# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018014if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018015 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018016if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018017then
18018
18019cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018020#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018021_ACEOF
18022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018023 { echo "$as_me:$LINENO: result: yes" >&5
18024echo "${ECHO_T}yes" >&6; }
18025else { echo "$as_me:$LINENO: result: no" >&5
18026echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018027fi
18028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018029 { echo "$as_me:$LINENO: result: no" >&5
18030echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018031fi
18032
Barry Warsawef82cd72000-06-30 16:21:01 +000018033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018034# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018035
Guido van Rossum98935bf2001-09-05 19:13:16 +000018036DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018037
Guido van Rossume97ee181999-12-20 21:27:22 +000018038# the dlopen() function means we might want to use dynload_shlib.o. some
18039# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018040
Thomas Wouters3a584202000-08-05 23:28:51 +000018041for ac_func in dlopen
18042do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18044{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018046if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018047 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018048else
Martin v. Löwis11437992002-04-12 09:54:03 +000018049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018050/* confdefs.h. */
18051_ACEOF
18052cat confdefs.h >>conftest.$ac_ext
18053cat >>conftest.$ac_ext <<_ACEOF
18054/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018055/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18056 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18057#define $ac_func innocuous_$ac_func
18058
Guido van Rossume97ee181999-12-20 21:27:22 +000018059/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018060 which can conflict with char $ac_func (); below.
18061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018062 <limits.h> exists even on freestanding compilers. */
18063
18064#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018065# include <limits.h>
18066#else
18067# include <assert.h>
18068#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018069
18070#undef $ac_func
18071
Martin v. Löwiseba40652007-08-30 20:10:57 +000018072/* Override any GCC internal prototype to avoid an error.
18073 Use char because int might match the return type of a GCC
18074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018075#ifdef __cplusplus
18076extern "C"
18077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018078char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018079/* The GNU C library defines this for functions which it implements
18080 to always fail with ENOSYS. Some functions are actually named
18081 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018082#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018083choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018084#endif
18085
Skip Montanaro6dead952003-09-25 14:50:04 +000018086int
18087main ()
18088{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018089return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 ;
18091 return 0;
18092}
18093_ACEOF
18094rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018095if { (ac_try="$ac_link"
18096case "(($ac_try" in
18097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18098 *) ac_try_echo=$ac_try;;
18099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018101 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018103 grep -v '^ *+' conftest.er1 >conftest.err
18104 rm -f conftest.er1
18105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018107 (exit $ac_status); } && {
18108 test -z "$ac_c_werror_flag" ||
18109 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018110 } && test -s conftest$ac_exeext &&
18111 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018115sed 's/^/| /' conftest.$ac_ext >&5
18116
Martin v. Löwiseba40652007-08-30 20:10:57 +000018117 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018119
18120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018121 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018123ac_res=`eval echo '${'$as_ac_var'}'`
18124 { echo "$as_me:$LINENO: result: $ac_res" >&5
18125echo "${ECHO_T}$ac_res" >&6; }
18126if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018127 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018128#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018129_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018130
Guido van Rossume97ee181999-12-20 21:27:22 +000018131fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018132done
Guido van Rossume97ee181999-12-20 21:27:22 +000018133
Michael W. Hudson54241132001-12-07 15:38:26 +000018134
Guido van Rossume97ee181999-12-20 21:27:22 +000018135# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18136# loading of modules.
18137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018138{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18139echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018140if test -z "$DYNLOADFILE"
18141then
18142 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018143 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18144 if test "$ac_cv_func_dlopen" = yes
18145 then DYNLOADFILE="dynload_shlib.o"
18146 else DYNLOADFILE="dynload_aix.o"
18147 fi
18148 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018149 BeOS*) DYNLOADFILE="dynload_beos.o";;
18150 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018151 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18152 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018153 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018154 *)
18155 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18156 # out any dynamic loading
18157 if test "$ac_cv_func_dlopen" = yes
18158 then DYNLOADFILE="dynload_shlib.o"
18159 else DYNLOADFILE="dynload_stub.o"
18160 fi
18161 ;;
18162 esac
18163fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018164{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18165echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018166if test "$DYNLOADFILE" != "dynload_stub.o"
18167then
Martin v. Löwis11437992002-04-12 09:54:03 +000018168
18169cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018170#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018171_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018172
18173fi
18174
Neil Schemenauer4e425612001-06-19 15:44:15 +000018175# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18176
Michael W. Hudson54241132001-12-07 15:38:26 +000018177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018178{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18179echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018180if test -z "$MACHDEP_OBJS"
18181then
Jack Jansene578a632001-08-15 01:27:14 +000018182 MACHDEP_OBJS=$extra_machdep_objs
18183else
18184 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018185fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018186{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18187echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018188
Guido van Rossum627b2d71993-12-24 10:39:16 +000018189# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
Martin v. Löwisd6320502004-08-12 13:45:08 +000018261
Martin v. Löwisc3001752005-01-23 09:27:24 +000018262
18263
Neal Norwitz05a45592006-03-20 06:30:08 +000018264
18265
Martin v. Löwis382abef2007-02-19 10:55:19 +000018266
18267
Christian Heimes36281872007-11-30 21:11:28 +000018268
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018269
18270
Jesse Noller355b1262009-04-02 00:03:28 +000018271
18272
18273
18274
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018288
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018289for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18290 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018291 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018292 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018293 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018294 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018295 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018296 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18297 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018298 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018299 setlocale setregid setreuid setresuid setresgid \
18300 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018301 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018302 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018303 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018304do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018305as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18306{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18307echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018308if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018309 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018310else
Martin v. Löwis11437992002-04-12 09:54:03 +000018311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018312/* confdefs.h. */
18313_ACEOF
18314cat confdefs.h >>conftest.$ac_ext
18315cat >>conftest.$ac_ext <<_ACEOF
18316/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018317/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18318 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18319#define $ac_func innocuous_$ac_func
18320
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018322 which can conflict with char $ac_func (); below.
18323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018324 <limits.h> exists even on freestanding compilers. */
18325
18326#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018327# include <limits.h>
18328#else
18329# include <assert.h>
18330#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018331
18332#undef $ac_func
18333
Martin v. Löwiseba40652007-08-30 20:10:57 +000018334/* Override any GCC internal prototype to avoid an error.
18335 Use char because int might match the return type of a GCC
18336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018337#ifdef __cplusplus
18338extern "C"
18339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018340char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018341/* The GNU C library defines this for functions which it implements
18342 to always fail with ENOSYS. Some functions are actually named
18343 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018344#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018345choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018346#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018347
Skip Montanaro6dead952003-09-25 14:50:04 +000018348int
18349main ()
18350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018351return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018352 ;
18353 return 0;
18354}
18355_ACEOF
18356rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357if { (ac_try="$ac_link"
18358case "(($ac_try" in
18359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18360 *) ac_try_echo=$ac_try;;
18361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018365 grep -v '^ *+' conftest.er1 >conftest.err
18366 rm -f conftest.er1
18367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018369 (exit $ac_status); } && {
18370 test -z "$ac_c_werror_flag" ||
18371 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018372 } && test -s conftest$ac_exeext &&
18373 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018377sed 's/^/| /' conftest.$ac_ext >&5
18378
Martin v. Löwiseba40652007-08-30 20:10:57 +000018379 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018381
18382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018383 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018384fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018385ac_res=`eval echo '${'$as_ac_var'}'`
18386 { echo "$as_me:$LINENO: result: $ac_res" >&5
18387echo "${ECHO_T}$ac_res" >&6; }
18388if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018389 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018390#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018391_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018393fi
18394done
18395
Michael W. Hudson54241132001-12-07 15:38:26 +000018396
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018397# For some functions, having a definition is not sufficient, since
18398# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018399{ echo "$as_me:$LINENO: checking for chroot" >&5
18400echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018402/* confdefs.h. */
18403_ACEOF
18404cat confdefs.h >>conftest.$ac_ext
18405cat >>conftest.$ac_ext <<_ACEOF
18406/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018407#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018408int
18409main ()
18410{
18411void *x=chroot
18412 ;
18413 return 0;
18414}
18415_ACEOF
18416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417if { (ac_try="$ac_compile"
18418case "(($ac_try" in
18419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18420 *) ac_try_echo=$ac_try;;
18421esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018425 grep -v '^ *+' conftest.er1 >conftest.err
18426 rm -f conftest.er1
18427 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018429 (exit $ac_status); } && {
18430 test -z "$ac_c_werror_flag" ||
18431 test ! -s conftest.err
18432 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018433
18434cat >>confdefs.h <<\_ACEOF
18435#define HAVE_CHROOT 1
18436_ACEOF
18437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018438 { echo "$as_me:$LINENO: result: yes" >&5
18439echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018442sed 's/^/| /' conftest.$ac_ext >&5
18443
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018444 { echo "$as_me:$LINENO: result: no" >&5
18445echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018446
18447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018448
18449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018450{ echo "$as_me:$LINENO: checking for link" >&5
18451echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018458#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018459int
18460main ()
18461{
18462void *x=link
18463 ;
18464 return 0;
18465}
18466_ACEOF
18467rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018468if { (ac_try="$ac_compile"
18469case "(($ac_try" in
18470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18471 *) ac_try_echo=$ac_try;;
18472esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018475 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018476 grep -v '^ *+' conftest.er1 >conftest.err
18477 rm -f conftest.er1
18478 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018480 (exit $ac_status); } && {
18481 test -z "$ac_c_werror_flag" ||
18482 test ! -s conftest.err
18483 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018484
18485cat >>confdefs.h <<\_ACEOF
18486#define HAVE_LINK 1
18487_ACEOF
18488
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018489 { echo "$as_me:$LINENO: result: yes" >&5
18490echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018493sed 's/^/| /' conftest.$ac_ext >&5
18494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018495 { echo "$as_me:$LINENO: result: no" >&5
18496echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018497
18498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499
18500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018501{ echo "$as_me:$LINENO: checking for symlink" >&5
18502echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018504/* confdefs.h. */
18505_ACEOF
18506cat confdefs.h >>conftest.$ac_ext
18507cat >>conftest.$ac_ext <<_ACEOF
18508/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018509#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018510int
18511main ()
18512{
18513void *x=symlink
18514 ;
18515 return 0;
18516}
18517_ACEOF
18518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018519if { (ac_try="$ac_compile"
18520case "(($ac_try" in
18521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18522 *) ac_try_echo=$ac_try;;
18523esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 grep -v '^ *+' conftest.er1 >conftest.err
18528 rm -f conftest.er1
18529 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531 (exit $ac_status); } && {
18532 test -z "$ac_c_werror_flag" ||
18533 test ! -s conftest.err
18534 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018535
18536cat >>confdefs.h <<\_ACEOF
18537#define HAVE_SYMLINK 1
18538_ACEOF
18539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018540 { echo "$as_me:$LINENO: result: yes" >&5
18541echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018544sed 's/^/| /' conftest.$ac_ext >&5
18545
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018546 { echo "$as_me:$LINENO: result: no" >&5
18547echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018548
18549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550
18551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018552{ echo "$as_me:$LINENO: checking for fchdir" >&5
18553echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018555/* confdefs.h. */
18556_ACEOF
18557cat confdefs.h >>conftest.$ac_ext
18558cat >>conftest.$ac_ext <<_ACEOF
18559/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018560#include <unistd.h>
18561int
18562main ()
18563{
18564void *x=fchdir
18565 ;
18566 return 0;
18567}
18568_ACEOF
18569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570if { (ac_try="$ac_compile"
18571case "(($ac_try" in
18572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18573 *) ac_try_echo=$ac_try;;
18574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018578 grep -v '^ *+' conftest.er1 >conftest.err
18579 rm -f conftest.er1
18580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582 (exit $ac_status); } && {
18583 test -z "$ac_c_werror_flag" ||
18584 test ! -s conftest.err
18585 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018586
18587cat >>confdefs.h <<\_ACEOF
18588#define HAVE_FCHDIR 1
18589_ACEOF
18590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018591 { echo "$as_me:$LINENO: result: yes" >&5
18592echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018595sed 's/^/| /' conftest.$ac_ext >&5
18596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018597 { echo "$as_me:$LINENO: result: no" >&5
18598echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018599
18600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601
18602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018603{ echo "$as_me:$LINENO: checking for fsync" >&5
18604echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018606/* confdefs.h. */
18607_ACEOF
18608cat confdefs.h >>conftest.$ac_ext
18609cat >>conftest.$ac_ext <<_ACEOF
18610/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018611#include <unistd.h>
18612int
18613main ()
18614{
18615void *x=fsync
18616 ;
18617 return 0;
18618}
18619_ACEOF
18620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018621if { (ac_try="$ac_compile"
18622case "(($ac_try" in
18623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18624 *) ac_try_echo=$ac_try;;
18625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018629 grep -v '^ *+' conftest.er1 >conftest.err
18630 rm -f conftest.er1
18631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633 (exit $ac_status); } && {
18634 test -z "$ac_c_werror_flag" ||
18635 test ! -s conftest.err
18636 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018637
18638cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018639#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018640_ACEOF
18641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018642 { echo "$as_me:$LINENO: result: yes" >&5
18643echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018646sed 's/^/| /' conftest.$ac_ext >&5
18647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018648 { echo "$as_me:$LINENO: result: no" >&5
18649echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018650
18651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652
18653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018654{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18655echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018657/* confdefs.h. */
18658_ACEOF
18659cat confdefs.h >>conftest.$ac_ext
18660cat >>conftest.$ac_ext <<_ACEOF
18661/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018662#include <unistd.h>
18663int
18664main ()
18665{
18666void *x=fdatasync
18667 ;
18668 return 0;
18669}
18670_ACEOF
18671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672if { (ac_try="$ac_compile"
18673case "(($ac_try" in
18674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18675 *) ac_try_echo=$ac_try;;
18676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018680 grep -v '^ *+' conftest.er1 >conftest.err
18681 rm -f conftest.er1
18682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018684 (exit $ac_status); } && {
18685 test -z "$ac_c_werror_flag" ||
18686 test ! -s conftest.err
18687 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018688
18689cat >>confdefs.h <<\_ACEOF
18690#define HAVE_FDATASYNC 1
18691_ACEOF
18692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693 { echo "$as_me:$LINENO: result: yes" >&5
18694echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018695else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018697sed 's/^/| /' conftest.$ac_ext >&5
18698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018699 { echo "$as_me:$LINENO: result: no" >&5
18700echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018701
18702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703
18704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018705{ echo "$as_me:$LINENO: checking for epoll" >&5
18706echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018707cat >conftest.$ac_ext <<_ACEOF
18708/* confdefs.h. */
18709_ACEOF
18710cat confdefs.h >>conftest.$ac_ext
18711cat >>conftest.$ac_ext <<_ACEOF
18712/* end confdefs.h. */
18713#include <sys/epoll.h>
18714int
18715main ()
18716{
18717void *x=epoll_create
18718 ;
18719 return 0;
18720}
18721_ACEOF
18722rm -f conftest.$ac_objext
18723if { (ac_try="$ac_compile"
18724case "(($ac_try" in
18725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18726 *) ac_try_echo=$ac_try;;
18727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018729 (eval "$ac_compile") 2>conftest.er1
18730 ac_status=$?
18731 grep -v '^ *+' conftest.er1 >conftest.err
18732 rm -f conftest.er1
18733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018735 (exit $ac_status); } && {
18736 test -z "$ac_c_werror_flag" ||
18737 test ! -s conftest.err
18738 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018739
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018740cat >>confdefs.h <<\_ACEOF
18741#define HAVE_EPOLL 1
18742_ACEOF
18743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018744 { echo "$as_me:$LINENO: result: yes" >&5
18745echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018747 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018748sed 's/^/| /' conftest.$ac_ext >&5
18749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018750 { echo "$as_me:$LINENO: result: no" >&5
18751echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018752
18753fi
18754
18755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018756{ echo "$as_me:$LINENO: checking for kqueue" >&5
18757echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018758cat >conftest.$ac_ext <<_ACEOF
18759/* confdefs.h. */
18760_ACEOF
18761cat confdefs.h >>conftest.$ac_ext
18762cat >>conftest.$ac_ext <<_ACEOF
18763/* end confdefs.h. */
18764
18765#include <sys/types.h>
18766#include <sys/event.h>
18767
18768int
18769main ()
18770{
18771int x=kqueue()
18772 ;
18773 return 0;
18774}
18775_ACEOF
18776rm -f conftest.$ac_objext
18777if { (ac_try="$ac_compile"
18778case "(($ac_try" in
18779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18780 *) ac_try_echo=$ac_try;;
18781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018783 (eval "$ac_compile") 2>conftest.er1
18784 ac_status=$?
18785 grep -v '^ *+' conftest.er1 >conftest.err
18786 rm -f conftest.er1
18787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018789 (exit $ac_status); } && {
18790 test -z "$ac_c_werror_flag" ||
18791 test ! -s conftest.err
18792 } && test -s conftest.$ac_objext; then
18793
18794cat >>confdefs.h <<\_ACEOF
18795#define HAVE_KQUEUE 1
18796_ACEOF
18797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018798 { echo "$as_me:$LINENO: result: yes" >&5
18799echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018800else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018801 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018802sed 's/^/| /' conftest.$ac_ext >&5
18803
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018804 { echo "$as_me:$LINENO: result: no" >&5
18805echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018806
18807fi
18808
18809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018810# On some systems (eg. FreeBSD 5), we would find a definition of the
18811# functions ctermid_r, setgroups in the library, but no prototype
18812# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18813# address to avoid compiler warnings and potential miscompilations
18814# because of the missing prototypes.
18815
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018816{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18817echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018819/* confdefs.h. */
18820_ACEOF
18821cat confdefs.h >>conftest.$ac_ext
18822cat >>conftest.$ac_ext <<_ACEOF
18823/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018824
18825#include "confdefs.h"
18826#include <stdio.h>
18827
Martin v. Löwisd5843682002-11-21 20:41:28 +000018828int
18829main ()
18830{
18831void* p = ctermid_r
18832 ;
18833 return 0;
18834}
18835_ACEOF
18836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018837if { (ac_try="$ac_compile"
18838case "(($ac_try" in
18839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18840 *) ac_try_echo=$ac_try;;
18841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018845 grep -v '^ *+' conftest.er1 >conftest.err
18846 rm -f conftest.er1
18847 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018849 (exit $ac_status); } && {
18850 test -z "$ac_c_werror_flag" ||
18851 test ! -s conftest.err
18852 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018853
18854cat >>confdefs.h <<\_ACEOF
18855#define HAVE_CTERMID_R 1
18856_ACEOF
18857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018858 { echo "$as_me:$LINENO: result: yes" >&5
18859echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018862sed 's/^/| /' conftest.$ac_ext >&5
18863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018864 { echo "$as_me:$LINENO: result: no" >&5
18865echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018866
18867fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018868
Martin v. Löwiseba40652007-08-30 20:10:57 +000018869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18870
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018871{ echo "$as_me:$LINENO: checking for flock" >&5
18872echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018874/* confdefs.h. */
18875_ACEOF
18876cat confdefs.h >>conftest.$ac_ext
18877cat >>conftest.$ac_ext <<_ACEOF
18878/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018879
18880#include "confdefs.h"
18881#include <sys/file.h>
18882
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018883int
18884main ()
18885{
18886void* p = flock
18887 ;
18888 return 0;
18889}
18890_ACEOF
18891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018892if { (ac_try="$ac_compile"
18893case "(($ac_try" in
18894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18895 *) ac_try_echo=$ac_try;;
18896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018900 grep -v '^ *+' conftest.er1 >conftest.err
18901 rm -f conftest.er1
18902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904 (exit $ac_status); } && {
18905 test -z "$ac_c_werror_flag" ||
18906 test ! -s conftest.err
18907 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018908
18909cat >>confdefs.h <<\_ACEOF
18910#define HAVE_FLOCK 1
18911_ACEOF
18912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018913 { echo "$as_me:$LINENO: result: yes" >&5
18914echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018917sed 's/^/| /' conftest.$ac_ext >&5
18918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018919 { echo "$as_me:$LINENO: result: no" >&5
18920echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018921
18922fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018923
Martin v. Löwiseba40652007-08-30 20:10:57 +000018924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18925
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018926{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18927echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018929/* confdefs.h. */
18930_ACEOF
18931cat confdefs.h >>conftest.$ac_ext
18932cat >>conftest.$ac_ext <<_ACEOF
18933/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018934
18935#include "confdefs.h"
18936#include <unistd.h>
18937
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018938int
18939main ()
18940{
18941void* p = getpagesize
18942 ;
18943 return 0;
18944}
18945_ACEOF
18946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018947if { (ac_try="$ac_compile"
18948case "(($ac_try" in
18949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18950 *) ac_try_echo=$ac_try;;
18951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018955 grep -v '^ *+' conftest.er1 >conftest.err
18956 rm -f conftest.er1
18957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959 (exit $ac_status); } && {
18960 test -z "$ac_c_werror_flag" ||
18961 test ! -s conftest.err
18962 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018963
18964cat >>confdefs.h <<\_ACEOF
18965#define HAVE_GETPAGESIZE 1
18966_ACEOF
18967
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018968 { echo "$as_me:$LINENO: result: yes" >&5
18969echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018971 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018972sed 's/^/| /' conftest.$ac_ext >&5
18973
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018974 { echo "$as_me:$LINENO: result: no" >&5
18975echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018976
18977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018978
18979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018981for ac_prog in true
18982do
18983 # Extract the first word of "$ac_prog", so it can be a program name with args.
18984set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018985{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018987if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018989else
18990 if test -n "$TRUE"; then
18991 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18992else
18993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18994for as_dir in $PATH
18995do
18996 IFS=$as_save_IFS
18997 test -z "$as_dir" && as_dir=.
18998 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018999 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 +000019000 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019002 break 2
19003 fi
19004done
19005done
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019007
19008fi
19009fi
19010TRUE=$ac_cv_prog_TRUE
19011if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019012 { echo "$as_me:$LINENO: result: $TRUE" >&5
19013echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019015 { echo "$as_me:$LINENO: result: no" >&5
19016echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019017fi
19018
Martin v. Löwiseba40652007-08-30 20:10:57 +000019019
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019020 test -n "$TRUE" && break
19021done
19022test -n "$TRUE" || TRUE="/bin/true"
19023
19024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019025{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19026echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019027if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019028 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019029else
19030 ac_check_lib_save_LIBS=$LIBS
19031LIBS="-lc $LIBS"
19032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019033/* confdefs.h. */
19034_ACEOF
19035cat confdefs.h >>conftest.$ac_ext
19036cat >>conftest.$ac_ext <<_ACEOF
19037/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019038
Martin v. Löwiseba40652007-08-30 20:10:57 +000019039/* Override any GCC internal prototype to avoid an error.
19040 Use char because int might match the return type of a GCC
19041 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019042#ifdef __cplusplus
19043extern "C"
19044#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019045char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019046int
19047main ()
19048{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019049return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019050 ;
19051 return 0;
19052}
19053_ACEOF
19054rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019055if { (ac_try="$ac_link"
19056case "(($ac_try" in
19057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19058 *) ac_try_echo=$ac_try;;
19059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 grep -v '^ *+' conftest.er1 >conftest.err
19064 rm -f conftest.er1
19065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019067 (exit $ac_status); } && {
19068 test -z "$ac_c_werror_flag" ||
19069 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019070 } && test -s conftest$ac_exeext &&
19071 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019072 ac_cv_lib_c_inet_aton=yes
19073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019075sed 's/^/| /' conftest.$ac_ext >&5
19076
Martin v. Löwiseba40652007-08-30 20:10:57 +000019077 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079
19080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019082LIBS=$ac_check_lib_save_LIBS
19083fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019084{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19085echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19086if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019087 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019088else
19089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019090{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19091echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019092if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019093 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019094else
19095 ac_check_lib_save_LIBS=$LIBS
19096LIBS="-lresolv $LIBS"
19097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019098/* confdefs.h. */
19099_ACEOF
19100cat confdefs.h >>conftest.$ac_ext
19101cat >>conftest.$ac_ext <<_ACEOF
19102/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019103
Martin v. Löwiseba40652007-08-30 20:10:57 +000019104/* Override any GCC internal prototype to avoid an error.
19105 Use char because int might match the return type of a GCC
19106 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019107#ifdef __cplusplus
19108extern "C"
19109#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019110char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019111int
19112main ()
19113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019115 ;
19116 return 0;
19117}
19118_ACEOF
19119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019120if { (ac_try="$ac_link"
19121case "(($ac_try" in
19122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19123 *) ac_try_echo=$ac_try;;
19124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019128 grep -v '^ *+' conftest.er1 >conftest.err
19129 rm -f conftest.er1
19130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019132 (exit $ac_status); } && {
19133 test -z "$ac_c_werror_flag" ||
19134 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019135 } && test -s conftest$ac_exeext &&
19136 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019137 ac_cv_lib_resolv_inet_aton=yes
19138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019140sed 's/^/| /' conftest.$ac_ext >&5
19141
Martin v. Löwiseba40652007-08-30 20:10:57 +000019142 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019144
19145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019147LIBS=$ac_check_lib_save_LIBS
19148fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019149{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19150echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19151if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019152 cat >>confdefs.h <<_ACEOF
19153#define HAVE_LIBRESOLV 1
19154_ACEOF
19155
19156 LIBS="-lresolv $LIBS"
19157
19158fi
19159
19160
19161fi
19162
19163
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019164# On Tru64, chflags seems to be present, but calling it will
19165# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019166{ echo "$as_me:$LINENO: checking for chflags" >&5
19167echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019168if test "${ac_cv_have_chflags+set}" = set; then
19169 echo $ECHO_N "(cached) $ECHO_C" >&6
19170else
19171 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019172 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019173else
19174 cat >conftest.$ac_ext <<_ACEOF
19175/* confdefs.h. */
19176_ACEOF
19177cat confdefs.h >>conftest.$ac_ext
19178cat >>conftest.$ac_ext <<_ACEOF
19179/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019180[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019181#include <sys/stat.h>
19182#include <unistd.h>
19183int main(int argc, char*argv[])
19184{
19185 if(chflags(argv[0], 0) != 0)
19186 return 1;
19187 return 0;
19188}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019189]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019190_ACEOF
19191rm -f conftest$ac_exeext
19192if { (ac_try="$ac_link"
19193case "(($ac_try" in
19194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19195 *) ac_try_echo=$ac_try;;
19196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019198 (eval "$ac_link") 2>&5
19199 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019201 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19202 { (case "(($ac_try" in
19203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19204 *) ac_try_echo=$ac_try;;
19205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019207 (eval "$ac_try") 2>&5
19208 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019210 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019211 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019212else
19213 echo "$as_me: program exited with status $ac_status" >&5
19214echo "$as_me: failed program was:" >&5
19215sed 's/^/| /' conftest.$ac_ext >&5
19216
19217( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019218ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019219fi
19220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000019221fi
19222
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019223
19224
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019225fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019226{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19227echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019228if test "$ac_cv_have_chflags" = cross ; then
19229 { echo "$as_me:$LINENO: checking for chflags" >&5
19230echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19231if test "${ac_cv_func_chflags+set}" = set; then
19232 echo $ECHO_N "(cached) $ECHO_C" >&6
19233else
19234 cat >conftest.$ac_ext <<_ACEOF
19235/* confdefs.h. */
19236_ACEOF
19237cat confdefs.h >>conftest.$ac_ext
19238cat >>conftest.$ac_ext <<_ACEOF
19239/* end confdefs.h. */
19240/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19242#define chflags innocuous_chflags
19243
19244/* System header to define __stub macros and hopefully few prototypes,
19245 which can conflict with char chflags (); below.
19246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19247 <limits.h> exists even on freestanding compilers. */
19248
19249#ifdef __STDC__
19250# include <limits.h>
19251#else
19252# include <assert.h>
19253#endif
19254
19255#undef chflags
19256
19257/* Override any GCC internal prototype to avoid an error.
19258 Use char because int might match the return type of a GCC
19259 builtin and then its argument prototype would still apply. */
19260#ifdef __cplusplus
19261extern "C"
19262#endif
19263char chflags ();
19264/* The GNU C library defines this for functions which it implements
19265 to always fail with ENOSYS. Some functions are actually named
19266 something starting with __ and the normal name is an alias. */
19267#if defined __stub_chflags || defined __stub___chflags
19268choke me
19269#endif
19270
19271int
19272main ()
19273{
19274return chflags ();
19275 ;
19276 return 0;
19277}
19278_ACEOF
19279rm -f conftest.$ac_objext conftest$ac_exeext
19280if { (ac_try="$ac_link"
19281case "(($ac_try" in
19282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19283 *) ac_try_echo=$ac_try;;
19284esac
19285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19286 (eval "$ac_link") 2>conftest.er1
19287 ac_status=$?
19288 grep -v '^ *+' conftest.er1 >conftest.err
19289 rm -f conftest.er1
19290 cat conftest.err >&5
19291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19292 (exit $ac_status); } && {
19293 test -z "$ac_c_werror_flag" ||
19294 test ! -s conftest.err
19295 } && test -s conftest$ac_exeext &&
19296 $as_test_x conftest$ac_exeext; then
19297 ac_cv_func_chflags=yes
19298else
19299 echo "$as_me: failed program was:" >&5
19300sed 's/^/| /' conftest.$ac_ext >&5
19301
19302 ac_cv_func_chflags=no
19303fi
19304
19305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19306 conftest$ac_exeext conftest.$ac_ext
19307fi
19308{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19309echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19310if test $ac_cv_func_chflags = yes; then
19311 ac_cv_have_chflags="yes"
19312else
19313 ac_cv_have_chflags="no"
19314fi
19315
19316fi
19317if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019318
19319cat >>confdefs.h <<\_ACEOF
19320#define HAVE_CHFLAGS 1
19321_ACEOF
19322
19323fi
19324
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019325{ echo "$as_me:$LINENO: checking for lchflags" >&5
19326echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019327if test "${ac_cv_have_lchflags+set}" = set; then
19328 echo $ECHO_N "(cached) $ECHO_C" >&6
19329else
19330 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019331 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019332else
19333 cat >conftest.$ac_ext <<_ACEOF
19334/* confdefs.h. */
19335_ACEOF
19336cat confdefs.h >>conftest.$ac_ext
19337cat >>conftest.$ac_ext <<_ACEOF
19338/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019339[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019340#include <sys/stat.h>
19341#include <unistd.h>
19342int main(int argc, char*argv[])
19343{
19344 if(lchflags(argv[0], 0) != 0)
19345 return 1;
19346 return 0;
19347}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019348]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019349_ACEOF
19350rm -f conftest$ac_exeext
19351if { (ac_try="$ac_link"
19352case "(($ac_try" in
19353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19354 *) ac_try_echo=$ac_try;;
19355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019357 (eval "$ac_link") 2>&5
19358 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019360 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19361 { (case "(($ac_try" in
19362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19363 *) ac_try_echo=$ac_try;;
19364esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019366 (eval "$ac_try") 2>&5
19367 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019369 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019370 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019371else
19372 echo "$as_me: program exited with status $ac_status" >&5
19373echo "$as_me: failed program was:" >&5
19374sed 's/^/| /' conftest.$ac_ext >&5
19375
19376( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019377ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019378fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19380fi
19381
19382
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019383
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019384fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019385{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19386echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019387if test "$ac_cv_have_lchflags" = cross ; then
19388 { echo "$as_me:$LINENO: checking for lchflags" >&5
19389echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19390if test "${ac_cv_func_lchflags+set}" = set; then
19391 echo $ECHO_N "(cached) $ECHO_C" >&6
19392else
19393 cat >conftest.$ac_ext <<_ACEOF
19394/* confdefs.h. */
19395_ACEOF
19396cat confdefs.h >>conftest.$ac_ext
19397cat >>conftest.$ac_ext <<_ACEOF
19398/* end confdefs.h. */
19399/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19400 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19401#define lchflags innocuous_lchflags
19402
19403/* System header to define __stub macros and hopefully few prototypes,
19404 which can conflict with char lchflags (); below.
19405 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19406 <limits.h> exists even on freestanding compilers. */
19407
19408#ifdef __STDC__
19409# include <limits.h>
19410#else
19411# include <assert.h>
19412#endif
19413
19414#undef lchflags
19415
19416/* Override any GCC internal prototype to avoid an error.
19417 Use char because int might match the return type of a GCC
19418 builtin and then its argument prototype would still apply. */
19419#ifdef __cplusplus
19420extern "C"
19421#endif
19422char lchflags ();
19423/* The GNU C library defines this for functions which it implements
19424 to always fail with ENOSYS. Some functions are actually named
19425 something starting with __ and the normal name is an alias. */
19426#if defined __stub_lchflags || defined __stub___lchflags
19427choke me
19428#endif
19429
19430int
19431main ()
19432{
19433return lchflags ();
19434 ;
19435 return 0;
19436}
19437_ACEOF
19438rm -f conftest.$ac_objext conftest$ac_exeext
19439if { (ac_try="$ac_link"
19440case "(($ac_try" in
19441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19442 *) ac_try_echo=$ac_try;;
19443esac
19444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19445 (eval "$ac_link") 2>conftest.er1
19446 ac_status=$?
19447 grep -v '^ *+' conftest.er1 >conftest.err
19448 rm -f conftest.er1
19449 cat conftest.err >&5
19450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19451 (exit $ac_status); } && {
19452 test -z "$ac_c_werror_flag" ||
19453 test ! -s conftest.err
19454 } && test -s conftest$ac_exeext &&
19455 $as_test_x conftest$ac_exeext; then
19456 ac_cv_func_lchflags=yes
19457else
19458 echo "$as_me: failed program was:" >&5
19459sed 's/^/| /' conftest.$ac_ext >&5
19460
19461 ac_cv_func_lchflags=no
19462fi
19463
19464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19465 conftest$ac_exeext conftest.$ac_ext
19466fi
19467{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19468echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19469if test $ac_cv_func_lchflags = yes; then
19470 ac_cv_have_lchflags="yes"
19471else
19472 ac_cv_have_lchflags="no"
19473fi
19474
19475fi
19476if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019477
19478cat >>confdefs.h <<\_ACEOF
19479#define HAVE_LCHFLAGS 1
19480_ACEOF
19481
19482fi
19483
Ronald Oussorenf8752642006-07-06 10:13:35 +000019484case $ac_sys_system/$ac_sys_release in
19485Darwin/*)
19486 _CUR_CFLAGS="${CFLAGS}"
19487 _CUR_LDFLAGS="${LDFLAGS}"
19488 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19489 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19490 ;;
19491esac
19492
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019493{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19494echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019495if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019496 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019497else
19498 ac_check_lib_save_LIBS=$LIBS
19499LIBS="-lz $LIBS"
19500cat >conftest.$ac_ext <<_ACEOF
19501/* confdefs.h. */
19502_ACEOF
19503cat confdefs.h >>conftest.$ac_ext
19504cat >>conftest.$ac_ext <<_ACEOF
19505/* end confdefs.h. */
19506
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507/* Override any GCC internal prototype to avoid an error.
19508 Use char because int might match the return type of a GCC
19509 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019510#ifdef __cplusplus
19511extern "C"
19512#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019513char inflateCopy ();
19514int
19515main ()
19516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019517return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019518 ;
19519 return 0;
19520}
19521_ACEOF
19522rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019523if { (ac_try="$ac_link"
19524case "(($ac_try" in
19525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19526 *) ac_try_echo=$ac_try;;
19527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019529 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019530 ac_status=$?
19531 grep -v '^ *+' conftest.er1 >conftest.err
19532 rm -f conftest.er1
19533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019535 (exit $ac_status); } && {
19536 test -z "$ac_c_werror_flag" ||
19537 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019538 } && test -s conftest$ac_exeext &&
19539 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019540 ac_cv_lib_z_inflateCopy=yes
19541else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019542 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019543sed 's/^/| /' conftest.$ac_ext >&5
19544
Martin v. Löwiseba40652007-08-30 20:10:57 +000019545 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019547
19548rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019549 conftest$ac_exeext conftest.$ac_ext
19550LIBS=$ac_check_lib_save_LIBS
19551fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019552{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19553echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19554if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019555
19556cat >>confdefs.h <<\_ACEOF
19557#define HAVE_ZLIB_COPY 1
19558_ACEOF
19559
19560fi
19561
19562
Ronald Oussorenf8752642006-07-06 10:13:35 +000019563case $ac_sys_system/$ac_sys_release in
19564Darwin/*)
19565 CFLAGS="${_CUR_CFLAGS}"
19566 LDFLAGS="${_CUR_LDFLAGS}"
19567 ;;
19568esac
19569
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019570{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19571echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019573/* confdefs.h. */
19574_ACEOF
19575cat confdefs.h >>conftest.$ac_ext
19576cat >>conftest.$ac_ext <<_ACEOF
19577/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019578
19579#include "confdefs.h"
19580#include <netdb.h>
19581
Martin v. Löwise9416172003-05-03 10:12:45 +000019582int
19583main ()
19584{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019585void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019586 ;
19587 return 0;
19588}
19589_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019590rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019591if { (ac_try="$ac_link"
19592case "(($ac_try" in
19593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19594 *) ac_try_echo=$ac_try;;
19595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019597 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019599 grep -v '^ *+' conftest.er1 >conftest.err
19600 rm -f conftest.er1
19601 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019603 (exit $ac_status); } && {
19604 test -z "$ac_c_werror_flag" ||
19605 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019606 } && test -s conftest$ac_exeext &&
19607 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019608
19609cat >>confdefs.h <<\_ACEOF
19610#define HAVE_HSTRERROR 1
19611_ACEOF
19612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019613 { echo "$as_me:$LINENO: result: yes" >&5
19614echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019617sed 's/^/| /' conftest.$ac_ext >&5
19618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019619 { echo "$as_me:$LINENO: result: no" >&5
19620echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019621
19622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623
19624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019625 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019627{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19628echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019630/* confdefs.h. */
19631_ACEOF
19632cat confdefs.h >>conftest.$ac_ext
19633cat >>conftest.$ac_ext <<_ACEOF
19634/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019635
19636#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019637#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019638#include <sys/socket.h>
19639#include <netinet/in.h>
19640#include <arpa/inet.h>
19641
Martin v. Löwise9416172003-05-03 10:12:45 +000019642int
19643main ()
19644{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019645void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019646 ;
19647 return 0;
19648}
19649_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019650rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019651if { (ac_try="$ac_link"
19652case "(($ac_try" in
19653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19654 *) ac_try_echo=$ac_try;;
19655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019657 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019659 grep -v '^ *+' conftest.er1 >conftest.err
19660 rm -f conftest.er1
19661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663 (exit $ac_status); } && {
19664 test -z "$ac_c_werror_flag" ||
19665 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019666 } && test -s conftest$ac_exeext &&
19667 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019668
19669cat >>confdefs.h <<\_ACEOF
19670#define HAVE_INET_ATON 1
19671_ACEOF
19672
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019673 { echo "$as_me:$LINENO: result: yes" >&5
19674echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019675else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019677sed 's/^/| /' conftest.$ac_ext >&5
19678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019679 { echo "$as_me:$LINENO: result: no" >&5
19680echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019681
19682fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683
19684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019686
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019687{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19688echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019690/* confdefs.h. */
19691_ACEOF
19692cat confdefs.h >>conftest.$ac_ext
19693cat >>conftest.$ac_ext <<_ACEOF
19694/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019695
19696#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019697#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019698#include <sys/socket.h>
19699#include <netinet/in.h>
19700#include <arpa/inet.h>
19701
Martin v. Löwise9416172003-05-03 10:12:45 +000019702int
19703main ()
19704{
19705void* p = inet_pton
19706 ;
19707 return 0;
19708}
19709_ACEOF
19710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019711if { (ac_try="$ac_compile"
19712case "(($ac_try" in
19713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19714 *) ac_try_echo=$ac_try;;
19715esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019719 grep -v '^ *+' conftest.er1 >conftest.err
19720 rm -f conftest.er1
19721 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019723 (exit $ac_status); } && {
19724 test -z "$ac_c_werror_flag" ||
19725 test ! -s conftest.err
19726 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019727
19728cat >>confdefs.h <<\_ACEOF
19729#define HAVE_INET_PTON 1
19730_ACEOF
19731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019732 { echo "$as_me:$LINENO: result: yes" >&5
19733echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019736sed 's/^/| /' conftest.$ac_ext >&5
19737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019738 { echo "$as_me:$LINENO: result: no" >&5
19739echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019740
19741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019742
19743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019744
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019745# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019746{ echo "$as_me:$LINENO: checking for setgroups" >&5
19747echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019749/* confdefs.h. */
19750_ACEOF
19751cat confdefs.h >>conftest.$ac_ext
19752cat >>conftest.$ac_ext <<_ACEOF
19753/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019754
19755#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019756#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019757#ifdef HAVE_GRP_H
19758#include <grp.h>
19759#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019760
Martin v. Löwisd5843682002-11-21 20:41:28 +000019761int
19762main ()
19763{
19764void* p = setgroups
19765 ;
19766 return 0;
19767}
19768_ACEOF
19769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019770if { (ac_try="$ac_compile"
19771case "(($ac_try" in
19772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773 *) ac_try_echo=$ac_try;;
19774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019778 grep -v '^ *+' conftest.er1 >conftest.err
19779 rm -f conftest.er1
19780 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782 (exit $ac_status); } && {
19783 test -z "$ac_c_werror_flag" ||
19784 test ! -s conftest.err
19785 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019786
19787cat >>confdefs.h <<\_ACEOF
19788#define HAVE_SETGROUPS 1
19789_ACEOF
19790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019791 { echo "$as_me:$LINENO: result: yes" >&5
19792echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019795sed 's/^/| /' conftest.$ac_ext >&5
19796
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019797 { echo "$as_me:$LINENO: result: no" >&5
19798echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019799
19800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019801
19802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019804# check for openpty and forkpty
19805
Martin v. Löwis11437992002-04-12 09:54:03 +000019806
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019807for ac_func in openpty
19808do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19810{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019812if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019814else
Martin v. Löwis11437992002-04-12 09:54:03 +000019815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019816/* confdefs.h. */
19817_ACEOF
19818cat confdefs.h >>conftest.$ac_ext
19819cat >>conftest.$ac_ext <<_ACEOF
19820/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19822 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19823#define $ac_func innocuous_$ac_func
19824
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019825/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019826 which can conflict with char $ac_func (); below.
19827 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019828 <limits.h> exists even on freestanding compilers. */
19829
19830#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019831# include <limits.h>
19832#else
19833# include <assert.h>
19834#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019835
19836#undef $ac_func
19837
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838/* Override any GCC internal prototype to avoid an error.
19839 Use char because int might match the return type of a GCC
19840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019841#ifdef __cplusplus
19842extern "C"
19843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019844char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019845/* The GNU C library defines this for functions which it implements
19846 to always fail with ENOSYS. Some functions are actually named
19847 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019849choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019850#endif
19851
Skip Montanaro6dead952003-09-25 14:50:04 +000019852int
19853main ()
19854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019855return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019856 ;
19857 return 0;
19858}
19859_ACEOF
19860rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019861if { (ac_try="$ac_link"
19862case "(($ac_try" in
19863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864 *) ac_try_echo=$ac_try;;
19865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019867 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019869 grep -v '^ *+' conftest.er1 >conftest.err
19870 rm -f conftest.er1
19871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019873 (exit $ac_status); } && {
19874 test -z "$ac_c_werror_flag" ||
19875 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019876 } && test -s conftest$ac_exeext &&
19877 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019881sed 's/^/| /' conftest.$ac_ext >&5
19882
Martin v. Löwiseba40652007-08-30 20:10:57 +000019883 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885
19886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019887 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019889ac_res=`eval echo '${'$as_ac_var'}'`
19890 { echo "$as_me:$LINENO: result: $ac_res" >&5
19891echo "${ECHO_T}$ac_res" >&6; }
19892if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019894#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019895_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019896
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019898 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19899echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019900if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019901 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019902else
Martin v. Löwis11437992002-04-12 09:54:03 +000019903 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019904LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019906/* confdefs.h. */
19907_ACEOF
19908cat confdefs.h >>conftest.$ac_ext
19909cat >>conftest.$ac_ext <<_ACEOF
19910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019911
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912/* Override any GCC internal prototype to avoid an error.
19913 Use char because int might match the return type of a GCC
19914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019915#ifdef __cplusplus
19916extern "C"
19917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019918char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019919int
19920main ()
19921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019923 ;
19924 return 0;
19925}
19926_ACEOF
19927rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019928if { (ac_try="$ac_link"
19929case "(($ac_try" in
19930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19931 *) ac_try_echo=$ac_try;;
19932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019934 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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 Vassalottibd7569b2009-07-17 23:09:02 +000019939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019940 (exit $ac_status); } && {
19941 test -z "$ac_c_werror_flag" ||
19942 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019943 } && test -s conftest$ac_exeext &&
19944 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019945 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019948sed 's/^/| /' conftest.$ac_ext >&5
19949
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019952
19953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019955LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019957{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19958echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19959if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019961#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019962_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019963 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019965 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19966echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019967if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019969else
19970 ac_check_lib_save_LIBS=$LIBS
19971LIBS="-lbsd $LIBS"
19972cat >conftest.$ac_ext <<_ACEOF
19973/* confdefs.h. */
19974_ACEOF
19975cat confdefs.h >>conftest.$ac_ext
19976cat >>conftest.$ac_ext <<_ACEOF
19977/* end confdefs.h. */
19978
Martin v. Löwiseba40652007-08-30 20:10:57 +000019979/* Override any GCC internal prototype to avoid an error.
19980 Use char because int might match the return type of a GCC
19981 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019982#ifdef __cplusplus
19983extern "C"
19984#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019985char openpty ();
19986int
19987main ()
19988{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019989return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019990 ;
19991 return 0;
19992}
19993_ACEOF
19994rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019995if { (ac_try="$ac_link"
19996case "(($ac_try" in
19997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19998 *) ac_try_echo=$ac_try;;
19999esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020001 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020002 ac_status=$?
20003 grep -v '^ *+' conftest.er1 >conftest.err
20004 rm -f conftest.er1
20005 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007 (exit $ac_status); } && {
20008 test -z "$ac_c_werror_flag" ||
20009 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020010 } && test -s conftest$ac_exeext &&
20011 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020012 ac_cv_lib_bsd_openpty=yes
20013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020014 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020015sed 's/^/| /' conftest.$ac_ext >&5
20016
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019
20020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020021 conftest$ac_exeext conftest.$ac_ext
20022LIBS=$ac_check_lib_save_LIBS
20023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020024{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20025echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20026if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020027 cat >>confdefs.h <<\_ACEOF
20028#define HAVE_OPENPTY 1
20029_ACEOF
20030 LIBS="$LIBS -lbsd"
20031fi
20032
20033
20034fi
20035
Fred Drake8cef4cf2000-06-28 16:40:38 +000020036
20037fi
20038done
20039
Martin v. Löwis11437992002-04-12 09:54:03 +000020040
Fred Drake8cef4cf2000-06-28 16:40:38 +000020041for ac_func in forkpty
20042do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020043as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20044{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20045echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020047 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020048else
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020050/* confdefs.h. */
20051_ACEOF
20052cat confdefs.h >>conftest.$ac_ext
20053cat >>conftest.$ac_ext <<_ACEOF
20054/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020055/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20056 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20057#define $ac_func innocuous_$ac_func
20058
Fred Drake8cef4cf2000-06-28 16:40:38 +000020059/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020060 which can conflict with char $ac_func (); below.
20061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020062 <limits.h> exists even on freestanding compilers. */
20063
20064#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020065# include <limits.h>
20066#else
20067# include <assert.h>
20068#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020069
20070#undef $ac_func
20071
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072/* Override any GCC internal prototype to avoid an error.
20073 Use char because int might match the return type of a GCC
20074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020075#ifdef __cplusplus
20076extern "C"
20077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020078char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020079/* The GNU C library defines this for functions which it implements
20080 to always fail with ENOSYS. Some functions are actually named
20081 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020083choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020084#endif
20085
Skip Montanaro6dead952003-09-25 14:50:04 +000020086int
20087main ()
20088{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020089return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020090 ;
20091 return 0;
20092}
20093_ACEOF
20094rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020095if { (ac_try="$ac_link"
20096case "(($ac_try" in
20097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20098 *) ac_try_echo=$ac_try;;
20099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020101 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020103 grep -v '^ *+' conftest.er1 >conftest.err
20104 rm -f conftest.er1
20105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107 (exit $ac_status); } && {
20108 test -z "$ac_c_werror_flag" ||
20109 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020110 } && test -s conftest$ac_exeext &&
20111 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020112 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020115sed 's/^/| /' conftest.$ac_ext >&5
20116
Martin v. Löwiseba40652007-08-30 20:10:57 +000020117 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020119
20120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020121 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020123ac_res=`eval echo '${'$as_ac_var'}'`
20124 { echo "$as_me:$LINENO: result: $ac_res" >&5
20125echo "${ECHO_T}$ac_res" >&6; }
20126if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020128#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020129_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020130
Fred Drake8cef4cf2000-06-28 16:40:38 +000020131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020132 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20133echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020134if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020135 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020136else
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020138LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020140/* confdefs.h. */
20141_ACEOF
20142cat confdefs.h >>conftest.$ac_ext
20143cat >>conftest.$ac_ext <<_ACEOF
20144/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020145
Martin v. Löwiseba40652007-08-30 20:10:57 +000020146/* Override any GCC internal prototype to avoid an error.
20147 Use char because int might match the return type of a GCC
20148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020149#ifdef __cplusplus
20150extern "C"
20151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020152char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020153int
20154main ()
20155{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020156return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 ;
20158 return 0;
20159}
20160_ACEOF
20161rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162if { (ac_try="$ac_link"
20163case "(($ac_try" in
20164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20165 *) ac_try_echo=$ac_try;;
20166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020170 grep -v '^ *+' conftest.er1 >conftest.err
20171 rm -f conftest.er1
20172 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174 (exit $ac_status); } && {
20175 test -z "$ac_c_werror_flag" ||
20176 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020177 } && test -s conftest$ac_exeext &&
20178 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020179 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020180else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020182sed 's/^/| /' conftest.$ac_ext >&5
20183
Martin v. Löwiseba40652007-08-30 20:10:57 +000020184 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020186
20187rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020189LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020190fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020191{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20192echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20193if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020194 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020195#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020196_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020197 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020199 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20200echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020201if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020202 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020203else
20204 ac_check_lib_save_LIBS=$LIBS
20205LIBS="-lbsd $LIBS"
20206cat >conftest.$ac_ext <<_ACEOF
20207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
20212
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213/* Override any GCC internal prototype to avoid an error.
20214 Use char because int might match the return type of a GCC
20215 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020216#ifdef __cplusplus
20217extern "C"
20218#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020219char forkpty ();
20220int
20221main ()
20222{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020223return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020224 ;
20225 return 0;
20226}
20227_ACEOF
20228rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020229if { (ac_try="$ac_link"
20230case "(($ac_try" in
20231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20232 *) ac_try_echo=$ac_try;;
20233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020235 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020236 ac_status=$?
20237 grep -v '^ *+' conftest.er1 >conftest.err
20238 rm -f conftest.er1
20239 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241 (exit $ac_status); } && {
20242 test -z "$ac_c_werror_flag" ||
20243 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020244 } && test -s conftest$ac_exeext &&
20245 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020246 ac_cv_lib_bsd_forkpty=yes
20247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020248 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020249sed 's/^/| /' conftest.$ac_ext >&5
20250
Martin v. Löwiseba40652007-08-30 20:10:57 +000020251 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020253
20254rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020255 conftest$ac_exeext conftest.$ac_ext
20256LIBS=$ac_check_lib_save_LIBS
20257fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020258{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20259echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20260if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020261 cat >>confdefs.h <<\_ACEOF
20262#define HAVE_FORKPTY 1
20263_ACEOF
20264 LIBS="$LIBS -lbsd"
20265fi
20266
20267
20268fi
20269
Fred Drake8cef4cf2000-06-28 16:40:38 +000020270
20271fi
20272done
20273
Jack Jansendd19cf82001-12-06 22:36:17 +000020274
Brett Cannonaa5778d2008-03-18 04:09:00 +000020275# Stuff for expat.
20276
20277for ac_func in memmove
20278do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20280{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020282if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020283 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020284else
20285 cat >conftest.$ac_ext <<_ACEOF
20286/* confdefs.h. */
20287_ACEOF
20288cat confdefs.h >>conftest.$ac_ext
20289cat >>conftest.$ac_ext <<_ACEOF
20290/* end confdefs.h. */
20291/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20293#define $ac_func innocuous_$ac_func
20294
20295/* System header to define __stub macros and hopefully few prototypes,
20296 which can conflict with char $ac_func (); below.
20297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20298 <limits.h> exists even on freestanding compilers. */
20299
20300#ifdef __STDC__
20301# include <limits.h>
20302#else
20303# include <assert.h>
20304#endif
20305
20306#undef $ac_func
20307
20308/* Override any GCC internal prototype to avoid an error.
20309 Use char because int might match the return type of a GCC
20310 builtin and then its argument prototype would still apply. */
20311#ifdef __cplusplus
20312extern "C"
20313#endif
20314char $ac_func ();
20315/* The GNU C library defines this for functions which it implements
20316 to always fail with ENOSYS. Some functions are actually named
20317 something starting with __ and the normal name is an alias. */
20318#if defined __stub_$ac_func || defined __stub___$ac_func
20319choke me
20320#endif
20321
20322int
20323main ()
20324{
20325return $ac_func ();
20326 ;
20327 return 0;
20328}
20329_ACEOF
20330rm -f conftest.$ac_objext conftest$ac_exeext
20331if { (ac_try="$ac_link"
20332case "(($ac_try" in
20333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20334 *) ac_try_echo=$ac_try;;
20335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020337 (eval "$ac_link") 2>conftest.er1
20338 ac_status=$?
20339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020343 (exit $ac_status); } && {
20344 test -z "$ac_c_werror_flag" ||
20345 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020346 } && test -s conftest$ac_exeext &&
20347 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020348 eval "$as_ac_var=yes"
20349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020350 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020351sed 's/^/| /' conftest.$ac_ext >&5
20352
20353 eval "$as_ac_var=no"
20354fi
20355
20356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20357 conftest$ac_exeext conftest.$ac_ext
20358fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020359ac_res=`eval echo '${'$as_ac_var'}'`
20360 { echo "$as_me:$LINENO: result: $ac_res" >&5
20361echo "${ECHO_T}$ac_res" >&6; }
20362if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020363 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020365_ACEOF
20366
20367fi
20368done
20369
20370
Michael W. Hudson54241132001-12-07 15:38:26 +000020371# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020372
20373
20374
20375
20376
20377
Fred Drake8cef4cf2000-06-28 16:40:38 +000020378for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20379do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020380as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20381{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20382echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020385else
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020387/* confdefs.h. */
20388_ACEOF
20389cat confdefs.h >>conftest.$ac_ext
20390cat >>conftest.$ac_ext <<_ACEOF
20391/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020392/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20394#define $ac_func innocuous_$ac_func
20395
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020396/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020397 which can conflict with char $ac_func (); below.
20398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020399 <limits.h> exists even on freestanding compilers. */
20400
20401#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020402# include <limits.h>
20403#else
20404# include <assert.h>
20405#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020406
20407#undef $ac_func
20408
Martin v. Löwiseba40652007-08-30 20:10:57 +000020409/* Override any GCC internal prototype to avoid an error.
20410 Use char because int might match the return type of a GCC
20411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020412#ifdef __cplusplus
20413extern "C"
20414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020415char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020416/* The GNU C library defines this for functions which it implements
20417 to always fail with ENOSYS. Some functions are actually named
20418 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020420choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020421#endif
20422
Skip Montanaro6dead952003-09-25 14:50:04 +000020423int
20424main ()
20425{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020426return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020427 ;
20428 return 0;
20429}
20430_ACEOF
20431rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020432if { (ac_try="$ac_link"
20433case "(($ac_try" in
20434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20435 *) ac_try_echo=$ac_try;;
20436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020438 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020440 grep -v '^ *+' conftest.er1 >conftest.err
20441 rm -f conftest.er1
20442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020444 (exit $ac_status); } && {
20445 test -z "$ac_c_werror_flag" ||
20446 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020447 } && test -s conftest$ac_exeext &&
20448 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020449 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020452sed 's/^/| /' conftest.$ac_ext >&5
20453
Martin v. Löwiseba40652007-08-30 20:10:57 +000020454 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456
20457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020458 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020459fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020460ac_res=`eval echo '${'$as_ac_var'}'`
20461 { echo "$as_me:$LINENO: result: $ac_res" >&5
20462echo "${ECHO_T}$ac_res" >&6; }
20463if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020465#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020466_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020468fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020469done
20470
Michael W. Hudson54241132001-12-07 15:38:26 +000020471
Martin v. Löwis11437992002-04-12 09:54:03 +000020472
20473
20474
Brett Cannonaa5778d2008-03-18 04:09:00 +000020475for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020476do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020477as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20478{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20479echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020482else
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020484/* confdefs.h. */
20485_ACEOF
20486cat confdefs.h >>conftest.$ac_ext
20487cat >>conftest.$ac_ext <<_ACEOF
20488/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020489/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20490 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20491#define $ac_func innocuous_$ac_func
20492
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020493/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020494 which can conflict with char $ac_func (); below.
20495 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020496 <limits.h> exists even on freestanding compilers. */
20497
20498#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020499# include <limits.h>
20500#else
20501# include <assert.h>
20502#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020503
20504#undef $ac_func
20505
Martin v. Löwiseba40652007-08-30 20:10:57 +000020506/* Override any GCC internal prototype to avoid an error.
20507 Use char because int might match the return type of a GCC
20508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020509#ifdef __cplusplus
20510extern "C"
20511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020512char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020513/* The GNU C library defines this for functions which it implements
20514 to always fail with ENOSYS. Some functions are actually named
20515 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020517choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020518#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020519
Skip Montanaro6dead952003-09-25 14:50:04 +000020520int
20521main ()
20522{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020523return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020524 ;
20525 return 0;
20526}
20527_ACEOF
20528rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020529if { (ac_try="$ac_link"
20530case "(($ac_try" in
20531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20532 *) ac_try_echo=$ac_try;;
20533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020535 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020537 grep -v '^ *+' conftest.er1 >conftest.err
20538 rm -f conftest.er1
20539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541 (exit $ac_status); } && {
20542 test -z "$ac_c_werror_flag" ||
20543 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020544 } && test -s conftest$ac_exeext &&
20545 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020546 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020549sed 's/^/| /' conftest.$ac_ext >&5
20550
Martin v. Löwiseba40652007-08-30 20:10:57 +000020551 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553
20554rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020556fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020557ac_res=`eval echo '${'$as_ac_var'}'`
20558 { echo "$as_me:$LINENO: result: $ac_res" >&5
20559echo "${ECHO_T}$ac_res" >&6; }
20560if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020561 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020562#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020563_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020564
Martin v. Löwis1142de32002-03-29 16:28:31 +000020565else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020566 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020567 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020568 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20569 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020570esac
20571
Martin v. Löwis1142de32002-03-29 16:28:31 +000020572fi
20573done
20574
20575
Martin v. Löwis11437992002-04-12 09:54:03 +000020576
Martin v. Löwis1142de32002-03-29 16:28:31 +000020577for ac_func in getpgrp
20578do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020579as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20580{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20581echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020582if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020584else
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020586/* confdefs.h. */
20587_ACEOF
20588cat confdefs.h >>conftest.$ac_ext
20589cat >>conftest.$ac_ext <<_ACEOF
20590/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020591/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20592 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20593#define $ac_func innocuous_$ac_func
20594
Martin v. Löwis1142de32002-03-29 16:28:31 +000020595/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020596 which can conflict with char $ac_func (); below.
20597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020598 <limits.h> exists even on freestanding compilers. */
20599
20600#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020601# include <limits.h>
20602#else
20603# include <assert.h>
20604#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020605
20606#undef $ac_func
20607
Martin v. Löwiseba40652007-08-30 20:10:57 +000020608/* Override any GCC internal prototype to avoid an error.
20609 Use char because int might match the return type of a GCC
20610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020611#ifdef __cplusplus
20612extern "C"
20613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020614char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020615/* The GNU C library defines this for functions which it implements
20616 to always fail with ENOSYS. Some functions are actually named
20617 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020619choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020620#endif
20621
Skip Montanaro6dead952003-09-25 14:50:04 +000020622int
20623main ()
20624{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020626 ;
20627 return 0;
20628}
20629_ACEOF
20630rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020631if { (ac_try="$ac_link"
20632case "(($ac_try" in
20633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20634 *) ac_try_echo=$ac_try;;
20635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020639 grep -v '^ *+' conftest.er1 >conftest.err
20640 rm -f conftest.er1
20641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020643 (exit $ac_status); } && {
20644 test -z "$ac_c_werror_flag" ||
20645 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646 } && test -s conftest$ac_exeext &&
20647 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020648 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020651sed 's/^/| /' conftest.$ac_ext >&5
20652
Martin v. Löwiseba40652007-08-30 20:10:57 +000020653 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020655
20656rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020657 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020658fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020659ac_res=`eval echo '${'$as_ac_var'}'`
20660 { echo "$as_me:$LINENO: result: $ac_res" >&5
20661echo "${ECHO_T}$ac_res" >&6; }
20662if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020664#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020665_ACEOF
20666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020667/* confdefs.h. */
20668_ACEOF
20669cat confdefs.h >>conftest.$ac_ext
20670cat >>conftest.$ac_ext <<_ACEOF
20671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020672#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020673int
20674main ()
20675{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020676getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 ;
20678 return 0;
20679}
20680_ACEOF
20681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682if { (ac_try="$ac_compile"
20683case "(($ac_try" in
20684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20685 *) ac_try_echo=$ac_try;;
20686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020690 grep -v '^ *+' conftest.er1 >conftest.err
20691 rm -f conftest.er1
20692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694 (exit $ac_status); } && {
20695 test -z "$ac_c_werror_flag" ||
20696 test ! -s conftest.err
20697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020698
20699cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020700#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020701_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020702
Martin v. Löwis11437992002-04-12 09:54:03 +000020703
Guido van Rossumf78abae1997-01-21 22:02:36 +000020704else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020706sed 's/^/| /' conftest.$ac_ext >&5
20707
Martin v. Löwiseba40652007-08-30 20:10:57 +000020708
Guido van Rossum627b2d71993-12-24 10:39:16 +000020709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020710
20711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020712
Guido van Rossum627b2d71993-12-24 10:39:16 +000020713fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020714done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020715
Jack Jansen150753c2003-03-29 22:07:47 +000020716
20717for ac_func in setpgrp
20718do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020719as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20720{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20721echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020724else
Martin v. Löwis11437992002-04-12 09:54:03 +000020725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020726/* confdefs.h. */
20727_ACEOF
20728cat confdefs.h >>conftest.$ac_ext
20729cat >>conftest.$ac_ext <<_ACEOF
20730/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020731/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20732 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20733#define $ac_func innocuous_$ac_func
20734
Jack Jansen150753c2003-03-29 22:07:47 +000020735/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020736 which can conflict with char $ac_func (); below.
20737 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020738 <limits.h> exists even on freestanding compilers. */
20739
20740#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020741# include <limits.h>
20742#else
20743# include <assert.h>
20744#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020745
20746#undef $ac_func
20747
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748/* Override any GCC internal prototype to avoid an error.
20749 Use char because int might match the return type of a GCC
20750 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020751#ifdef __cplusplus
20752extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020753#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020754char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020755/* The GNU C library defines this for functions which it implements
20756 to always fail with ENOSYS. Some functions are actually named
20757 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020759choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020760#endif
20761
Skip Montanaro6dead952003-09-25 14:50:04 +000020762int
20763main ()
20764{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020766 ;
20767 return 0;
20768}
20769_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020770rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020771if { (ac_try="$ac_link"
20772case "(($ac_try" in
20773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20774 *) ac_try_echo=$ac_try;;
20775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020777 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020779 grep -v '^ *+' conftest.er1 >conftest.err
20780 rm -f conftest.er1
20781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020783 (exit $ac_status); } && {
20784 test -z "$ac_c_werror_flag" ||
20785 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020786 } && test -s conftest$ac_exeext &&
20787 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020788 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020791sed 's/^/| /' conftest.$ac_ext >&5
20792
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020795
20796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020797 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020799ac_res=`eval echo '${'$as_ac_var'}'`
20800 { echo "$as_me:$LINENO: result: $ac_res" >&5
20801echo "${ECHO_T}$ac_res" >&6; }
20802if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020803 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020804#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020805_ACEOF
20806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020807/* confdefs.h. */
20808_ACEOF
20809cat confdefs.h >>conftest.$ac_ext
20810cat >>conftest.$ac_ext <<_ACEOF
20811/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020812#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020813int
20814main ()
20815{
20816setpgrp(0,0);
20817 ;
20818 return 0;
20819}
20820_ACEOF
20821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822if { (ac_try="$ac_compile"
20823case "(($ac_try" in
20824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20825 *) ac_try_echo=$ac_try;;
20826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020830 grep -v '^ *+' conftest.er1 >conftest.err
20831 rm -f conftest.er1
20832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834 (exit $ac_status); } && {
20835 test -z "$ac_c_werror_flag" ||
20836 test ! -s conftest.err
20837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020838
20839cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020840#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020841_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020842
Jack Jansen150753c2003-03-29 22:07:47 +000020843
20844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020846sed 's/^/| /' conftest.$ac_ext >&5
20847
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020850
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020852
20853fi
20854done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020855
Martin v. Löwis11437992002-04-12 09:54:03 +000020856
Thomas Wouters3a584202000-08-05 23:28:51 +000020857for ac_func in gettimeofday
20858do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020859as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20860{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20861echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020864else
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020866/* confdefs.h. */
20867_ACEOF
20868cat confdefs.h >>conftest.$ac_ext
20869cat >>conftest.$ac_ext <<_ACEOF
20870/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020871/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20873#define $ac_func innocuous_$ac_func
20874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020875/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020876 which can conflict with char $ac_func (); below.
20877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020878 <limits.h> exists even on freestanding compilers. */
20879
20880#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020881# include <limits.h>
20882#else
20883# include <assert.h>
20884#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020885
20886#undef $ac_func
20887
Martin v. Löwiseba40652007-08-30 20:10:57 +000020888/* Override any GCC internal prototype to avoid an error.
20889 Use char because int might match the return type of a GCC
20890 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020891#ifdef __cplusplus
20892extern "C"
20893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020894char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020895/* The GNU C library defines this for functions which it implements
20896 to always fail with ENOSYS. Some functions are actually named
20897 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020899choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020900#endif
20901
Skip Montanaro6dead952003-09-25 14:50:04 +000020902int
20903main ()
20904{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020905return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020906 ;
20907 return 0;
20908}
20909_ACEOF
20910rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020911if { (ac_try="$ac_link"
20912case "(($ac_try" in
20913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20914 *) ac_try_echo=$ac_try;;
20915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020917 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020919 grep -v '^ *+' conftest.er1 >conftest.err
20920 rm -f conftest.er1
20921 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923 (exit $ac_status); } && {
20924 test -z "$ac_c_werror_flag" ||
20925 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020926 } && test -s conftest$ac_exeext &&
20927 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020928 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020931sed 's/^/| /' conftest.$ac_ext >&5
20932
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935
20936rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020937 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020938fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020939ac_res=`eval echo '${'$as_ac_var'}'`
20940 { echo "$as_me:$LINENO: result: $ac_res" >&5
20941echo "${ECHO_T}$ac_res" >&6; }
20942if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020944#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020945_ACEOF
20946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020947/* confdefs.h. */
20948_ACEOF
20949cat confdefs.h >>conftest.$ac_ext
20950cat >>conftest.$ac_ext <<_ACEOF
20951/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020952#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020953int
20954main ()
20955{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020956gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020957 ;
20958 return 0;
20959}
20960_ACEOF
20961rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020962if { (ac_try="$ac_compile"
20963case "(($ac_try" in
20964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20965 *) ac_try_echo=$ac_try;;
20966esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020970 grep -v '^ *+' conftest.er1 >conftest.err
20971 rm -f conftest.er1
20972 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974 (exit $ac_status); } && {
20975 test -z "$ac_c_werror_flag" ||
20976 test ! -s conftest.err
20977 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020978 :
20979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020981sed 's/^/| /' conftest.$ac_ext >&5
20982
Martin v. Löwis11437992002-04-12 09:54:03 +000020983
20984cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020985#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020986_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020987
Martin v. Löwis11437992002-04-12 09:54:03 +000020988
Guido van Rossum627b2d71993-12-24 10:39:16 +000020989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020990
20991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020992
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020993fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020994done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995
Michael W. Hudson54241132001-12-07 15:38:26 +000020996
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020997{ echo "$as_me:$LINENO: checking for major" >&5
20998echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021000/* confdefs.h. */
21001_ACEOF
21002cat confdefs.h >>conftest.$ac_ext
21003cat >>conftest.$ac_ext <<_ACEOF
21004/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021005
Neal Norwitz6eb37f02003-02-23 23:28:15 +000021006#if defined(MAJOR_IN_MKDEV)
21007#include <sys/mkdev.h>
21008#elif defined(MAJOR_IN_SYSMACROS)
21009#include <sys/sysmacros.h>
21010#else
21011#include <sys/types.h>
21012#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021013
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021014int
21015main ()
21016{
21017
21018 makedev(major(0),minor(0));
21019
21020 ;
21021 return 0;
21022}
21023_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021024rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025if { (ac_try="$ac_link"
21026case "(($ac_try" in
21027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21028 *) ac_try_echo=$ac_try;;
21029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021031 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021033 grep -v '^ *+' conftest.er1 >conftest.err
21034 rm -f conftest.er1
21035 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021037 (exit $ac_status); } && {
21038 test -z "$ac_c_werror_flag" ||
21039 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021040 } && test -s conftest$ac_exeext &&
21041 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021042
21043
21044cat >>confdefs.h <<\_ACEOF
21045#define HAVE_DEVICE_MACROS 1
21046_ACEOF
21047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021048 { echo "$as_me:$LINENO: result: yes" >&5
21049echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021050
21051else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021053sed 's/^/| /' conftest.$ac_ext >&5
21054
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021055
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021056 { echo "$as_me:$LINENO: result: no" >&5
21057echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021058
21059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021060
21061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021062 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021063
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021064# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021065# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021066{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21067echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021069/* confdefs.h. */
21070_ACEOF
21071cat confdefs.h >>conftest.$ac_ext
21072cat >>conftest.$ac_ext <<_ACEOF
21073/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021074
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021075#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021076#include <sys/socket.h>
21077#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021078#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021079
Martin v. Löwis11437992002-04-12 09:54:03 +000021080int
21081main ()
21082{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021083getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021084 ;
21085 return 0;
21086}
21087_ACEOF
21088rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021089if { (ac_try="$ac_link"
21090case "(($ac_try" in
21091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21092 *) ac_try_echo=$ac_try;;
21093esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021095 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021097 grep -v '^ *+' conftest.er1 >conftest.err
21098 rm -f conftest.er1
21099 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101 (exit $ac_status); } && {
21102 test -z "$ac_c_werror_flag" ||
21103 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021104 } && test -s conftest$ac_exeext &&
21105 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021106 have_getaddrinfo=yes
21107else
21108 echo "$as_me: failed program was:" >&5
21109sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021110
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021111 have_getaddrinfo=no
21112fi
21113
21114rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21115 conftest$ac_exeext conftest.$ac_ext
21116{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21117echo "${ECHO_T}$have_getaddrinfo" >&6; }
21118if test $have_getaddrinfo = yes
21119then
21120 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021121echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021122 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21123 echo $ECHO_N "(cached) $ECHO_C" >&6
21124else
21125 if test "$cross_compiling" = yes; then
21126 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021127else
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021129/* confdefs.h. */
21130_ACEOF
21131cat confdefs.h >>conftest.$ac_ext
21132cat >>conftest.$ac_ext <<_ACEOF
21133/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021134
21135#include <sys/types.h>
21136#include <netdb.h>
21137#include <string.h>
21138#include <sys/socket.h>
21139#include <netinet/in.h>
21140
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021141int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021142{
21143 int passive, gaierr, inet4 = 0, inet6 = 0;
21144 struct addrinfo hints, *ai, *aitop;
21145 char straddr[INET6_ADDRSTRLEN], strport[16];
21146
21147 for (passive = 0; passive <= 1; passive++) {
21148 memset(&hints, 0, sizeof(hints));
21149 hints.ai_family = AF_UNSPEC;
21150 hints.ai_flags = passive ? AI_PASSIVE : 0;
21151 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021152 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021153 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21154 (void)gai_strerror(gaierr);
21155 goto bad;
21156 }
21157 for (ai = aitop; ai; ai = ai->ai_next) {
21158 if (ai->ai_addr == NULL ||
21159 ai->ai_addrlen == 0 ||
21160 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21161 straddr, sizeof(straddr), strport, sizeof(strport),
21162 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21163 goto bad;
21164 }
21165 switch (ai->ai_family) {
21166 case AF_INET:
21167 if (strcmp(strport, "54321") != 0) {
21168 goto bad;
21169 }
21170 if (passive) {
21171 if (strcmp(straddr, "0.0.0.0") != 0) {
21172 goto bad;
21173 }
21174 } else {
21175 if (strcmp(straddr, "127.0.0.1") != 0) {
21176 goto bad;
21177 }
21178 }
21179 inet4++;
21180 break;
21181 case AF_INET6:
21182 if (strcmp(strport, "54321") != 0) {
21183 goto bad;
21184 }
21185 if (passive) {
21186 if (strcmp(straddr, "::") != 0) {
21187 goto bad;
21188 }
21189 } else {
21190 if (strcmp(straddr, "::1") != 0) {
21191 goto bad;
21192 }
21193 }
21194 inet6++;
21195 break;
21196 case AF_UNSPEC:
21197 goto bad;
21198 break;
21199 default:
21200 /* another family support? */
21201 break;
21202 }
21203 }
21204 }
21205
21206 if (!(inet4 == 0 || inet4 == 2))
21207 goto bad;
21208 if (!(inet6 == 0 || inet6 == 2))
21209 goto bad;
21210
21211 if (aitop)
21212 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021213 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021214
21215 bad:
21216 if (aitop)
21217 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021218 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021219}
21220
Martin v. Löwis11437992002-04-12 09:54:03 +000021221_ACEOF
21222rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223if { (ac_try="$ac_link"
21224case "(($ac_try" in
21225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226 *) ac_try_echo=$ac_try;;
21227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233 { (case "(($ac_try" in
21234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21235 *) ac_try_echo=$ac_try;;
21236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021239 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021242 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021243else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021244 echo "$as_me: program exited with status $ac_status" >&5
21245echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021246sed 's/^/| /' conftest.$ac_ext >&5
21247
Martin v. Löwis11437992002-04-12 09:54:03 +000021248( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021249ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021251rm -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 +000021252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021253
21254
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021255fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021256
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021258
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021259if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021260then
21261 if test $ipv6 = yes
21262 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021263 echo 'Fatal: You must get working getaddrinfo() function.'
21264 echo ' or you can specify "--disable-ipv6"'.
21265 exit 1
21266 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021267else
Martin v. Löwis11437992002-04-12 09:54:03 +000021268
21269cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021270#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021271_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021272
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021274
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021275for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021276do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021277as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21278{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21279echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021280if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021281 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021282else
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021284/* confdefs.h. */
21285_ACEOF
21286cat confdefs.h >>conftest.$ac_ext
21287cat >>conftest.$ac_ext <<_ACEOF
21288/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021289/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21291#define $ac_func innocuous_$ac_func
21292
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021293/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021294 which can conflict with char $ac_func (); below.
21295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021296 <limits.h> exists even on freestanding compilers. */
21297
21298#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021299# include <limits.h>
21300#else
21301# include <assert.h>
21302#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021303
21304#undef $ac_func
21305
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306/* Override any GCC internal prototype to avoid an error.
21307 Use char because int might match the return type of a GCC
21308 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021309#ifdef __cplusplus
21310extern "C"
21311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021312char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021313/* The GNU C library defines this for functions which it implements
21314 to always fail with ENOSYS. Some functions are actually named
21315 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021317choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021318#endif
21319
Skip Montanaro6dead952003-09-25 14:50:04 +000021320int
21321main ()
21322{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021323return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021324 ;
21325 return 0;
21326}
21327_ACEOF
21328rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021329if { (ac_try="$ac_link"
21330case "(($ac_try" in
21331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21332 *) ac_try_echo=$ac_try;;
21333esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021337 grep -v '^ *+' conftest.er1 >conftest.err
21338 rm -f conftest.er1
21339 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021341 (exit $ac_status); } && {
21342 test -z "$ac_c_werror_flag" ||
21343 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021344 } && test -s conftest$ac_exeext &&
21345 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021347else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021349sed 's/^/| /' conftest.$ac_ext >&5
21350
Martin v. Löwiseba40652007-08-30 20:10:57 +000021351 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021353
21354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021355 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021356fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021357ac_res=`eval echo '${'$as_ac_var'}'`
21358 { echo "$as_me:$LINENO: result: $ac_res" >&5
21359echo "${ECHO_T}$ac_res" >&6; }
21360if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021363_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021364
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021365fi
21366done
21367
Michael W. Hudson54241132001-12-07 15:38:26 +000021368
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021369# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021370{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21371echo $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 +000021372if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021373 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021374else
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021376/* confdefs.h. */
21377_ACEOF
21378cat confdefs.h >>conftest.$ac_ext
21379cat >>conftest.$ac_ext <<_ACEOF
21380/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021381#include <sys/types.h>
21382#include <sys/time.h>
21383#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021384
Martin v. Löwis11437992002-04-12 09:54:03 +000021385int
21386main ()
21387{
21388if ((struct tm *) 0)
21389return 0;
21390 ;
21391 return 0;
21392}
21393_ACEOF
21394rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395if { (ac_try="$ac_compile"
21396case "(($ac_try" in
21397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21398 *) ac_try_echo=$ac_try;;
21399esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021403 grep -v '^ *+' conftest.er1 >conftest.err
21404 rm -f conftest.er1
21405 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021407 (exit $ac_status); } && {
21408 test -z "$ac_c_werror_flag" ||
21409 test ! -s conftest.err
21410 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021411 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021414sed 's/^/| /' conftest.$ac_ext >&5
21415
Martin v. Löwiseba40652007-08-30 20:10:57 +000021416 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021418
21419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021420fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021421{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21422echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021423if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021424
21425cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021426#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021427_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021428
21429fi
21430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021431{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21432echo $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 +000021433if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021434 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021435else
Martin v. Löwis11437992002-04-12 09:54:03 +000021436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021437/* confdefs.h. */
21438_ACEOF
21439cat confdefs.h >>conftest.$ac_ext
21440cat >>conftest.$ac_ext <<_ACEOF
21441/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021442#include <sys/types.h>
21443#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021444
Martin v. Löwis11437992002-04-12 09:54:03 +000021445int
21446main ()
21447{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448struct tm tm;
21449 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021451 ;
21452 return 0;
21453}
21454_ACEOF
21455rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021456if { (ac_try="$ac_compile"
21457case "(($ac_try" in
21458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21459 *) ac_try_echo=$ac_try;;
21460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021464 grep -v '^ *+' conftest.er1 >conftest.err
21465 rm -f conftest.er1
21466 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021468 (exit $ac_status); } && {
21469 test -z "$ac_c_werror_flag" ||
21470 test ! -s conftest.err
21471 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021472 ac_cv_struct_tm=time.h
21473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021475sed 's/^/| /' conftest.$ac_ext >&5
21476
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479
21480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021481fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021482{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21483echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021484if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021485
21486cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021487#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021488_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021489
21490fi
21491
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021492{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21493echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021494if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021495 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021496else
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021498/* confdefs.h. */
21499_ACEOF
21500cat confdefs.h >>conftest.$ac_ext
21501cat >>conftest.$ac_ext <<_ACEOF
21502/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021503#include <sys/types.h>
21504#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021505
21506
Martin v. Löwis11437992002-04-12 09:54:03 +000021507int
21508main ()
21509{
21510static struct tm ac_aggr;
21511if (ac_aggr.tm_zone)
21512return 0;
21513 ;
21514 return 0;
21515}
21516_ACEOF
21517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021518if { (ac_try="$ac_compile"
21519case "(($ac_try" in
21520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21521 *) ac_try_echo=$ac_try;;
21522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021526 grep -v '^ *+' conftest.er1 >conftest.err
21527 rm -f conftest.er1
21528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021530 (exit $ac_status); } && {
21531 test -z "$ac_c_werror_flag" ||
21532 test ! -s conftest.err
21533 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021534 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021537sed 's/^/| /' conftest.$ac_ext >&5
21538
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021540/* confdefs.h. */
21541_ACEOF
21542cat confdefs.h >>conftest.$ac_ext
21543cat >>conftest.$ac_ext <<_ACEOF
21544/* end confdefs.h. */
21545#include <sys/types.h>
21546#include <$ac_cv_struct_tm>
21547
21548
21549int
21550main ()
21551{
21552static struct tm ac_aggr;
21553if (sizeof ac_aggr.tm_zone)
21554return 0;
21555 ;
21556 return 0;
21557}
21558_ACEOF
21559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560if { (ac_try="$ac_compile"
21561case "(($ac_try" in
21562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21563 *) ac_try_echo=$ac_try;;
21564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021566 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021568 grep -v '^ *+' conftest.er1 >conftest.err
21569 rm -f conftest.er1
21570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572 (exit $ac_status); } && {
21573 test -z "$ac_c_werror_flag" ||
21574 test ! -s conftest.err
21575 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021576 ac_cv_member_struct_tm_tm_zone=yes
21577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021579sed 's/^/| /' conftest.$ac_ext >&5
21580
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583
21584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021586
21587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021588fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021589{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21590echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21591if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021592
21593cat >>confdefs.h <<_ACEOF
21594#define HAVE_STRUCT_TM_TM_ZONE 1
21595_ACEOF
21596
21597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021598fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021599
Martin v. Löwis11437992002-04-12 09:54:03 +000021600if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21601
21602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021603#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021604_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021605
21606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021607 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21608echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021609if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611else
21612 cat >conftest.$ac_ext <<_ACEOF
21613/* confdefs.h. */
21614_ACEOF
21615cat confdefs.h >>conftest.$ac_ext
21616cat >>conftest.$ac_ext <<_ACEOF
21617/* end confdefs.h. */
21618#include <time.h>
21619
21620int
21621main ()
21622{
21623#ifndef tzname
21624 (void) tzname;
21625#endif
21626
21627 ;
21628 return 0;
21629}
21630_ACEOF
21631rm -f conftest.$ac_objext
21632if { (ac_try="$ac_compile"
21633case "(($ac_try" in
21634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21635 *) ac_try_echo=$ac_try;;
21636esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638 (eval "$ac_compile") 2>conftest.er1
21639 ac_status=$?
21640 grep -v '^ *+' conftest.er1 >conftest.err
21641 rm -f conftest.er1
21642 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644 (exit $ac_status); } && {
21645 test -z "$ac_c_werror_flag" ||
21646 test ! -s conftest.err
21647 } && test -s conftest.$ac_objext; then
21648 ac_cv_have_decl_tzname=yes
21649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651sed 's/^/| /' conftest.$ac_ext >&5
21652
21653 ac_cv_have_decl_tzname=no
21654fi
21655
21656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21657fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021658{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21659echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21660if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021661
21662cat >>confdefs.h <<_ACEOF
21663#define HAVE_DECL_TZNAME 1
21664_ACEOF
21665
21666
21667else
21668 cat >>confdefs.h <<_ACEOF
21669#define HAVE_DECL_TZNAME 0
21670_ACEOF
21671
21672
21673fi
21674
21675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021676 { echo "$as_me:$LINENO: checking for tzname" >&5
21677echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021678if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021679 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021680else
Martin v. Löwis11437992002-04-12 09:54:03 +000021681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021682/* confdefs.h. */
21683_ACEOF
21684cat confdefs.h >>conftest.$ac_ext
21685cat >>conftest.$ac_ext <<_ACEOF
21686/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021687#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688#if !HAVE_DECL_TZNAME
21689extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021691
Martin v. Löwis11437992002-04-12 09:54:03 +000021692int
21693main ()
21694{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021695return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021696 ;
21697 return 0;
21698}
21699_ACEOF
21700rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021701if { (ac_try="$ac_link"
21702case "(($ac_try" in
21703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21704 *) ac_try_echo=$ac_try;;
21705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021707 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021709 grep -v '^ *+' conftest.er1 >conftest.err
21710 rm -f conftest.er1
21711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021713 (exit $ac_status); } && {
21714 test -z "$ac_c_werror_flag" ||
21715 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021716 } && test -s conftest$ac_exeext &&
21717 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021718 ac_cv_var_tzname=yes
21719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021721sed 's/^/| /' conftest.$ac_ext >&5
21722
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021725
21726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021727 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021728fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021729{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21730echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021731 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021732
21733cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021734#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021735_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021736
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021737 fi
21738fi
21739
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021740{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21741echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021742if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021743 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021744else
21745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021746/* confdefs.h. */
21747_ACEOF
21748cat confdefs.h >>conftest.$ac_ext
21749cat >>conftest.$ac_ext <<_ACEOF
21750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021751$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021752int
21753main ()
21754{
21755static struct stat ac_aggr;
21756if (ac_aggr.st_rdev)
21757return 0;
21758 ;
21759 return 0;
21760}
21761_ACEOF
21762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021763if { (ac_try="$ac_compile"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
21778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 ac_cv_member_struct_stat_st_rdev=yes
21780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021782sed 's/^/| /' conftest.$ac_ext >&5
21783
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021785/* confdefs.h. */
21786_ACEOF
21787cat confdefs.h >>conftest.$ac_ext
21788cat >>conftest.$ac_ext <<_ACEOF
21789/* end confdefs.h. */
21790$ac_includes_default
21791int
21792main ()
21793{
21794static struct stat ac_aggr;
21795if (sizeof ac_aggr.st_rdev)
21796return 0;
21797 ;
21798 return 0;
21799}
21800_ACEOF
21801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802if { (ac_try="$ac_compile"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021808 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021810 grep -v '^ *+' conftest.er1 >conftest.err
21811 rm -f conftest.er1
21812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814 (exit $ac_status); } && {
21815 test -z "$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021818 ac_cv_member_struct_stat_st_rdev=yes
21819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021821sed 's/^/| /' conftest.$ac_ext >&5
21822
Martin v. Löwiseba40652007-08-30 20:10:57 +000021823 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825
21826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828
21829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021831{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21832echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21833if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021834
21835cat >>confdefs.h <<_ACEOF
21836#define HAVE_STRUCT_STAT_ST_RDEV 1
21837_ACEOF
21838
21839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021840fi
21841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021842{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21843echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021844if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021845 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021846else
Martin v. Löwis11437992002-04-12 09:54:03 +000021847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021848/* confdefs.h. */
21849_ACEOF
21850cat confdefs.h >>conftest.$ac_ext
21851cat >>conftest.$ac_ext <<_ACEOF
21852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021853$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021854int
21855main ()
21856{
21857static struct stat ac_aggr;
21858if (ac_aggr.st_blksize)
21859return 0;
21860 ;
21861 return 0;
21862}
21863_ACEOF
21864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021865if { (ac_try="$ac_compile"
21866case "(($ac_try" in
21867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868 *) ac_try_echo=$ac_try;;
21869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021873 grep -v '^ *+' conftest.er1 >conftest.err
21874 rm -f conftest.er1
21875 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877 (exit $ac_status); } && {
21878 test -z "$ac_c_werror_flag" ||
21879 test ! -s conftest.err
21880 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021881 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021882else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021884sed 's/^/| /' conftest.$ac_ext >&5
21885
Martin v. Löwiseba40652007-08-30 20:10:57 +000021886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021887/* confdefs.h. */
21888_ACEOF
21889cat confdefs.h >>conftest.$ac_ext
21890cat >>conftest.$ac_ext <<_ACEOF
21891/* end confdefs.h. */
21892$ac_includes_default
21893int
21894main ()
21895{
21896static struct stat ac_aggr;
21897if (sizeof ac_aggr.st_blksize)
21898return 0;
21899 ;
21900 return 0;
21901}
21902_ACEOF
21903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021904if { (ac_try="$ac_compile"
21905case "(($ac_try" in
21906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21907 *) ac_try_echo=$ac_try;;
21908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021910 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021912 grep -v '^ *+' conftest.er1 >conftest.err
21913 rm -f conftest.er1
21914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916 (exit $ac_status); } && {
21917 test -z "$ac_c_werror_flag" ||
21918 test ! -s conftest.err
21919 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021920 ac_cv_member_struct_stat_st_blksize=yes
21921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021923sed 's/^/| /' conftest.$ac_ext >&5
21924
Martin v. Löwiseba40652007-08-30 20:10:57 +000021925 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927
21928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930
21931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021933{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21934echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21935if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021936
Martin v. Löwis11437992002-04-12 09:54:03 +000021937cat >>confdefs.h <<_ACEOF
21938#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21939_ACEOF
21940
21941
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021942fi
21943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021944{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21945echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021946if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021947 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021948else
21949 cat >conftest.$ac_ext <<_ACEOF
21950/* confdefs.h. */
21951_ACEOF
21952cat confdefs.h >>conftest.$ac_ext
21953cat >>conftest.$ac_ext <<_ACEOF
21954/* end confdefs.h. */
21955$ac_includes_default
21956int
21957main ()
21958{
21959static struct stat ac_aggr;
21960if (ac_aggr.st_flags)
21961return 0;
21962 ;
21963 return 0;
21964}
21965_ACEOF
21966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021967if { (ac_try="$ac_compile"
21968case "(($ac_try" in
21969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970 *) ac_try_echo=$ac_try;;
21971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021973 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021974 ac_status=$?
21975 grep -v '^ *+' conftest.er1 >conftest.err
21976 rm -f conftest.er1
21977 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979 (exit $ac_status); } && {
21980 test -z "$ac_c_werror_flag" ||
21981 test ! -s conftest.err
21982 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021983 ac_cv_member_struct_stat_st_flags=yes
21984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021985 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021986sed 's/^/| /' conftest.$ac_ext >&5
21987
Martin v. Löwiseba40652007-08-30 20:10:57 +000021988 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021989/* confdefs.h. */
21990_ACEOF
21991cat confdefs.h >>conftest.$ac_ext
21992cat >>conftest.$ac_ext <<_ACEOF
21993/* end confdefs.h. */
21994$ac_includes_default
21995int
21996main ()
21997{
21998static struct stat ac_aggr;
21999if (sizeof ac_aggr.st_flags)
22000return 0;
22001 ;
22002 return 0;
22003}
22004_ACEOF
22005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022006if { (ac_try="$ac_compile"
22007case "(($ac_try" in
22008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22009 *) ac_try_echo=$ac_try;;
22010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022012 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022013 ac_status=$?
22014 grep -v '^ *+' conftest.er1 >conftest.err
22015 rm -f conftest.er1
22016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018 (exit $ac_status); } && {
22019 test -z "$ac_c_werror_flag" ||
22020 test ! -s conftest.err
22021 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022022 ac_cv_member_struct_stat_st_flags=yes
22023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022024 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022025sed 's/^/| /' conftest.$ac_ext >&5
22026
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022029
22030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022032
22033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022034fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22036echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22037if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022038
22039cat >>confdefs.h <<_ACEOF
22040#define HAVE_STRUCT_STAT_ST_FLAGS 1
22041_ACEOF
22042
22043
22044fi
22045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022046{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22047echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022048if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022049 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022050else
22051 cat >conftest.$ac_ext <<_ACEOF
22052/* confdefs.h. */
22053_ACEOF
22054cat confdefs.h >>conftest.$ac_ext
22055cat >>conftest.$ac_ext <<_ACEOF
22056/* end confdefs.h. */
22057$ac_includes_default
22058int
22059main ()
22060{
22061static struct stat ac_aggr;
22062if (ac_aggr.st_gen)
22063return 0;
22064 ;
22065 return 0;
22066}
22067_ACEOF
22068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069if { (ac_try="$ac_compile"
22070case "(($ac_try" in
22071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22072 *) ac_try_echo=$ac_try;;
22073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022076 ac_status=$?
22077 grep -v '^ *+' conftest.er1 >conftest.err
22078 rm -f conftest.er1
22079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081 (exit $ac_status); } && {
22082 test -z "$ac_c_werror_flag" ||
22083 test ! -s conftest.err
22084 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022085 ac_cv_member_struct_stat_st_gen=yes
22086else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022087 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022088sed 's/^/| /' conftest.$ac_ext >&5
22089
Martin v. Löwiseba40652007-08-30 20:10:57 +000022090 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
22096$ac_includes_default
22097int
22098main ()
22099{
22100static struct stat ac_aggr;
22101if (sizeof ac_aggr.st_gen)
22102return 0;
22103 ;
22104 return 0;
22105}
22106_ACEOF
22107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108if { (ac_try="$ac_compile"
22109case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022115 ac_status=$?
22116 grep -v '^ *+' conftest.er1 >conftest.err
22117 rm -f conftest.er1
22118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120 (exit $ac_status); } && {
22121 test -z "$ac_c_werror_flag" ||
22122 test ! -s conftest.err
22123 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022124 ac_cv_member_struct_stat_st_gen=yes
22125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022126 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022127sed 's/^/| /' conftest.$ac_ext >&5
22128
Martin v. Löwiseba40652007-08-30 20:10:57 +000022129 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131
22132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134
22135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022137{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22138echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22139if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022140
22141cat >>confdefs.h <<_ACEOF
22142#define HAVE_STRUCT_STAT_ST_GEN 1
22143_ACEOF
22144
22145
22146fi
22147
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022148{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22149echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022150if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022151 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022152else
22153 cat >conftest.$ac_ext <<_ACEOF
22154/* confdefs.h. */
22155_ACEOF
22156cat confdefs.h >>conftest.$ac_ext
22157cat >>conftest.$ac_ext <<_ACEOF
22158/* end confdefs.h. */
22159$ac_includes_default
22160int
22161main ()
22162{
22163static struct stat ac_aggr;
22164if (ac_aggr.st_birthtime)
22165return 0;
22166 ;
22167 return 0;
22168}
22169_ACEOF
22170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022171if { (ac_try="$ac_compile"
22172case "(($ac_try" in
22173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22174 *) ac_try_echo=$ac_try;;
22175esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022178 ac_status=$?
22179 grep -v '^ *+' conftest.er1 >conftest.err
22180 rm -f conftest.er1
22181 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183 (exit $ac_status); } && {
22184 test -z "$ac_c_werror_flag" ||
22185 test ! -s conftest.err
22186 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022187 ac_cv_member_struct_stat_st_birthtime=yes
22188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022189 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022190sed 's/^/| /' conftest.$ac_ext >&5
22191
Martin v. Löwiseba40652007-08-30 20:10:57 +000022192 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022193/* confdefs.h. */
22194_ACEOF
22195cat confdefs.h >>conftest.$ac_ext
22196cat >>conftest.$ac_ext <<_ACEOF
22197/* end confdefs.h. */
22198$ac_includes_default
22199int
22200main ()
22201{
22202static struct stat ac_aggr;
22203if (sizeof ac_aggr.st_birthtime)
22204return 0;
22205 ;
22206 return 0;
22207}
22208_ACEOF
22209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210if { (ac_try="$ac_compile"
22211case "(($ac_try" in
22212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22213 *) ac_try_echo=$ac_try;;
22214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022217 ac_status=$?
22218 grep -v '^ *+' conftest.er1 >conftest.err
22219 rm -f conftest.er1
22220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222 (exit $ac_status); } && {
22223 test -z "$ac_c_werror_flag" ||
22224 test ! -s conftest.err
22225 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022226 ac_cv_member_struct_stat_st_birthtime=yes
22227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022228 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022229sed 's/^/| /' conftest.$ac_ext >&5
22230
Martin v. Löwiseba40652007-08-30 20:10:57 +000022231 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233
22234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022236
22237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22240echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22241if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022242
22243cat >>confdefs.h <<_ACEOF
22244#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22245_ACEOF
22246
22247
22248fi
22249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022250{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22251echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022252if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022254else
Martin v. Löwis11437992002-04-12 09:54:03 +000022255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022256/* confdefs.h. */
22257_ACEOF
22258cat confdefs.h >>conftest.$ac_ext
22259cat >>conftest.$ac_ext <<_ACEOF
22260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022261$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022262int
22263main ()
22264{
22265static struct stat ac_aggr;
22266if (ac_aggr.st_blocks)
22267return 0;
22268 ;
22269 return 0;
22270}
22271_ACEOF
22272rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022273if { (ac_try="$ac_compile"
22274case "(($ac_try" in
22275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22276 *) ac_try_echo=$ac_try;;
22277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022281 grep -v '^ *+' conftest.er1 >conftest.err
22282 rm -f conftest.er1
22283 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022285 (exit $ac_status); } && {
22286 test -z "$ac_c_werror_flag" ||
22287 test ! -s conftest.err
22288 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022289 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022292sed 's/^/| /' conftest.$ac_ext >&5
22293
Martin v. Löwiseba40652007-08-30 20:10:57 +000022294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022295/* confdefs.h. */
22296_ACEOF
22297cat confdefs.h >>conftest.$ac_ext
22298cat >>conftest.$ac_ext <<_ACEOF
22299/* end confdefs.h. */
22300$ac_includes_default
22301int
22302main ()
22303{
22304static struct stat ac_aggr;
22305if (sizeof ac_aggr.st_blocks)
22306return 0;
22307 ;
22308 return 0;
22309}
22310_ACEOF
22311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022312if { (ac_try="$ac_compile"
22313case "(($ac_try" in
22314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22315 *) ac_try_echo=$ac_try;;
22316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022320 grep -v '^ *+' conftest.er1 >conftest.err
22321 rm -f conftest.er1
22322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324 (exit $ac_status); } && {
22325 test -z "$ac_c_werror_flag" ||
22326 test ! -s conftest.err
22327 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022328 ac_cv_member_struct_stat_st_blocks=yes
22329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022331sed 's/^/| /' conftest.$ac_ext >&5
22332
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022335
22336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338
22339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022341{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22342echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22343if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022344
Martin v. Löwis11437992002-04-12 09:54:03 +000022345cat >>confdefs.h <<_ACEOF
22346#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22347_ACEOF
22348
22349
22350cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022351#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022352_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022353
22354else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022355 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022356 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022357 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22358 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022359esac
22360
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022361fi
22362
Michael W. Hudson54241132001-12-07 15:38:26 +000022363
Martin v. Löwis11437992002-04-12 09:54:03 +000022364
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022365{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22366echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022367if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022368 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022369else
Martin v. Löwis11437992002-04-12 09:54:03 +000022370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022371/* confdefs.h. */
22372_ACEOF
22373cat confdefs.h >>conftest.$ac_ext
22374cat >>conftest.$ac_ext <<_ACEOF
22375/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022376#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022377int
22378main ()
22379{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022380return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022381 ;
22382 return 0;
22383}
22384_ACEOF
22385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022386if { (ac_try="$ac_compile"
22387case "(($ac_try" in
22388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22389 *) ac_try_echo=$ac_try;;
22390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022394 grep -v '^ *+' conftest.er1 >conftest.err
22395 rm -f conftest.er1
22396 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398 (exit $ac_status); } && {
22399 test -z "$ac_c_werror_flag" ||
22400 test ! -s conftest.err
22401 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022402 ac_cv_header_time_altzone=yes
22403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022405sed 's/^/| /' conftest.$ac_ext >&5
22406
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022408fi
22409
Martin v. Löwiseba40652007-08-30 20:10:57 +000022410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22411fi
22412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022413{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22414echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022415if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022416
22417cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022418#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022419_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022420
22421fi
22422
Guido van Rossumda88dad1995-01-26 00:46:29 +000022423was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022424{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22425echo $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 +000022426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022427/* confdefs.h. */
22428_ACEOF
22429cat confdefs.h >>conftest.$ac_ext
22430cat >>conftest.$ac_ext <<_ACEOF
22431/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022432
22433#include <sys/types.h>
22434#include <sys/select.h>
22435#include <sys/time.h>
22436
Martin v. Löwis11437992002-04-12 09:54:03 +000022437int
22438main ()
22439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022440;
Martin v. Löwis11437992002-04-12 09:54:03 +000022441 ;
22442 return 0;
22443}
22444_ACEOF
22445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022446if { (ac_try="$ac_compile"
22447case "(($ac_try" in
22448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22449 *) ac_try_echo=$ac_try;;
22450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022454 grep -v '^ *+' conftest.er1 >conftest.err
22455 rm -f conftest.er1
22456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458 (exit $ac_status); } && {
22459 test -z "$ac_c_werror_flag" ||
22460 test ! -s conftest.err
22461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022462
22463
22464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022465#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022466_ACEOF
22467
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022468 was_it_defined=yes
22469
Guido van Rossumf78abae1997-01-21 22:02:36 +000022470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022472sed 's/^/| /' conftest.$ac_ext >&5
22473
Brett Cannon19fab762007-06-02 03:02:29 +000022474
Martin v. Löwiseba40652007-08-30 20:10:57 +000022475fi
22476
22477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022478{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22479echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022481{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22482echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022483if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022484 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022485else
Martin v. Löwis11437992002-04-12 09:54:03 +000022486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022487/* confdefs.h. */
22488_ACEOF
22489cat confdefs.h >>conftest.$ac_ext
22490cat >>conftest.$ac_ext <<_ACEOF
22491/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022492
22493# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022494int
22495main ()
22496{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022497struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022498 ;
22499 return 0;
22500}
22501_ACEOF
22502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022503if { (ac_try="$ac_compile"
22504case "(($ac_try" in
22505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22506 *) ac_try_echo=$ac_try;;
22507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022511 grep -v '^ *+' conftest.er1 >conftest.err
22512 rm -f conftest.er1
22513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022515 (exit $ac_status); } && {
22516 test -z "$ac_c_werror_flag" ||
22517 test ! -s conftest.err
22518 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022519 ac_cv_struct_addrinfo=yes
22520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022522sed 's/^/| /' conftest.$ac_ext >&5
22523
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022525fi
22526
Martin v. Löwiseba40652007-08-30 20:10:57 +000022527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22528fi
22529
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022530{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22531echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022532if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022533
22534cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022535#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022536_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022537
22538fi
22539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022540{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22541echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022542if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022543 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544else
Martin v. Löwis11437992002-04-12 09:54:03 +000022545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022546/* confdefs.h. */
22547_ACEOF
22548cat confdefs.h >>conftest.$ac_ext
22549cat >>conftest.$ac_ext <<_ACEOF
22550/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022551
22552# include <sys/types.h>
22553# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022554int
22555main ()
22556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022557struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022558 ;
22559 return 0;
22560}
22561_ACEOF
22562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022563if { (ac_try="$ac_compile"
22564case "(($ac_try" in
22565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22566 *) ac_try_echo=$ac_try;;
22567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022571 grep -v '^ *+' conftest.er1 >conftest.err
22572 rm -f conftest.er1
22573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022575 (exit $ac_status); } && {
22576 test -z "$ac_c_werror_flag" ||
22577 test ! -s conftest.err
22578 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022579 ac_cv_struct_sockaddr_storage=yes
22580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022582sed 's/^/| /' conftest.$ac_ext >&5
22583
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022585fi
22586
Martin v. Löwiseba40652007-08-30 20:10:57 +000022587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22588fi
22589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022590{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22591echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022592if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022593
22594cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022595#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022596_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022597
22598fi
22599
Guido van Rossum627b2d71993-12-24 10:39:16 +000022600# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022601
Michael W. Hudson54241132001-12-07 15:38:26 +000022602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022603{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22604echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022605if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022606 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022607else
Martin v. Löwis11437992002-04-12 09:54:03 +000022608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022609/* confdefs.h. */
22610_ACEOF
22611cat confdefs.h >>conftest.$ac_ext
22612cat >>conftest.$ac_ext <<_ACEOF
22613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022615int
22616main ()
22617{
22618static int test_array [1 - 2 * !(((char) -1) < 0)];
22619test_array [0] = 0
22620
22621 ;
22622 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022623}
Martin v. Löwis11437992002-04-12 09:54:03 +000022624_ACEOF
22625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022626if { (ac_try="$ac_compile"
22627case "(($ac_try" in
22628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22629 *) ac_try_echo=$ac_try;;
22630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022634 grep -v '^ *+' conftest.er1 >conftest.err
22635 rm -f conftest.er1
22636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638 (exit $ac_status); } && {
22639 test -z "$ac_c_werror_flag" ||
22640 test ! -s conftest.err
22641 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022642 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022645sed 's/^/| /' conftest.$ac_ext >&5
22646
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022649
22650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022651fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022652{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22653echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022654if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022655 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022656#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022657_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022658
22659fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022661{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22662echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022663if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022665else
22666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022667/* confdefs.h. */
22668_ACEOF
22669cat confdefs.h >>conftest.$ac_ext
22670cat >>conftest.$ac_ext <<_ACEOF
22671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022672
Martin v. Löwis11437992002-04-12 09:54:03 +000022673int
22674main ()
22675{
22676/* FIXME: Include the comments suggested by Paul. */
22677#ifndef __cplusplus
22678 /* Ultrix mips cc rejects this. */
22679 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022682 char const *const *pcpcc;
22683 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022684 /* NEC SVR4.0.2 mips cc rejects this. */
22685 struct point {int x, y;};
22686 static struct point const zero = {0,0};
22687 /* AIX XL C 1.02.0.0 rejects this.
22688 It does not let you subtract one const X* pointer from another in
22689 an arm of an if-expression whose if-part is not a constant
22690 expression */
22691 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022692 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022693 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022694 ++pcpcc;
22695 ppc = (char**) pcpcc;
22696 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022697 { /* SCO 3.2v4 cc rejects this. */
22698 char *t;
22699 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022700
Martin v. Löwis11437992002-04-12 09:54:03 +000022701 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022702 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022703 }
22704 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22705 int x[] = {25, 17};
22706 const int *foo = &x[0];
22707 ++foo;
22708 }
22709 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22710 typedef const int *iptr;
22711 iptr p = 0;
22712 ++p;
22713 }
22714 { /* AIX XL C 1.02.0.0 rejects this saying
22715 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22716 struct s { int j; const int *ap[3]; };
22717 struct s *b; b->j = 5;
22718 }
22719 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22720 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022721 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022722 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022723 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022724#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022725
Martin v. Löwis11437992002-04-12 09:54:03 +000022726 ;
22727 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022728}
Martin v. Löwis11437992002-04-12 09:54:03 +000022729_ACEOF
22730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731if { (ac_try="$ac_compile"
22732case "(($ac_try" in
22733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22734 *) ac_try_echo=$ac_try;;
22735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022739 grep -v '^ *+' conftest.er1 >conftest.err
22740 rm -f conftest.er1
22741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022743 (exit $ac_status); } && {
22744 test -z "$ac_c_werror_flag" ||
22745 test ! -s conftest.err
22746 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022747 ac_cv_c_const=yes
22748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022750sed 's/^/| /' conftest.$ac_ext >&5
22751
Martin v. Löwiseba40652007-08-30 20:10:57 +000022752 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022754
22755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022757{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22758echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022759if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022760
22761cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022762#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022764
22765fi
22766
Michael W. Hudson54241132001-12-07 15:38:26 +000022767
Guido van Rossumda88dad1995-01-26 00:46:29 +000022768works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022769{ echo "$as_me:$LINENO: checking for working volatile" >&5
22770echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022772/* confdefs.h. */
22773_ACEOF
22774cat confdefs.h >>conftest.$ac_ext
22775cat >>conftest.$ac_ext <<_ACEOF
22776/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022777
Martin v. Löwis11437992002-04-12 09:54:03 +000022778int
22779main ()
22780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022781volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ;
22783 return 0;
22784}
22785_ACEOF
22786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022787if { (ac_try="$ac_compile"
22788case "(($ac_try" in
22789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22790 *) ac_try_echo=$ac_try;;
22791esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022793 (eval "$ac_compile") 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 Vassalottibd7569b2009-07-17 23:09:02 +000022798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022799 (exit $ac_status); } && {
22800 test -z "$ac_c_werror_flag" ||
22801 test ! -s conftest.err
22802 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022803 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022806sed 's/^/| /' conftest.$ac_ext >&5
22807
Martin v. Löwis11437992002-04-12 09:54:03 +000022808
22809cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022810#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022811_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022813
Guido van Rossum627b2d71993-12-24 10:39:16 +000022814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022815
22816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022817{ echo "$as_me:$LINENO: result: $works" >&5
22818echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022819
Guido van Rossumda88dad1995-01-26 00:46:29 +000022820works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022821{ echo "$as_me:$LINENO: checking for working signed char" >&5
22822echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022823cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022824/* confdefs.h. */
22825_ACEOF
22826cat confdefs.h >>conftest.$ac_ext
22827cat >>conftest.$ac_ext <<_ACEOF
22828/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022829
Martin v. Löwis11437992002-04-12 09:54:03 +000022830int
22831main ()
22832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022833signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022834 ;
22835 return 0;
22836}
22837_ACEOF
22838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022839if { (ac_try="$ac_compile"
22840case "(($ac_try" in
22841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22842 *) ac_try_echo=$ac_try;;
22843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022847 grep -v '^ *+' conftest.er1 >conftest.err
22848 rm -f conftest.er1
22849 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022851 (exit $ac_status); } && {
22852 test -z "$ac_c_werror_flag" ||
22853 test ! -s conftest.err
22854 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022855 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022858sed 's/^/| /' conftest.$ac_ext >&5
22859
Martin v. Löwis11437992002-04-12 09:54:03 +000022860
22861cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022862#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022863_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022864
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022865
Guido van Rossum7f43da71994-08-01 12:15:30 +000022866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022867
22868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022869{ echo "$as_me:$LINENO: result: $works" >&5
22870echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022871
Guido van Rossumda88dad1995-01-26 00:46:29 +000022872have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022873{ echo "$as_me:$LINENO: checking for prototypes" >&5
22874echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022876/* confdefs.h. */
22877_ACEOF
22878cat confdefs.h >>conftest.$ac_ext
22879cat >>conftest.$ac_ext <<_ACEOF
22880/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022881int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022882int
22883main ()
22884{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022885return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022886 ;
22887 return 0;
22888}
22889_ACEOF
22890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022891if { (ac_try="$ac_compile"
22892case "(($ac_try" in
22893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22894 *) ac_try_echo=$ac_try;;
22895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022899 grep -v '^ *+' conftest.er1 >conftest.err
22900 rm -f conftest.er1
22901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903 (exit $ac_status); } && {
22904 test -z "$ac_c_werror_flag" ||
22905 test ! -s conftest.err
22906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022907
22908
22909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022910#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022911_ACEOF
22912
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022913 have_prototypes=yes
22914
Guido van Rossumf78abae1997-01-21 22:02:36 +000022915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022917sed 's/^/| /' conftest.$ac_ext >&5
22918
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919
Guido van Rossum7f43da71994-08-01 12:15:30 +000022920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022921
22922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022923{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22924echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022925
Guido van Rossumda88dad1995-01-26 00:46:29 +000022926works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022927{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22928echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022930/* confdefs.h. */
22931_ACEOF
22932cat confdefs.h >>conftest.$ac_ext
22933cat >>conftest.$ac_ext <<_ACEOF
22934/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022935
22936#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022937int foo(int x, ...) {
22938 va_list va;
22939 va_start(va, x);
22940 va_arg(va, int);
22941 va_arg(va, char *);
22942 va_arg(va, double);
22943 return 0;
22944}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022945
Martin v. Löwis11437992002-04-12 09:54:03 +000022946int
22947main ()
22948{
Guido van Rossum90eea071996-08-30 20:58:57 +000022949return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 ;
22951 return 0;
22952}
22953_ACEOF
22954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955if { (ac_try="$ac_compile"
22956case "(($ac_try" in
22957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22958 *) ac_try_echo=$ac_try;;
22959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022963 grep -v '^ *+' conftest.er1 >conftest.err
22964 rm -f conftest.er1
22965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022967 (exit $ac_status); } && {
22968 test -z "$ac_c_werror_flag" ||
22969 test ! -s conftest.err
22970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022971
22972
22973cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022974#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022975_ACEOF
22976
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022977 works=yes
22978
Guido van Rossumf78abae1997-01-21 22:02:36 +000022979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022981sed 's/^/| /' conftest.$ac_ext >&5
22982
Martin v. Löwiseba40652007-08-30 20:10:57 +000022983
Guido van Rossum627b2d71993-12-24 10:39:16 +000022984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022985
22986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022987{ echo "$as_me:$LINENO: result: $works" >&5
22988echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022989
Martin v. Löwisd6320502004-08-12 13:45:08 +000022990# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022991{ echo "$as_me:$LINENO: checking for socketpair" >&5
22992echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022993cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022994/* confdefs.h. */
22995_ACEOF
22996cat confdefs.h >>conftest.$ac_ext
22997cat >>conftest.$ac_ext <<_ACEOF
22998/* end confdefs.h. */
22999
23000#include <sys/types.h>
23001#include <sys/socket.h>
23002
23003int
23004main ()
23005{
23006void *x=socketpair
23007 ;
23008 return 0;
23009}
23010_ACEOF
23011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023012if { (ac_try="$ac_compile"
23013case "(($ac_try" in
23014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23015 *) ac_try_echo=$ac_try;;
23016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023020 grep -v '^ *+' conftest.er1 >conftest.err
23021 rm -f conftest.er1
23022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024 (exit $ac_status); } && {
23025 test -z "$ac_c_werror_flag" ||
23026 test ! -s conftest.err
23027 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023028
23029cat >>confdefs.h <<\_ACEOF
23030#define HAVE_SOCKETPAIR 1
23031_ACEOF
23032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023033 { echo "$as_me:$LINENO: result: yes" >&5
23034echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023036 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023037sed 's/^/| /' conftest.$ac_ext >&5
23038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023039 { echo "$as_me:$LINENO: result: no" >&5
23040echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023041
23042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043
23044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023045
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023046# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023047{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23048echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023050/* confdefs.h. */
23051_ACEOF
23052cat confdefs.h >>conftest.$ac_ext
23053cat >>conftest.$ac_ext <<_ACEOF
23054/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023055#include <sys/types.h>
23056#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023057int
23058main ()
23059{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023060struct sockaddr x;
23061x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 ;
23063 return 0;
23064}
23065_ACEOF
23066rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023067if { (ac_try="$ac_compile"
23068case "(($ac_try" in
23069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23070 *) ac_try_echo=$ac_try;;
23071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023075 grep -v '^ *+' conftest.er1 >conftest.err
23076 rm -f conftest.er1
23077 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023079 (exit $ac_status); } && {
23080 test -z "$ac_c_werror_flag" ||
23081 test ! -s conftest.err
23082 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083 { echo "$as_me:$LINENO: result: yes" >&5
23084echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023085
23086cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023087#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023088_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023089
23090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023092sed 's/^/| /' conftest.$ac_ext >&5
23093
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023094 { echo "$as_me:$LINENO: result: no" >&5
23095echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097
23098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023099
Guido van Rossumda88dad1995-01-26 00:46:29 +000023100va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023101{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23102echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023104/* confdefs.h. */
23105_ACEOF
23106cat confdefs.h >>conftest.$ac_ext
23107cat >>conftest.$ac_ext <<_ACEOF
23108/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023109
23110#ifdef HAVE_STDARG_PROTOTYPES
23111#include <stdarg.h>
23112#else
23113#include <varargs.h>
23114#endif
23115
Martin v. Löwis11437992002-04-12 09:54:03 +000023116int
23117main ()
23118{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023119va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023120 ;
23121 return 0;
23122}
23123_ACEOF
23124rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023125if { (ac_try="$ac_compile"
23126case "(($ac_try" in
23127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23128 *) ac_try_echo=$ac_try;;
23129esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023133 grep -v '^ *+' conftest.er1 >conftest.err
23134 rm -f conftest.er1
23135 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137 (exit $ac_status); } && {
23138 test -z "$ac_c_werror_flag" ||
23139 test ! -s conftest.err
23140 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023141 :
23142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023143 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023144sed 's/^/| /' conftest.$ac_ext >&5
23145
Martin v. Löwis11437992002-04-12 09:54:03 +000023146
23147
23148cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023149#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023150_ACEOF
23151
Guido van Rossumda88dad1995-01-26 00:46:29 +000023152 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023153
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023155
23156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023157{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23158echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023160# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023161
23162
23163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023164{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23165echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023166if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023167 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023168else
Martin v. Löwis11437992002-04-12 09:54:03 +000023169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023170/* confdefs.h. */
23171_ACEOF
23172cat confdefs.h >>conftest.$ac_ext
23173cat >>conftest.$ac_ext <<_ACEOF
23174/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023175/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23176 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23177#define gethostbyname_r innocuous_gethostbyname_r
23178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023179/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023180 which can conflict with char gethostbyname_r (); below.
23181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023182 <limits.h> exists even on freestanding compilers. */
23183
23184#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023185# include <limits.h>
23186#else
23187# include <assert.h>
23188#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023189
23190#undef gethostbyname_r
23191
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192/* Override any GCC internal prototype to avoid an error.
23193 Use char because int might match the return type of a GCC
23194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023195#ifdef __cplusplus
23196extern "C"
23197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023198char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023199/* The GNU C library defines this for functions which it implements
23200 to always fail with ENOSYS. Some functions are actually named
23201 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023202#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023203choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023204#endif
23205
Skip Montanaro6dead952003-09-25 14:50:04 +000023206int
23207main ()
23208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023209return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023210 ;
23211 return 0;
23212}
23213_ACEOF
23214rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023215if { (ac_try="$ac_link"
23216case "(($ac_try" in
23217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23218 *) ac_try_echo=$ac_try;;
23219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023221 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023223 grep -v '^ *+' conftest.er1 >conftest.err
23224 rm -f conftest.er1
23225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023227 (exit $ac_status); } && {
23228 test -z "$ac_c_werror_flag" ||
23229 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023230 } && test -s conftest$ac_exeext &&
23231 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023232 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023235sed 's/^/| /' conftest.$ac_ext >&5
23236
Martin v. Löwiseba40652007-08-30 20:10:57 +000023237 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023239
23240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023241 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023242fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023243{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23244echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23245if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023246
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023248#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023249_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023251 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23252echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023253 OLD_CFLAGS=$CFLAGS
23254 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023256/* confdefs.h. */
23257_ACEOF
23258cat confdefs.h >>conftest.$ac_ext
23259cat >>conftest.$ac_ext <<_ACEOF
23260/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023261
23262# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023263
Martin v. Löwis11437992002-04-12 09:54:03 +000023264int
23265main ()
23266{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023267
23268 char *name;
23269 struct hostent *he, *res;
23270 char buffer[2048];
23271 int buflen = 2048;
23272 int h_errnop;
23273
23274 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023275
23276 ;
23277 return 0;
23278}
23279_ACEOF
23280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281if { (ac_try="$ac_compile"
23282case "(($ac_try" in
23283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23284 *) ac_try_echo=$ac_try;;
23285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023289 grep -v '^ *+' conftest.er1 >conftest.err
23290 rm -f conftest.er1
23291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023293 (exit $ac_status); } && {
23294 test -z "$ac_c_werror_flag" ||
23295 test ! -s conftest.err
23296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023297
23298 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023299#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023300_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023301
Martin v. Löwis11437992002-04-12 09:54:03 +000023302
23303cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023304#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023305_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023306
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023307 { echo "$as_me:$LINENO: result: yes" >&5
23308echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023309
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023312sed 's/^/| /' conftest.$ac_ext >&5
23313
Martin v. Löwis11437992002-04-12 09:54:03 +000023314
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023315 { echo "$as_me:$LINENO: result: no" >&5
23316echo "${ECHO_T}no" >&6; }
23317 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23318echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023320/* confdefs.h. */
23321_ACEOF
23322cat confdefs.h >>conftest.$ac_ext
23323cat >>conftest.$ac_ext <<_ACEOF
23324/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023325
23326# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023327
Martin v. Löwis11437992002-04-12 09:54:03 +000023328int
23329main ()
23330{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023331
23332 char *name;
23333 struct hostent *he;
23334 char buffer[2048];
23335 int buflen = 2048;
23336 int h_errnop;
23337
23338 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023339
23340 ;
23341 return 0;
23342}
23343_ACEOF
23344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023345if { (ac_try="$ac_compile"
23346case "(($ac_try" in
23347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23348 *) ac_try_echo=$ac_try;;
23349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023353 grep -v '^ *+' conftest.er1 >conftest.err
23354 rm -f conftest.er1
23355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023357 (exit $ac_status); } && {
23358 test -z "$ac_c_werror_flag" ||
23359 test ! -s conftest.err
23360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023361
23362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023363#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023364_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023365
Martin v. Löwis11437992002-04-12 09:54:03 +000023366
23367cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023368#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023369_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023370
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023371 { echo "$as_me:$LINENO: result: yes" >&5
23372echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023373
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023376sed 's/^/| /' conftest.$ac_ext >&5
23377
Martin v. Löwis11437992002-04-12 09:54:03 +000023378
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023379 { echo "$as_me:$LINENO: result: no" >&5
23380echo "${ECHO_T}no" >&6; }
23381 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23382echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023384/* confdefs.h. */
23385_ACEOF
23386cat confdefs.h >>conftest.$ac_ext
23387cat >>conftest.$ac_ext <<_ACEOF
23388/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023389
23390# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023391
Martin v. Löwis11437992002-04-12 09:54:03 +000023392int
23393main ()
23394{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023395
23396 char *name;
23397 struct hostent *he;
23398 struct hostent_data data;
23399
23400 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023401
23402 ;
23403 return 0;
23404}
23405_ACEOF
23406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023407if { (ac_try="$ac_compile"
23408case "(($ac_try" in
23409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23410 *) ac_try_echo=$ac_try;;
23411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023415 grep -v '^ *+' conftest.er1 >conftest.err
23416 rm -f conftest.er1
23417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023419 (exit $ac_status); } && {
23420 test -z "$ac_c_werror_flag" ||
23421 test ! -s conftest.err
23422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023423
23424 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023425#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023426_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023427
Martin v. Löwis11437992002-04-12 09:54:03 +000023428
23429cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023430#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023431_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023433 { echo "$as_me:$LINENO: result: yes" >&5
23434echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023438sed 's/^/| /' conftest.$ac_ext >&5
23439
Martin v. Löwis11437992002-04-12 09:54:03 +000023440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023441 { echo "$as_me:$LINENO: result: no" >&5
23442echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023445
23446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023449
23450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023453
23454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023455 CFLAGS=$OLD_CFLAGS
23456
23457else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023458
Martin v. Löwis11437992002-04-12 09:54:03 +000023459
23460for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023461do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023462as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23463{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23464echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023465if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023467else
Martin v. Löwis11437992002-04-12 09:54:03 +000023468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023469/* confdefs.h. */
23470_ACEOF
23471cat confdefs.h >>conftest.$ac_ext
23472cat >>conftest.$ac_ext <<_ACEOF
23473/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023474/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23475 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23476#define $ac_func innocuous_$ac_func
23477
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023478/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023479 which can conflict with char $ac_func (); below.
23480 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023481 <limits.h> exists even on freestanding compilers. */
23482
23483#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023484# include <limits.h>
23485#else
23486# include <assert.h>
23487#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023488
23489#undef $ac_func
23490
Martin v. Löwiseba40652007-08-30 20:10:57 +000023491/* Override any GCC internal prototype to avoid an error.
23492 Use char because int might match the return type of a GCC
23493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023494#ifdef __cplusplus
23495extern "C"
23496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023497char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023498/* The GNU C library defines this for functions which it implements
23499 to always fail with ENOSYS. Some functions are actually named
23500 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023501#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023502choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023503#endif
23504
Skip Montanaro6dead952003-09-25 14:50:04 +000023505int
23506main ()
23507{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023508return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023509 ;
23510 return 0;
23511}
23512_ACEOF
23513rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023514if { (ac_try="$ac_link"
23515case "(($ac_try" in
23516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23517 *) ac_try_echo=$ac_try;;
23518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023522 grep -v '^ *+' conftest.er1 >conftest.err
23523 rm -f conftest.er1
23524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023526 (exit $ac_status); } && {
23527 test -z "$ac_c_werror_flag" ||
23528 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023529 } && test -s conftest$ac_exeext &&
23530 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023531 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023534sed 's/^/| /' conftest.$ac_ext >&5
23535
Martin v. Löwiseba40652007-08-30 20:10:57 +000023536 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023538
23539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023540 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023542ac_res=`eval echo '${'$as_ac_var'}'`
23543 { echo "$as_me:$LINENO: result: $ac_res" >&5
23544echo "${ECHO_T}$ac_res" >&6; }
23545if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023546 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023547#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023548_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023550fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023551done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023552
Michael W. Hudson54241132001-12-07 15:38:26 +000023553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023554fi
23555
Michael W. Hudson54241132001-12-07 15:38:26 +000023556
23557
23558
23559
23560
23561
Guido van Rossum627b2d71993-12-24 10:39:16 +000023562# checks for system services
23563# (none yet)
23564
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023565# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023566{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23567echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023568if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023569 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023570else
Martin v. Löwis11437992002-04-12 09:54:03 +000023571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023572/* confdefs.h. */
23573_ACEOF
23574cat confdefs.h >>conftest.$ac_ext
23575cat >>conftest.$ac_ext <<_ACEOF
23576/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023577/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23579#define __fpu_control innocuous___fpu_control
23580
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023582 which can conflict with char __fpu_control (); below.
23583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023584 <limits.h> exists even on freestanding compilers. */
23585
23586#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023587# include <limits.h>
23588#else
23589# include <assert.h>
23590#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023591
23592#undef __fpu_control
23593
Martin v. Löwiseba40652007-08-30 20:10:57 +000023594/* Override any GCC internal prototype to avoid an error.
23595 Use char because int might match the return type of a GCC
23596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023597#ifdef __cplusplus
23598extern "C"
23599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023600char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023601/* The GNU C library defines this for functions which it implements
23602 to always fail with ENOSYS. Some functions are actually named
23603 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023605choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023606#endif
23607
Skip Montanaro6dead952003-09-25 14:50:04 +000023608int
23609main ()
23610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023611return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023612 ;
23613 return 0;
23614}
23615_ACEOF
23616rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023617if { (ac_try="$ac_link"
23618case "(($ac_try" in
23619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23620 *) ac_try_echo=$ac_try;;
23621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023625 grep -v '^ *+' conftest.er1 >conftest.err
23626 rm -f conftest.er1
23627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023629 (exit $ac_status); } && {
23630 test -z "$ac_c_werror_flag" ||
23631 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023632 } && test -s conftest$ac_exeext &&
23633 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023634 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023637sed 's/^/| /' conftest.$ac_ext >&5
23638
Martin v. Löwiseba40652007-08-30 20:10:57 +000023639 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023641
23642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023643 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023645{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23646echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23647if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023648 :
23649else
Martin v. Löwis11437992002-04-12 09:54:03 +000023650
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023651{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23652echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023653if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023655else
Martin v. Löwis11437992002-04-12 09:54:03 +000023656 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023657LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023659/* confdefs.h. */
23660_ACEOF
23661cat confdefs.h >>conftest.$ac_ext
23662cat >>conftest.$ac_ext <<_ACEOF
23663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023664
Martin v. Löwiseba40652007-08-30 20:10:57 +000023665/* Override any GCC internal prototype to avoid an error.
23666 Use char because int might match the return type of a GCC
23667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023668#ifdef __cplusplus
23669extern "C"
23670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023671char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023672int
23673main ()
23674{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023675return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023676 ;
23677 return 0;
23678}
23679_ACEOF
23680rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023681if { (ac_try="$ac_link"
23682case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023687 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023689 grep -v '^ *+' conftest.er1 >conftest.err
23690 rm -f conftest.er1
23691 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023693 (exit $ac_status); } && {
23694 test -z "$ac_c_werror_flag" ||
23695 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023696 } && test -s conftest$ac_exeext &&
23697 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023698 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023701sed 's/^/| /' conftest.$ac_ext >&5
23702
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023705
23706rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023708LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023709fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023710{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23711echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23712if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023713 cat >>confdefs.h <<_ACEOF
23714#define HAVE_LIBIEEE 1
23715_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023716
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023717 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023718
Guido van Rossum627b2d71993-12-24 10:39:16 +000023719fi
23720
Michael W. Hudson54241132001-12-07 15:38:26 +000023721
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023722fi
23723
Michael W. Hudson54241132001-12-07 15:38:26 +000023724
Guido van Rossum7f253911997-05-09 02:42:48 +000023725# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023726{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23727echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023728
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023730if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023732if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023733then
23734
23735cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023736#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023737_ACEOF
23738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023739 { echo "$as_me:$LINENO: result: yes" >&5
23740echo "${ECHO_T}yes" >&6; }
23741else { echo "$as_me:$LINENO: result: no" >&5
23742echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023743fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023745 { echo "$as_me:$LINENO: result: no" >&5
23746echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747fi
23748
Guido van Rossum7f253911997-05-09 02:42:48 +000023749
Guido van Rossum7f43da71994-08-01 12:15:30 +000023750# check for --with-libm=...
23751
Guido van Rossum563e7081996-09-10 18:20:48 +000023752case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023753Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023754BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023755*) LIBM=-lm
23756esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023757{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23758echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023759
Martin v. Löwiseba40652007-08-30 20:10:57 +000023760# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023761if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023762 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023763if test "$withval" = no
23764then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023765 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23766echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023767elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023768then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023769 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23770echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23771else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23772echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023773 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023774fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023776 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23777echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023778fi
23779
Guido van Rossum7f43da71994-08-01 12:15:30 +000023780
23781# check for --with-libc=...
23782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023783{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23784echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023785
Martin v. Löwiseba40652007-08-30 20:10:57 +000023786# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023787if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023788 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023789if test "$withval" = no
23790then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023791 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23792echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023793elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023794then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023795 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23796echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23797else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23798echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023799 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023800fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023801else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023802 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23803echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804fi
23805
Guido van Rossum7f43da71994-08-01 12:15:30 +000023806
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023807# **************************************************
23808# * Check for various properties of floating point *
23809# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023810
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023811{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23812echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23813if test "${ac_cv_little_endian_double+set}" = set; then
23814 echo $ECHO_N "(cached) $ECHO_C" >&6
23815else
23816
23817if test "$cross_compiling" = yes; then
23818 ac_cv_little_endian_double=no
23819else
23820 cat >conftest.$ac_ext <<_ACEOF
23821/* confdefs.h. */
23822_ACEOF
23823cat confdefs.h >>conftest.$ac_ext
23824cat >>conftest.$ac_ext <<_ACEOF
23825/* end confdefs.h. */
23826
23827#include <string.h>
23828int main() {
23829 double x = 9006104071832581.0;
23830 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23831 return 0;
23832 else
23833 return 1;
23834}
23835
23836_ACEOF
23837rm -f conftest$ac_exeext
23838if { (ac_try="$ac_link"
23839case "(($ac_try" in
23840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23841 *) ac_try_echo=$ac_try;;
23842esac
23843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23844 (eval "$ac_link") 2>&5
23845 ac_status=$?
23846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23848 { (case "(($ac_try" in
23849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23850 *) ac_try_echo=$ac_try;;
23851esac
23852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23853 (eval "$ac_try") 2>&5
23854 ac_status=$?
23855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23856 (exit $ac_status); }; }; then
23857 ac_cv_little_endian_double=yes
23858else
23859 echo "$as_me: program exited with status $ac_status" >&5
23860echo "$as_me: failed program was:" >&5
23861sed 's/^/| /' conftest.$ac_ext >&5
23862
23863( exit $ac_status )
23864ac_cv_little_endian_double=no
23865fi
23866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23867fi
23868
23869
23870fi
23871
23872{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23873echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23874if test "$ac_cv_little_endian_double" = yes
23875then
23876
23877cat >>confdefs.h <<\_ACEOF
23878#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23879_ACEOF
23880
23881fi
23882
23883{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23884echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23885if test "${ac_cv_big_endian_double+set}" = set; then
23886 echo $ECHO_N "(cached) $ECHO_C" >&6
23887else
23888
23889if test "$cross_compiling" = yes; then
23890 ac_cv_big_endian_double=no
23891else
23892 cat >conftest.$ac_ext <<_ACEOF
23893/* confdefs.h. */
23894_ACEOF
23895cat confdefs.h >>conftest.$ac_ext
23896cat >>conftest.$ac_ext <<_ACEOF
23897/* end confdefs.h. */
23898
23899#include <string.h>
23900int main() {
23901 double x = 9006104071832581.0;
23902 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23903 return 0;
23904 else
23905 return 1;
23906}
23907
23908_ACEOF
23909rm -f conftest$ac_exeext
23910if { (ac_try="$ac_link"
23911case "(($ac_try" in
23912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23913 *) ac_try_echo=$ac_try;;
23914esac
23915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23916 (eval "$ac_link") 2>&5
23917 ac_status=$?
23918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23920 { (case "(($ac_try" in
23921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23922 *) ac_try_echo=$ac_try;;
23923esac
23924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23925 (eval "$ac_try") 2>&5
23926 ac_status=$?
23927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23928 (exit $ac_status); }; }; then
23929 ac_cv_big_endian_double=yes
23930else
23931 echo "$as_me: program exited with status $ac_status" >&5
23932echo "$as_me: failed program was:" >&5
23933sed 's/^/| /' conftest.$ac_ext >&5
23934
23935( exit $ac_status )
23936ac_cv_big_endian_double=no
23937fi
23938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23939fi
23940
23941
23942fi
23943
23944{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23945echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23946if test "$ac_cv_big_endian_double" = yes
23947then
23948
23949cat >>confdefs.h <<\_ACEOF
23950#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23951_ACEOF
23952
23953fi
23954
23955# Some ARM platforms use a mixed-endian representation for doubles.
23956# While Python doesn't currently have full support for these platforms
23957# (see e.g., issue 1762561), we can at least make sure that float <-> string
23958# conversions work.
23959{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23960echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23961if test "${ac_cv_mixed_endian_double+set}" = set; then
23962 echo $ECHO_N "(cached) $ECHO_C" >&6
23963else
23964
23965if test "$cross_compiling" = yes; then
23966 ac_cv_mixed_endian_double=no
23967else
23968 cat >conftest.$ac_ext <<_ACEOF
23969/* confdefs.h. */
23970_ACEOF
23971cat confdefs.h >>conftest.$ac_ext
23972cat >>conftest.$ac_ext <<_ACEOF
23973/* end confdefs.h. */
23974
23975#include <string.h>
23976int main() {
23977 double x = 9006104071832581.0;
23978 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23979 return 0;
23980 else
23981 return 1;
23982}
23983
23984_ACEOF
23985rm -f conftest$ac_exeext
23986if { (ac_try="$ac_link"
23987case "(($ac_try" in
23988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23989 *) ac_try_echo=$ac_try;;
23990esac
23991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23992 (eval "$ac_link") 2>&5
23993 ac_status=$?
23994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23996 { (case "(($ac_try" in
23997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23998 *) ac_try_echo=$ac_try;;
23999esac
24000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24001 (eval "$ac_try") 2>&5
24002 ac_status=$?
24003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24004 (exit $ac_status); }; }; then
24005 ac_cv_mixed_endian_double=yes
24006else
24007 echo "$as_me: program exited with status $ac_status" >&5
24008echo "$as_me: failed program was:" >&5
24009sed 's/^/| /' conftest.$ac_ext >&5
24010
24011( exit $ac_status )
24012ac_cv_mixed_endian_double=no
24013fi
24014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24015fi
24016
24017
24018fi
24019
24020{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24021echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24022if test "$ac_cv_mixed_endian_double" = yes
24023then
24024
24025cat >>confdefs.h <<\_ACEOF
24026#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24027_ACEOF
24028
24029fi
24030
24031# The short float repr introduced in Python 3.1 requires the
24032# correctly-rounded string <-> double conversion functions from
24033# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24034# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024035# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024036# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024037
24038# This inline assembler syntax may also work for suncc and icc,
24039# so we try it on all platforms.
24040
24041{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024042echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024043cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024044/* confdefs.h. */
24045_ACEOF
24046cat confdefs.h >>conftest.$ac_ext
24047cat >>conftest.$ac_ext <<_ACEOF
24048/* end confdefs.h. */
24049
24050int
24051main ()
24052{
24053
Mark Dickinsona548dee2009-11-15 13:12:43 +000024054 unsigned short cw;
24055 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24056 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024057
24058 ;
24059 return 0;
24060}
24061_ACEOF
24062rm -f conftest.$ac_objext
24063if { (ac_try="$ac_compile"
24064case "(($ac_try" in
24065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24066 *) ac_try_echo=$ac_try;;
24067esac
24068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24069 (eval "$ac_compile") 2>conftest.er1
24070 ac_status=$?
24071 grep -v '^ *+' conftest.er1 >conftest.err
24072 rm -f conftest.er1
24073 cat conftest.err >&5
24074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24075 (exit $ac_status); } && {
24076 test -z "$ac_c_werror_flag" ||
24077 test ! -s conftest.err
24078 } && test -s conftest.$ac_objext; then
24079 have_gcc_asm_for_x87=yes
24080else
24081 echo "$as_me: failed program was:" >&5
24082sed 's/^/| /' conftest.$ac_ext >&5
24083
24084 have_gcc_asm_for_x87=no
24085fi
24086
24087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024088{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024089echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024090if test "$have_gcc_asm_for_x87" = yes
24091then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024092
24093cat >>confdefs.h <<\_ACEOF
24094#define HAVE_GCC_ASM_FOR_X87 1
24095_ACEOF
24096
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024097fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024098
Mark Dickinson04b27232009-01-04 12:29:36 +000024099# Detect whether system arithmetic is subject to x87-style double
24100# rounding issues. The result of this test has little meaning on non
24101# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24102# mode is round-to-nearest and double rounding issues are present, and
24103# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024104{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24105echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024106# $BASECFLAGS may affect the result
24107ac_save_cc="$CC"
24108CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024109if test "$cross_compiling" = yes; then
24110 ac_cv_x87_double_rounding=no
24111else
24112 cat >conftest.$ac_ext <<_ACEOF
24113/* confdefs.h. */
24114_ACEOF
24115cat confdefs.h >>conftest.$ac_ext
24116cat >>conftest.$ac_ext <<_ACEOF
24117/* end confdefs.h. */
24118
24119#include <stdlib.h>
24120#include <math.h>
24121int main() {
24122 volatile double x, y, z;
24123 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24124 x = 0.99999999999999989; /* 1-2**-53 */
24125 y = 1./x;
24126 if (y != 1.)
24127 exit(0);
24128 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24129 x = 1e16;
24130 y = 2.99999;
24131 z = x + y;
24132 if (z != 1e16+4.)
24133 exit(0);
24134 /* both tests show evidence of double rounding */
24135 exit(1);
24136}
24137
24138_ACEOF
24139rm -f conftest$ac_exeext
24140if { (ac_try="$ac_link"
24141case "(($ac_try" in
24142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24143 *) ac_try_echo=$ac_try;;
24144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024146 (eval "$ac_link") 2>&5
24147 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024149 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24150 { (case "(($ac_try" in
24151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24152 *) ac_try_echo=$ac_try;;
24153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024155 (eval "$ac_try") 2>&5
24156 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024158 (exit $ac_status); }; }; then
24159 ac_cv_x87_double_rounding=no
24160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024161 echo "$as_me: program exited with status $ac_status" >&5
24162echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024163sed 's/^/| /' conftest.$ac_ext >&5
24164
24165( exit $ac_status )
24166ac_cv_x87_double_rounding=yes
24167fi
24168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24169fi
24170
24171
Mark Dickinson99abd142009-10-24 13:44:16 +000024172CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024173{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24174echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024175if test "$ac_cv_x87_double_rounding" = yes
24176then
24177
24178cat >>confdefs.h <<\_ACEOF
24179#define X87_DOUBLE_ROUNDING 1
24180_ACEOF
24181
24182fi
24183
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024184# ************************************
24185# * Check for mathematical functions *
24186# ************************************
24187
24188LIBS_SAVE=$LIBS
24189LIBS="$LIBS $LIBM"
24190
Mark Dickinson265d7382008-04-21 22:32:24 +000024191# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24192# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024193{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24194echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024195if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024196 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024197else
24198
24199if test "$cross_compiling" = yes; then
24200 ac_cv_tanh_preserves_zero_sign=no
24201else
24202 cat >conftest.$ac_ext <<_ACEOF
24203/* confdefs.h. */
24204_ACEOF
24205cat confdefs.h >>conftest.$ac_ext
24206cat >>conftest.$ac_ext <<_ACEOF
24207/* end confdefs.h. */
24208
24209#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024210#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024211int main() {
24212 /* return 0 if either negative zeros don't exist
24213 on this platform or if negative zeros exist
24214 and tanh(-0.) == -0. */
24215 if (atan2(0., -1.) == atan2(-0., -1.) ||
24216 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24217 else exit(1);
24218}
24219
24220_ACEOF
24221rm -f conftest$ac_exeext
24222if { (ac_try="$ac_link"
24223case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024228 (eval "$ac_link") 2>&5
24229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24232 { (case "(($ac_try" in
24233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24234 *) ac_try_echo=$ac_try;;
24235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024237 (eval "$ac_try") 2>&5
24238 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024240 (exit $ac_status); }; }; then
24241 ac_cv_tanh_preserves_zero_sign=yes
24242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243 echo "$as_me: program exited with status $ac_status" >&5
24244echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024245sed 's/^/| /' conftest.$ac_ext >&5
24246
24247( exit $ac_status )
24248ac_cv_tanh_preserves_zero_sign=no
24249fi
24250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24251fi
24252
24253
24254fi
24255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024256{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24257echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024258if test "$ac_cv_tanh_preserves_zero_sign" = yes
24259then
24260
24261cat >>confdefs.h <<\_ACEOF
24262#define TANH_PRESERVES_ZERO_SIGN 1
24263_ACEOF
24264
24265fi
24266
Martin v. Löwis11437992002-04-12 09:54:03 +000024267
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024268
Michael W. Hudson54241132001-12-07 15:38:26 +000024269
Christian Heimes0a8143f2007-12-18 23:22:54 +000024270
24271
24272
24273
24274
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024275
Mark Dickinson65898e02009-09-05 10:27:00 +000024276for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24277do
24278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24282 echo $ECHO_N "(cached) $ECHO_C" >&6
24283else
24284 cat >conftest.$ac_ext <<_ACEOF
24285/* confdefs.h. */
24286_ACEOF
24287cat confdefs.h >>conftest.$ac_ext
24288cat >>conftest.$ac_ext <<_ACEOF
24289/* end confdefs.h. */
24290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24292#define $ac_func innocuous_$ac_func
24293
24294/* System header to define __stub macros and hopefully few prototypes,
24295 which can conflict with char $ac_func (); below.
24296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24297 <limits.h> exists even on freestanding compilers. */
24298
24299#ifdef __STDC__
24300# include <limits.h>
24301#else
24302# include <assert.h>
24303#endif
24304
24305#undef $ac_func
24306
24307/* Override any GCC internal prototype to avoid an error.
24308 Use char because int might match the return type of a GCC
24309 builtin and then its argument prototype would still apply. */
24310#ifdef __cplusplus
24311extern "C"
24312#endif
24313char $ac_func ();
24314/* The GNU C library defines this for functions which it implements
24315 to always fail with ENOSYS. Some functions are actually named
24316 something starting with __ and the normal name is an alias. */
24317#if defined __stub_$ac_func || defined __stub___$ac_func
24318choke me
24319#endif
24320
24321int
24322main ()
24323{
24324return $ac_func ();
24325 ;
24326 return 0;
24327}
24328_ACEOF
24329rm -f conftest.$ac_objext conftest$ac_exeext
24330if { (ac_try="$ac_link"
24331case "(($ac_try" in
24332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24333 *) ac_try_echo=$ac_try;;
24334esac
24335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24336 (eval "$ac_link") 2>conftest.er1
24337 ac_status=$?
24338 grep -v '^ *+' conftest.er1 >conftest.err
24339 rm -f conftest.er1
24340 cat conftest.err >&5
24341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24342 (exit $ac_status); } && {
24343 test -z "$ac_c_werror_flag" ||
24344 test ! -s conftest.err
24345 } && test -s conftest$ac_exeext &&
24346 $as_test_x conftest$ac_exeext; then
24347 eval "$as_ac_var=yes"
24348else
24349 echo "$as_me: failed program was:" >&5
24350sed 's/^/| /' conftest.$ac_ext >&5
24351
24352 eval "$as_ac_var=no"
24353fi
24354
24355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24356 conftest$ac_exeext conftest.$ac_ext
24357fi
24358ac_res=`eval echo '${'$as_ac_var'}'`
24359 { echo "$as_me:$LINENO: result: $ac_res" >&5
24360echo "${ECHO_T}$ac_res" >&6; }
24361if test `eval echo '${'$as_ac_var'}'` = yes; then
24362 cat >>confdefs.h <<_ACEOF
24363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24364_ACEOF
24365
24366fi
24367done
24368
24369
24370
24371
24372
24373
24374for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024375do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24377{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024379if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024380 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024381else
24382 cat >conftest.$ac_ext <<_ACEOF
24383/* confdefs.h. */
24384_ACEOF
24385cat confdefs.h >>conftest.$ac_ext
24386cat >>conftest.$ac_ext <<_ACEOF
24387/* end confdefs.h. */
24388/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24389 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24390#define $ac_func innocuous_$ac_func
24391
24392/* System header to define __stub macros and hopefully few prototypes,
24393 which can conflict with char $ac_func (); below.
24394 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24395 <limits.h> exists even on freestanding compilers. */
24396
24397#ifdef __STDC__
24398# include <limits.h>
24399#else
24400# include <assert.h>
24401#endif
24402
24403#undef $ac_func
24404
24405/* Override any GCC internal prototype to avoid an error.
24406 Use char because int might match the return type of a GCC
24407 builtin and then its argument prototype would still apply. */
24408#ifdef __cplusplus
24409extern "C"
24410#endif
24411char $ac_func ();
24412/* The GNU C library defines this for functions which it implements
24413 to always fail with ENOSYS. Some functions are actually named
24414 something starting with __ and the normal name is an alias. */
24415#if defined __stub_$ac_func || defined __stub___$ac_func
24416choke me
24417#endif
24418
24419int
24420main ()
24421{
24422return $ac_func ();
24423 ;
24424 return 0;
24425}
24426_ACEOF
24427rm -f conftest.$ac_objext conftest$ac_exeext
24428if { (ac_try="$ac_link"
24429case "(($ac_try" in
24430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24431 *) ac_try_echo=$ac_try;;
24432esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024434 (eval "$ac_link") 2>conftest.er1
24435 ac_status=$?
24436 grep -v '^ *+' conftest.er1 >conftest.err
24437 rm -f conftest.er1
24438 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024440 (exit $ac_status); } && {
24441 test -z "$ac_c_werror_flag" ||
24442 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024443 } && test -s conftest$ac_exeext &&
24444 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024445 eval "$as_ac_var=yes"
24446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024447 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024448sed 's/^/| /' conftest.$ac_ext >&5
24449
24450 eval "$as_ac_var=no"
24451fi
24452
24453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24454 conftest$ac_exeext conftest.$ac_ext
24455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456ac_res=`eval echo '${'$as_ac_var'}'`
24457 { echo "$as_me:$LINENO: result: $ac_res" >&5
24458echo "${ECHO_T}$ac_res" >&6; }
24459if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024460 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024461#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024462_ACEOF
24463
24464fi
24465done
24466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024467{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24468echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024469if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024470 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024471else
24472 cat >conftest.$ac_ext <<_ACEOF
24473/* confdefs.h. */
24474_ACEOF
24475cat confdefs.h >>conftest.$ac_ext
24476cat >>conftest.$ac_ext <<_ACEOF
24477/* end confdefs.h. */
24478#include <math.h>
24479
24480int
24481main ()
24482{
24483#ifndef isinf
24484 (void) isinf;
24485#endif
24486
24487 ;
24488 return 0;
24489}
24490_ACEOF
24491rm -f conftest.$ac_objext
24492if { (ac_try="$ac_compile"
24493case "(($ac_try" in
24494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24495 *) ac_try_echo=$ac_try;;
24496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024498 (eval "$ac_compile") 2>conftest.er1
24499 ac_status=$?
24500 grep -v '^ *+' conftest.er1 >conftest.err
24501 rm -f conftest.er1
24502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024504 (exit $ac_status); } && {
24505 test -z "$ac_c_werror_flag" ||
24506 test ! -s conftest.err
24507 } && test -s conftest.$ac_objext; then
24508 ac_cv_have_decl_isinf=yes
24509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024510 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024511sed 's/^/| /' conftest.$ac_ext >&5
24512
24513 ac_cv_have_decl_isinf=no
24514fi
24515
24516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24517fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024518{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24519echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24520if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024521
24522cat >>confdefs.h <<_ACEOF
24523#define HAVE_DECL_ISINF 1
24524_ACEOF
24525
24526
24527else
24528 cat >>confdefs.h <<_ACEOF
24529#define HAVE_DECL_ISINF 0
24530_ACEOF
24531
24532
24533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024534{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24535echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024536if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024537 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024538else
24539 cat >conftest.$ac_ext <<_ACEOF
24540/* confdefs.h. */
24541_ACEOF
24542cat confdefs.h >>conftest.$ac_ext
24543cat >>conftest.$ac_ext <<_ACEOF
24544/* end confdefs.h. */
24545#include <math.h>
24546
24547int
24548main ()
24549{
24550#ifndef isnan
24551 (void) isnan;
24552#endif
24553
24554 ;
24555 return 0;
24556}
24557_ACEOF
24558rm -f conftest.$ac_objext
24559if { (ac_try="$ac_compile"
24560case "(($ac_try" in
24561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24562 *) ac_try_echo=$ac_try;;
24563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024565 (eval "$ac_compile") 2>conftest.er1
24566 ac_status=$?
24567 grep -v '^ *+' conftest.er1 >conftest.err
24568 rm -f conftest.er1
24569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024571 (exit $ac_status); } && {
24572 test -z "$ac_c_werror_flag" ||
24573 test ! -s conftest.err
24574 } && test -s conftest.$ac_objext; then
24575 ac_cv_have_decl_isnan=yes
24576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024577 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024578sed 's/^/| /' conftest.$ac_ext >&5
24579
24580 ac_cv_have_decl_isnan=no
24581fi
24582
24583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24584fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024585{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24586echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24587if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024588
24589cat >>confdefs.h <<_ACEOF
24590#define HAVE_DECL_ISNAN 1
24591_ACEOF
24592
24593
24594else
24595 cat >>confdefs.h <<_ACEOF
24596#define HAVE_DECL_ISNAN 0
24597_ACEOF
24598
24599
24600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024601{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24602echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024603if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024604 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024605else
24606 cat >conftest.$ac_ext <<_ACEOF
24607/* confdefs.h. */
24608_ACEOF
24609cat confdefs.h >>conftest.$ac_ext
24610cat >>conftest.$ac_ext <<_ACEOF
24611/* end confdefs.h. */
24612#include <math.h>
24613
24614int
24615main ()
24616{
24617#ifndef isfinite
24618 (void) isfinite;
24619#endif
24620
24621 ;
24622 return 0;
24623}
24624_ACEOF
24625rm -f conftest.$ac_objext
24626if { (ac_try="$ac_compile"
24627case "(($ac_try" in
24628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24629 *) ac_try_echo=$ac_try;;
24630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024632 (eval "$ac_compile") 2>conftest.er1
24633 ac_status=$?
24634 grep -v '^ *+' conftest.er1 >conftest.err
24635 rm -f conftest.er1
24636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024638 (exit $ac_status); } && {
24639 test -z "$ac_c_werror_flag" ||
24640 test ! -s conftest.err
24641 } && test -s conftest.$ac_objext; then
24642 ac_cv_have_decl_isfinite=yes
24643else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024644 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024645sed 's/^/| /' conftest.$ac_ext >&5
24646
24647 ac_cv_have_decl_isfinite=no
24648fi
24649
24650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24651fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024652{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24653echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24654if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024655
24656cat >>confdefs.h <<_ACEOF
24657#define HAVE_DECL_ISFINITE 1
24658_ACEOF
24659
24660
24661else
24662 cat >>confdefs.h <<_ACEOF
24663#define HAVE_DECL_ISFINITE 0
24664_ACEOF
24665
24666
24667fi
24668
24669
Christian Heimes0a8143f2007-12-18 23:22:54 +000024670
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024671LIBS=$LIBS_SAVE
24672
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024673# For multiprocessing module, check that sem_open
24674# actually works. For FreeBSD versions <= 7.2,
24675# the kernel module that provides POSIX semaphores
24676# isn't loaded by default, so an attempt to call
24677# sem_open results in a 'Signal 12' error.
24678{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24679echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24680if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24681 echo $ECHO_N "(cached) $ECHO_C" >&6
24682else
24683 if test "$cross_compiling" = yes; then
24684 ac_cv_posix_semaphores_enabled=yes
24685else
24686 cat >conftest.$ac_ext <<_ACEOF
24687/* confdefs.h. */
24688_ACEOF
24689cat confdefs.h >>conftest.$ac_ext
24690cat >>conftest.$ac_ext <<_ACEOF
24691/* end confdefs.h. */
24692
24693#include <unistd.h>
24694#include <fcntl.h>
24695#include <stdio.h>
24696#include <semaphore.h>
24697#include <sys/stat.h>
24698
24699int main(void) {
24700 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24701 if (a == SEM_FAILED) {
24702 perror("sem_open");
24703 return 1;
24704 }
24705 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024706 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024707 return 0;
24708}
24709
24710_ACEOF
24711rm -f conftest$ac_exeext
24712if { (ac_try="$ac_link"
24713case "(($ac_try" in
24714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24715 *) ac_try_echo=$ac_try;;
24716esac
24717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24718 (eval "$ac_link") 2>&5
24719 ac_status=$?
24720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24722 { (case "(($ac_try" in
24723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24724 *) ac_try_echo=$ac_try;;
24725esac
24726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24727 (eval "$ac_try") 2>&5
24728 ac_status=$?
24729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24730 (exit $ac_status); }; }; then
24731 ac_cv_posix_semaphores_enabled=yes
24732else
24733 echo "$as_me: program exited with status $ac_status" >&5
24734echo "$as_me: failed program was:" >&5
24735sed 's/^/| /' conftest.$ac_ext >&5
24736
24737( exit $ac_status )
24738ac_cv_posix_semaphores_enabled=no
24739fi
24740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24741fi
24742
24743
24744
24745fi
24746
24747{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24748echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24749if test $ac_cv_posix_semaphores_enabled = no
24750then
24751
24752cat >>confdefs.h <<\_ACEOF
24753#define POSIX_SEMAPHORES_NOT_ENABLED 1
24754_ACEOF
24755
24756fi
24757
24758# Multiprocessing check for broken sem_getvalue
24759{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24760echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24761if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24762 echo $ECHO_N "(cached) $ECHO_C" >&6
24763else
24764 if test "$cross_compiling" = yes; then
24765 ac_cv_broken_sem_getvalue=yes
24766else
24767 cat >conftest.$ac_ext <<_ACEOF
24768/* confdefs.h. */
24769_ACEOF
24770cat confdefs.h >>conftest.$ac_ext
24771cat >>conftest.$ac_ext <<_ACEOF
24772/* end confdefs.h. */
24773
24774#include <unistd.h>
24775#include <fcntl.h>
24776#include <stdio.h>
24777#include <semaphore.h>
24778#include <sys/stat.h>
24779
24780int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024781 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024782 int count;
24783 int res;
24784 if(a==SEM_FAILED){
24785 perror("sem_open");
24786 return 1;
24787
24788 }
24789 res = sem_getvalue(a, &count);
24790 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024791 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024792 return res==-1 ? 1 : 0;
24793}
24794
24795_ACEOF
24796rm -f conftest$ac_exeext
24797if { (ac_try="$ac_link"
24798case "(($ac_try" in
24799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24800 *) ac_try_echo=$ac_try;;
24801esac
24802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24803 (eval "$ac_link") 2>&5
24804 ac_status=$?
24805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24807 { (case "(($ac_try" in
24808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24809 *) ac_try_echo=$ac_try;;
24810esac
24811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24812 (eval "$ac_try") 2>&5
24813 ac_status=$?
24814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24815 (exit $ac_status); }; }; then
24816 ac_cv_broken_sem_getvalue=no
24817else
24818 echo "$as_me: program exited with status $ac_status" >&5
24819echo "$as_me: failed program was:" >&5
24820sed 's/^/| /' conftest.$ac_ext >&5
24821
24822( exit $ac_status )
24823ac_cv_broken_sem_getvalue=yes
24824fi
24825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24826fi
24827
24828
24829
24830fi
24831
24832{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24833echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24834if test $ac_cv_broken_sem_getvalue = yes
24835then
24836
24837cat >>confdefs.h <<\_ACEOF
24838#define HAVE_BROKEN_SEM_GETVALUE 1
24839_ACEOF
24840
24841fi
24842
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024843# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024844{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24845echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024846# Check whether --enable-big-digits was given.
24847if test "${enable_big_digits+set}" = set; then
24848 enableval=$enable_big_digits; case $enable_big_digits in
24849yes)
24850 enable_big_digits=30 ;;
24851no)
24852 enable_big_digits=15 ;;
2485315|30)
24854 ;;
24855*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024856 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24857echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024858 { (exit 1); exit 1; }; } ;;
24859esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024860{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24861echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024862
24863cat >>confdefs.h <<_ACEOF
24864#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24865_ACEOF
24866
24867
24868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024869 { echo "$as_me:$LINENO: result: no value specified" >&5
24870echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024871fi
24872
24873
Guido van Rossumef2255b2000-03-10 22:30:29 +000024874# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024875if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024876 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24877echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024878if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024879 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024880fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024881{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24882echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024883else
Martin v. Löwis11437992002-04-12 09:54:03 +000024884 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024885{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24886echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024888/* confdefs.h. */
24889_ACEOF
24890cat confdefs.h >>conftest.$ac_ext
24891cat >>conftest.$ac_ext <<_ACEOF
24892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024893$ac_includes_default
24894#include <wchar.h>
24895_ACEOF
24896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024897if { (ac_try="$ac_compile"
24898case "(($ac_try" in
24899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24900 *) ac_try_echo=$ac_try;;
24901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024905 grep -v '^ *+' conftest.er1 >conftest.err
24906 rm -f conftest.er1
24907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024909 (exit $ac_status); } && {
24910 test -z "$ac_c_werror_flag" ||
24911 test ! -s conftest.err
24912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 ac_header_compiler=yes
24914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024916sed 's/^/| /' conftest.$ac_ext >&5
24917
Martin v. Löwiseba40652007-08-30 20:10:57 +000024918 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920
24921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024922{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24923echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024924
24925# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024926{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24927echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024929/* confdefs.h. */
24930_ACEOF
24931cat confdefs.h >>conftest.$ac_ext
24932cat >>conftest.$ac_ext <<_ACEOF
24933/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024934#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024935_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024936if { (ac_try="$ac_cpp conftest.$ac_ext"
24937case "(($ac_try" in
24938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24939 *) ac_try_echo=$ac_try;;
24940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024942 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024944 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024945 rm -f conftest.er1
24946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024948 (exit $ac_status); } >/dev/null && {
24949 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24950 test ! -s conftest.err
24951 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024952 ac_header_preproc=yes
24953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024955sed 's/^/| /' conftest.$ac_ext >&5
24956
Martin v. Löwis11437992002-04-12 09:54:03 +000024957 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024959
Martin v. Löwis11437992002-04-12 09:54:03 +000024960rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024961{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24962echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024963
24964# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024965case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24966 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024967 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24968echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24969 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24970echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024971 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024972 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024973 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024974 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24975echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24976 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24977echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24978 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24979echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24980 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24981echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24982 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24983echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24984 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24985echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024987## -------------------------------------- ##
24988## Report this to http://bugs.python.org/ ##
24989## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024990_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024992 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024994{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24995echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024996if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024997 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024998else
24999 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000025000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025001{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
25002echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025003
25004fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025005if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025006
25007
25008cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000025009#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025010_ACEOF
25011
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025012 wchar_h="yes"
25013
Guido van Rossumef2255b2000-03-10 22:30:29 +000025014else
Martin v. Löwis11437992002-04-12 09:54:03 +000025015 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025016
25017fi
25018
Michael W. Hudson54241132001-12-07 15:38:26 +000025019
Martin v. Löwis11437992002-04-12 09:54:03 +000025020
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025021# determine wchar_t size
25022if test "$wchar_h" = yes
25023then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025024 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25025echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25026if test "${ac_cv_type_wchar_t+set}" = set; then
25027 echo $ECHO_N "(cached) $ECHO_C" >&6
25028else
25029 cat >conftest.$ac_ext <<_ACEOF
25030/* confdefs.h. */
25031_ACEOF
25032cat confdefs.h >>conftest.$ac_ext
25033cat >>conftest.$ac_ext <<_ACEOF
25034/* end confdefs.h. */
25035#include <wchar.h>
25036
25037typedef wchar_t ac__type_new_;
25038int
25039main ()
25040{
25041if ((ac__type_new_ *) 0)
25042 return 0;
25043if (sizeof (ac__type_new_))
25044 return 0;
25045 ;
25046 return 0;
25047}
25048_ACEOF
25049rm -f conftest.$ac_objext
25050if { (ac_try="$ac_compile"
25051case "(($ac_try" in
25052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25053 *) ac_try_echo=$ac_try;;
25054esac
25055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25056 (eval "$ac_compile") 2>conftest.er1
25057 ac_status=$?
25058 grep -v '^ *+' conftest.er1 >conftest.err
25059 rm -f conftest.er1
25060 cat conftest.err >&5
25061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25062 (exit $ac_status); } && {
25063 test -z "$ac_c_werror_flag" ||
25064 test ! -s conftest.err
25065 } && test -s conftest.$ac_objext; then
25066 ac_cv_type_wchar_t=yes
25067else
25068 echo "$as_me: failed program was:" >&5
25069sed 's/^/| /' conftest.$ac_ext >&5
25070
25071 ac_cv_type_wchar_t=no
25072fi
25073
25074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25075fi
25076{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25077echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25078
25079# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25082# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025083{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25084echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025085if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025086 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025087else
Martin v. Löwis11437992002-04-12 09:54:03 +000025088 if test "$cross_compiling" = yes; then
25089 # Depending upon the size, compute the lo and hi bounds.
25090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025091/* confdefs.h. */
25092_ACEOF
25093cat confdefs.h >>conftest.$ac_ext
25094cat >>conftest.$ac_ext <<_ACEOF
25095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025096#include <wchar.h>
25097
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025098 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025099int
25100main ()
25101{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025102static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025103test_array [0] = 0
25104
25105 ;
25106 return 0;
25107}
25108_ACEOF
25109rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110if { (ac_try="$ac_compile"
25111case "(($ac_try" in
25112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25113 *) ac_try_echo=$ac_try;;
25114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025118 grep -v '^ *+' conftest.er1 >conftest.err
25119 rm -f conftest.er1
25120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122 (exit $ac_status); } && {
25123 test -z "$ac_c_werror_flag" ||
25124 test ! -s conftest.err
25125 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025126 ac_lo=0 ac_mid=0
25127 while :; do
25128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025129/* confdefs.h. */
25130_ACEOF
25131cat confdefs.h >>conftest.$ac_ext
25132cat >>conftest.$ac_ext <<_ACEOF
25133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025134#include <wchar.h>
25135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025136 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025137int
25138main ()
25139{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025141test_array [0] = 0
25142
25143 ;
25144 return 0;
25145}
25146_ACEOF
25147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025148if { (ac_try="$ac_compile"
25149case "(($ac_try" in
25150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25151 *) ac_try_echo=$ac_try;;
25152esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025156 grep -v '^ *+' conftest.er1 >conftest.err
25157 rm -f conftest.er1
25158 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025160 (exit $ac_status); } && {
25161 test -z "$ac_c_werror_flag" ||
25162 test ! -s conftest.err
25163 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025164 ac_hi=$ac_mid; break
25165else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169 ac_lo=`expr $ac_mid + 1`
25170 if test $ac_lo -le $ac_mid; then
25171 ac_lo= ac_hi=
25172 break
25173 fi
25174 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025176
25177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025178 done
25179else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025181sed 's/^/| /' conftest.$ac_ext >&5
25182
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025184/* confdefs.h. */
25185_ACEOF
25186cat confdefs.h >>conftest.$ac_ext
25187cat >>conftest.$ac_ext <<_ACEOF
25188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025189#include <wchar.h>
25190
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025191 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025192int
25193main ()
25194{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025196test_array [0] = 0
25197
25198 ;
25199 return 0;
25200}
25201_ACEOF
25202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025203if { (ac_try="$ac_compile"
25204case "(($ac_try" in
25205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25206 *) ac_try_echo=$ac_try;;
25207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025211 grep -v '^ *+' conftest.er1 >conftest.err
25212 rm -f conftest.er1
25213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215 (exit $ac_status); } && {
25216 test -z "$ac_c_werror_flag" ||
25217 test ! -s conftest.err
25218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025219 ac_hi=-1 ac_mid=-1
25220 while :; do
25221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025222/* confdefs.h. */
25223_ACEOF
25224cat confdefs.h >>conftest.$ac_ext
25225cat >>conftest.$ac_ext <<_ACEOF
25226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025227#include <wchar.h>
25228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025229 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025230int
25231main ()
25232{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025234test_array [0] = 0
25235
25236 ;
25237 return 0;
25238}
25239_ACEOF
25240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025241if { (ac_try="$ac_compile"
25242case "(($ac_try" in
25243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25244 *) ac_try_echo=$ac_try;;
25245esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025249 grep -v '^ *+' conftest.er1 >conftest.err
25250 rm -f conftest.er1
25251 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253 (exit $ac_status); } && {
25254 test -z "$ac_c_werror_flag" ||
25255 test ! -s conftest.err
25256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025257 ac_lo=$ac_mid; break
25258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025260sed 's/^/| /' conftest.$ac_ext >&5
25261
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262 ac_hi=`expr '(' $ac_mid ')' - 1`
25263 if test $ac_mid -le $ac_hi; then
25264 ac_lo= ac_hi=
25265 break
25266 fi
25267 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025268fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025269
25270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025271 done
25272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025274sed 's/^/| /' conftest.$ac_ext >&5
25275
Martin v. Löwiseba40652007-08-30 20:10:57 +000025276 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025278
25279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025281
25282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025283# Binary search between lo and hi bounds.
25284while test "x$ac_lo" != "x$ac_hi"; do
25285 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025287/* confdefs.h. */
25288_ACEOF
25289cat confdefs.h >>conftest.$ac_ext
25290cat >>conftest.$ac_ext <<_ACEOF
25291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025292#include <wchar.h>
25293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025294 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025295int
25296main ()
25297{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025299test_array [0] = 0
25300
25301 ;
25302 return 0;
25303}
25304_ACEOF
25305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306if { (ac_try="$ac_compile"
25307case "(($ac_try" in
25308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25309 *) ac_try_echo=$ac_try;;
25310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025314 grep -v '^ *+' conftest.er1 >conftest.err
25315 rm -f conftest.er1
25316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318 (exit $ac_status); } && {
25319 test -z "$ac_c_werror_flag" ||
25320 test ! -s conftest.err
25321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 ac_hi=$ac_mid
25323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025325sed 's/^/| /' conftest.$ac_ext >&5
25326
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025329
25330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025331done
25332case $ac_lo in
25333?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025335 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025336See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025337echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025338See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025340 else
25341 ac_cv_sizeof_wchar_t=0
25342 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025343esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025344else
Martin v. Löwis11437992002-04-12 09:54:03 +000025345 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025346/* confdefs.h. */
25347_ACEOF
25348cat confdefs.h >>conftest.$ac_ext
25349cat >>conftest.$ac_ext <<_ACEOF
25350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025351#include <wchar.h>
25352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025353 typedef wchar_t ac__type_sizeof_;
25354static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25355static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025356#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025357#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025358int
25359main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025360{
Martin v. Löwis11437992002-04-12 09:54:03 +000025361
25362 FILE *f = fopen ("conftest.val", "w");
25363 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025364 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025365 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025367 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025369 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025370 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025371 }
25372 else
25373 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025374 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025375 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025376 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025377 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025378 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025380
25381 ;
25382 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025383}
Martin v. Löwis11437992002-04-12 09:54:03 +000025384_ACEOF
25385rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025386if { (ac_try="$ac_link"
25387case "(($ac_try" in
25388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25389 *) ac_try_echo=$ac_try;;
25390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025392 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025393 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025396 { (case "(($ac_try" in
25397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25398 *) ac_try_echo=$ac_try;;
25399esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025401 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025402 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025404 (exit $ac_status); }; }; then
25405 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025407 echo "$as_me: program exited with status $ac_status" >&5
25408echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025409sed 's/^/| /' conftest.$ac_ext >&5
25410
Martin v. Löwis11437992002-04-12 09:54:03 +000025411( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025412if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025413 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025414See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025415echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025416See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025417 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025418 else
25419 ac_cv_sizeof_wchar_t=0
25420 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025422rm -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 +000025423fi
25424rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025426{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25427echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025428
25429
25430
Martin v. Löwis11437992002-04-12 09:54:03 +000025431cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025432#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025433_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025434
Michael W. Hudson54241132001-12-07 15:38:26 +000025435
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025436fi
25437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025438{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25439echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025440have_ucs4_tcl=no
25441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025442/* confdefs.h. */
25443_ACEOF
25444cat confdefs.h >>conftest.$ac_ext
25445cat >>conftest.$ac_ext <<_ACEOF
25446/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025447
25448#include <tcl.h>
25449#if TCL_UTF_MAX != 6
25450# error "NOT UCS4_TCL"
25451#endif
25452int
25453main ()
25454{
25455
25456 ;
25457 return 0;
25458}
25459_ACEOF
25460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025461if { (ac_try="$ac_compile"
25462case "(($ac_try" in
25463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25464 *) ac_try_echo=$ac_try;;
25465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025469 grep -v '^ *+' conftest.er1 >conftest.err
25470 rm -f conftest.er1
25471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473 (exit $ac_status); } && {
25474 test -z "$ac_c_werror_flag" ||
25475 test ! -s conftest.err
25476 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025477
25478
25479cat >>confdefs.h <<\_ACEOF
25480#define HAVE_UCS4_TCL 1
25481_ACEOF
25482
25483 have_ucs4_tcl=yes
25484
25485else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025487sed 's/^/| /' conftest.$ac_ext >&5
25488
Martin v. Löwiseba40652007-08-30 20:10:57 +000025489
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025490fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025491
25492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025493{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25494echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025495
Skip Montanaro6dead952003-09-25 14:50:04 +000025496# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025497if test "$wchar_h" = yes
25498then
25499 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025500 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25501echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025502 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025503 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025504else
25505
25506 if test "$cross_compiling" = yes; then
25507 ac_cv_wchar_t_signed=yes
25508else
25509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025510/* confdefs.h. */
25511_ACEOF
25512cat confdefs.h >>conftest.$ac_ext
25513cat >>conftest.$ac_ext <<_ACEOF
25514/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025515
25516 #include <wchar.h>
25517 int main()
25518 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025519 /* Success: exit code 0 */
25520 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025521 }
25522
25523_ACEOF
25524rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025525if { (ac_try="$ac_link"
25526case "(($ac_try" in
25527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25528 *) ac_try_echo=$ac_try;;
25529esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025531 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025532 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025535 { (case "(($ac_try" in
25536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25537 *) ac_try_echo=$ac_try;;
25538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025540 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025541 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025543 (exit $ac_status); }; }; then
25544 ac_cv_wchar_t_signed=yes
25545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546 echo "$as_me: program exited with status $ac_status" >&5
25547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025548sed 's/^/| /' conftest.$ac_ext >&5
25549
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025550( exit $ac_status )
25551ac_cv_wchar_t_signed=no
25552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553rm -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 +000025554fi
25555
Martin v. Löwiseba40652007-08-30 20:10:57 +000025556
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025557fi
25558
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025559 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25560echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025561fi
25562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025563{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25564echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025565# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025566if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025567 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025568else
25569 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025570fi
25571
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025572
25573if test $enable_unicode = yes
25574then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025575 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025576 case "$have_ucs4_tcl" in
25577 yes) enable_unicode="ucs4"
25578 ;;
25579 *) enable_unicode="ucs2"
25580 ;;
25581 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025582fi
25583
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025584
25585
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025586case "$enable_unicode" in
25587ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025588 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025589#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025590_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025591
25592 ;;
25593ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025594 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025595#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025596_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025597
25598 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025599*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25600echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25601 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025602esac
25603
Michael W. Hudson54241132001-12-07 15:38:26 +000025604
Martin v. Löwis11437992002-04-12 09:54:03 +000025605
25606
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025607
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025608if test "$enable_unicode" = "no"
25609then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025610 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025611 { echo "$as_me:$LINENO: result: not used" >&5
25612echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025613else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025614 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025615
25616cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025617#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025618_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025619
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025620
25621 # wchar_t is only usable if it maps to an unsigned type
25622 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025623 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025624 then
25625 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025626
Martin v. Löwis11437992002-04-12 09:54:03 +000025627cat >>confdefs.h <<\_ACEOF
25628#define HAVE_USABLE_WCHAR_T 1
25629_ACEOF
25630
25631 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025632#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025633_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025634
25635 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25636 then
25637 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025639#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025640_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025641
25642 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25643 then
25644 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025645 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025646#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025647_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025648
25649 else
25650 PY_UNICODE_TYPE="no type found"
25651 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025652 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25653echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025654fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025655
25656# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025657{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25658echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025659if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025662 # See if sys/param.h defines the BYTE_ORDER macro.
25663cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025664/* confdefs.h. */
25665_ACEOF
25666cat confdefs.h >>conftest.$ac_ext
25667cat >>conftest.$ac_ext <<_ACEOF
25668/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025669#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025670#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025671
Martin v. Löwis11437992002-04-12 09:54:03 +000025672int
25673main ()
25674{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025675#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25676 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25677 bogus endian macros
25678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025679
25680 ;
25681 return 0;
25682}
25683_ACEOF
25684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025685if { (ac_try="$ac_compile"
25686case "(($ac_try" in
25687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25688 *) ac_try_echo=$ac_try;;
25689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025693 grep -v '^ *+' conftest.er1 >conftest.err
25694 rm -f conftest.er1
25695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025697 (exit $ac_status); } && {
25698 test -z "$ac_c_werror_flag" ||
25699 test ! -s conftest.err
25700 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025701 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025703/* confdefs.h. */
25704_ACEOF
25705cat confdefs.h >>conftest.$ac_ext
25706cat >>conftest.$ac_ext <<_ACEOF
25707/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025708#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025710
Martin v. Löwis11437992002-04-12 09:54:03 +000025711int
25712main ()
25713{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025714#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715 not big endian
25716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025717
25718 ;
25719 return 0;
25720}
25721_ACEOF
25722rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025723if { (ac_try="$ac_compile"
25724case "(($ac_try" in
25725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25726 *) ac_try_echo=$ac_try;;
25727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025731 grep -v '^ *+' conftest.er1 >conftest.err
25732 rm -f conftest.er1
25733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025735 (exit $ac_status); } && {
25736 test -z "$ac_c_werror_flag" ||
25737 test ! -s conftest.err
25738 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025739 ac_cv_c_bigendian=yes
25740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025742sed 's/^/| /' conftest.$ac_ext >&5
25743
Martin v. Löwiseba40652007-08-30 20:10:57 +000025744 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746
25747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025750sed 's/^/| /' conftest.$ac_ext >&5
25751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025752 # It does not; compile a test program.
25753if test "$cross_compiling" = yes; then
25754 # try to guess the endianness by grepping values into an object file
25755 ac_cv_c_bigendian=unknown
25756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025757/* confdefs.h. */
25758_ACEOF
25759cat confdefs.h >>conftest.$ac_ext
25760cat >>conftest.$ac_ext <<_ACEOF
25761/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025762short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25763short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25764void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25765short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25766short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25767void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025768int
25769main ()
25770{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025771 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025772 ;
25773 return 0;
25774}
25775_ACEOF
25776rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025777if { (ac_try="$ac_compile"
25778case "(($ac_try" in
25779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25780 *) ac_try_echo=$ac_try;;
25781esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025783 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025785 grep -v '^ *+' conftest.er1 >conftest.err
25786 rm -f conftest.er1
25787 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025789 (exit $ac_status); } && {
25790 test -z "$ac_c_werror_flag" ||
25791 test ! -s conftest.err
25792 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025793 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025794 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025796if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25797 if test "$ac_cv_c_bigendian" = unknown; then
25798 ac_cv_c_bigendian=no
25799 else
25800 # finding both strings is unlikely to happen, but who knows?
25801 ac_cv_c_bigendian=unknown
25802 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025803fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025806sed 's/^/| /' conftest.$ac_ext >&5
25807
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808
Martin v. Löwis11437992002-04-12 09:54:03 +000025809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025810
25811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025812else
25813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025814/* confdefs.h. */
25815_ACEOF
25816cat confdefs.h >>conftest.$ac_ext
25817cat >>conftest.$ac_ext <<_ACEOF
25818/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025820int
25821main ()
25822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025823
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025824 /* Are we little or big endian? From Harbison&Steele. */
25825 union
25826 {
25827 long int l;
25828 char c[sizeof (long int)];
25829 } u;
25830 u.l = 1;
25831 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025832
25833 ;
25834 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025835}
Martin v. Löwis11437992002-04-12 09:54:03 +000025836_ACEOF
25837rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025838if { (ac_try="$ac_link"
25839case "(($ac_try" in
25840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25841 *) ac_try_echo=$ac_try;;
25842esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025844 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025845 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025848 { (case "(($ac_try" in
25849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25850 *) ac_try_echo=$ac_try;;
25851esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025853 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025854 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025856 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025857 ac_cv_c_bigendian=no
25858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025859 echo "$as_me: program exited with status $ac_status" >&5
25860echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025861sed 's/^/| /' conftest.$ac_ext >&5
25862
Martin v. Löwis11437992002-04-12 09:54:03 +000025863( exit $ac_status )
25864ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025866rm -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 +000025867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025868
25869
Martin v. Löwis11437992002-04-12 09:54:03 +000025870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025871
25872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25873fi
25874{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25875echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25876case $ac_cv_c_bigendian in
25877 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025878
25879cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025880#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025881_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025882 ;;
25883 no)
25884 ;;
25885 *)
25886 { { echo "$as_me:$LINENO: error: unknown endianness
25887presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25888echo "$as_me: error: unknown endianness
25889presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025890 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025891esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025892
Michael W. Hudson54241132001-12-07 15:38:26 +000025893
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025894# Check whether right shifting a negative integer extends the sign bit
25895# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025896{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25897echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025898if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025899 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025900else
Martin v. Löwis11437992002-04-12 09:54:03 +000025901
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025902if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025903 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025904else
Martin v. Löwis11437992002-04-12 09:54:03 +000025905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025906/* confdefs.h. */
25907_ACEOF
25908cat confdefs.h >>conftest.$ac_ext
25909cat >>conftest.$ac_ext <<_ACEOF
25910/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025911
25912int main()
25913{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025914 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025915}
25916
Martin v. Löwis11437992002-04-12 09:54:03 +000025917_ACEOF
25918rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025919if { (ac_try="$ac_link"
25920case "(($ac_try" in
25921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25922 *) ac_try_echo=$ac_try;;
25923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025925 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025926 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025929 { (case "(($ac_try" in
25930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25931 *) ac_try_echo=$ac_try;;
25932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025934 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025935 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025937 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025938 ac_cv_rshift_extends_sign=yes
25939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025940 echo "$as_me: program exited with status $ac_status" >&5
25941echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025942sed 's/^/| /' conftest.$ac_ext >&5
25943
Martin v. Löwis11437992002-04-12 09:54:03 +000025944( exit $ac_status )
25945ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025947rm -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 +000025948fi
25949
Martin v. Löwiseba40652007-08-30 20:10:57 +000025950
25951fi
25952
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025953{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25954echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025955if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025956then
Martin v. Löwis11437992002-04-12 09:54:03 +000025957
25958cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025959#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025960_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025961
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025962fi
25963
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025964# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025965{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25966echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025967if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025968 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025969else
Martin v. Löwis11437992002-04-12 09:54:03 +000025970
25971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025972/* confdefs.h. */
25973_ACEOF
25974cat confdefs.h >>conftest.$ac_ext
25975cat >>conftest.$ac_ext <<_ACEOF
25976/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025977#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025978int
25979main ()
25980{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025981
25982 FILE *f = fopen("/dev/null", "r");
25983 flockfile(f);
25984 getc_unlocked(f);
25985 funlockfile(f);
25986
Martin v. Löwis11437992002-04-12 09:54:03 +000025987 ;
25988 return 0;
25989}
25990_ACEOF
25991rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025992if { (ac_try="$ac_link"
25993case "(($ac_try" in
25994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25995 *) ac_try_echo=$ac_try;;
25996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025998 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026000 grep -v '^ *+' conftest.er1 >conftest.err
26001 rm -f conftest.er1
26002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026004 (exit $ac_status); } && {
26005 test -z "$ac_c_werror_flag" ||
26006 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026007 } && test -s conftest$ac_exeext &&
26008 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026009 ac_cv_have_getc_unlocked=yes
26010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026012sed 's/^/| /' conftest.$ac_ext >&5
26013
Martin v. Löwiseba40652007-08-30 20:10:57 +000026014 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026016
26017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026018 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026019fi
26020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026021{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26022echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026023if test "$ac_cv_have_getc_unlocked" = yes
26024then
Martin v. Löwis11437992002-04-12 09:54:03 +000026025
26026cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026027#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026028_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026029
26030fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026031
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026032# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026033# save the value of LIBS so we don't actually link Python with readline
26034LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026035
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026036# On some systems we need to link readline to a termcap compatible
26037# library. NOTE: Keep the precedence of listed libraries synchronised
26038# with setup.py.
26039py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026040{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26041echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026042for py_libtermcap in "" ncursesw ncurses curses termcap; do
26043 if test -z "$py_libtermcap"; then
26044 READLINE_LIBS="-lreadline"
26045 else
26046 READLINE_LIBS="-lreadline -l$py_libtermcap"
26047 fi
26048 LIBS="$READLINE_LIBS $LIBS_no_readline"
26049 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026050/* confdefs.h. */
26051_ACEOF
26052cat confdefs.h >>conftest.$ac_ext
26053cat >>conftest.$ac_ext <<_ACEOF
26054/* end confdefs.h. */
26055
Martin v. Löwiseba40652007-08-30 20:10:57 +000026056/* Override any GCC internal prototype to avoid an error.
26057 Use char because int might match the return type of a GCC
26058 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026059#ifdef __cplusplus
26060extern "C"
26061#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026062char readline ();
26063int
26064main ()
26065{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026066return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026067 ;
26068 return 0;
26069}
26070_ACEOF
26071rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026072if { (ac_try="$ac_link"
26073case "(($ac_try" in
26074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26075 *) ac_try_echo=$ac_try;;
26076esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026078 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026079 ac_status=$?
26080 grep -v '^ *+' conftest.er1 >conftest.err
26081 rm -f conftest.er1
26082 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026084 (exit $ac_status); } && {
26085 test -z "$ac_c_werror_flag" ||
26086 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026087 } && test -s conftest$ac_exeext &&
26088 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026089 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026091 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026092sed 's/^/| /' conftest.$ac_ext >&5
26093
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026094
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026096
26097rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026098 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026099 if test $py_cv_lib_readline = yes; then
26100 break
26101 fi
26102done
26103# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26104#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026105if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026106 { echo "$as_me:$LINENO: result: none" >&5
26107echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026108else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026109 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26110echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026111
26112cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026113#define HAVE_LIBREADLINE 1
26114_ACEOF
26115
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026116fi
26117
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026118# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026119{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26120echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026121if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026122 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026123else
26124 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026125LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026126cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026127/* confdefs.h. */
26128_ACEOF
26129cat confdefs.h >>conftest.$ac_ext
26130cat >>conftest.$ac_ext <<_ACEOF
26131/* end confdefs.h. */
26132
Martin v. Löwiseba40652007-08-30 20:10:57 +000026133/* Override any GCC internal prototype to avoid an error.
26134 Use char because int might match the return type of a GCC
26135 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026136#ifdef __cplusplus
26137extern "C"
26138#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026139char rl_callback_handler_install ();
26140int
26141main ()
26142{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026143return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026144 ;
26145 return 0;
26146}
26147_ACEOF
26148rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026149if { (ac_try="$ac_link"
26150case "(($ac_try" in
26151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26152 *) ac_try_echo=$ac_try;;
26153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026155 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026157 grep -v '^ *+' conftest.er1 >conftest.err
26158 rm -f conftest.er1
26159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026161 (exit $ac_status); } && {
26162 test -z "$ac_c_werror_flag" ||
26163 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026164 } && test -s conftest$ac_exeext &&
26165 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026166 ac_cv_lib_readline_rl_callback_handler_install=yes
26167else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026168 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026169sed 's/^/| /' conftest.$ac_ext >&5
26170
Martin v. Löwiseba40652007-08-30 20:10:57 +000026171 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026173
26174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026175 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026176LIBS=$ac_check_lib_save_LIBS
26177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026178{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26179echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26180if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026181
26182cat >>confdefs.h <<\_ACEOF
26183#define HAVE_RL_CALLBACK 1
26184_ACEOF
26185
26186fi
26187
26188
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026189# check for readline 2.2
26190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026191/* confdefs.h. */
26192_ACEOF
26193cat confdefs.h >>conftest.$ac_ext
26194cat >>conftest.$ac_ext <<_ACEOF
26195/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026196#include <readline/readline.h>
26197_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026198if { (ac_try="$ac_cpp conftest.$ac_ext"
26199case "(($ac_try" in
26200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26201 *) ac_try_echo=$ac_try;;
26202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026204 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026205 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026206 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026207 rm -f conftest.er1
26208 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026210 (exit $ac_status); } >/dev/null && {
26211 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26212 test ! -s conftest.err
26213 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026214 have_readline=yes
26215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026217sed 's/^/| /' conftest.$ac_ext >&5
26218
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026219 have_readline=no
26220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026221
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026222rm -f conftest.err conftest.$ac_ext
26223if test $have_readline = yes
26224then
26225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026226/* confdefs.h. */
26227_ACEOF
26228cat confdefs.h >>conftest.$ac_ext
26229cat >>conftest.$ac_ext <<_ACEOF
26230/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026231#include <readline/readline.h>
26232
26233_ACEOF
26234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026235 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026236
26237cat >>confdefs.h <<\_ACEOF
26238#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26239_ACEOF
26240
26241fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000026242rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026243
26244 cat >conftest.$ac_ext <<_ACEOF
26245/* confdefs.h. */
26246_ACEOF
26247cat confdefs.h >>conftest.$ac_ext
26248cat >>conftest.$ac_ext <<_ACEOF
26249/* end confdefs.h. */
26250#include <readline/readline.h>
26251
26252_ACEOF
26253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26254 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26255
26256cat >>confdefs.h <<\_ACEOF
26257#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26258_ACEOF
26259
26260fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000026261rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026262
26263fi
26264
Martin v. Löwis0daad592001-09-30 21:09:59 +000026265# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026266{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26267echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026268if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026270else
Martin v. Löwis11437992002-04-12 09:54:03 +000026271 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026272LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026274/* confdefs.h. */
26275_ACEOF
26276cat confdefs.h >>conftest.$ac_ext
26277cat >>conftest.$ac_ext <<_ACEOF
26278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026279
Martin v. Löwiseba40652007-08-30 20:10:57 +000026280/* Override any GCC internal prototype to avoid an error.
26281 Use char because int might match the return type of a GCC
26282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026283#ifdef __cplusplus
26284extern "C"
26285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026286char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026287int
26288main ()
26289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026290return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026291 ;
26292 return 0;
26293}
26294_ACEOF
26295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026296if { (ac_try="$ac_link"
26297case "(($ac_try" in
26298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26299 *) ac_try_echo=$ac_try;;
26300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026304 grep -v '^ *+' conftest.er1 >conftest.err
26305 rm -f conftest.er1
26306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026308 (exit $ac_status); } && {
26309 test -z "$ac_c_werror_flag" ||
26310 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026311 } && test -s conftest$ac_exeext &&
26312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026313 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026316sed 's/^/| /' conftest.$ac_ext >&5
26317
Martin v. Löwiseba40652007-08-30 20:10:57 +000026318 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026320
26321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026323LIBS=$ac_check_lib_save_LIBS
26324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026325{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26326echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26327if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026328
Martin v. Löwis11437992002-04-12 09:54:03 +000026329cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026330#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026331_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026332
Martin v. Löwis0daad592001-09-30 21:09:59 +000026333fi
26334
Michael W. Hudson54241132001-12-07 15:38:26 +000026335
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026336# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026337{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26338echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026339if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026341else
26342 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026343LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026344cat >conftest.$ac_ext <<_ACEOF
26345/* confdefs.h. */
26346_ACEOF
26347cat confdefs.h >>conftest.$ac_ext
26348cat >>conftest.$ac_ext <<_ACEOF
26349/* end confdefs.h. */
26350
26351/* Override any GCC internal prototype to avoid an error.
26352 Use char because int might match the return type of a GCC
26353 builtin and then its argument prototype would still apply. */
26354#ifdef __cplusplus
26355extern "C"
26356#endif
26357char rl_completion_display_matches_hook ();
26358int
26359main ()
26360{
26361return rl_completion_display_matches_hook ();
26362 ;
26363 return 0;
26364}
26365_ACEOF
26366rm -f conftest.$ac_objext conftest$ac_exeext
26367if { (ac_try="$ac_link"
26368case "(($ac_try" in
26369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26370 *) ac_try_echo=$ac_try;;
26371esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026373 (eval "$ac_link") 2>conftest.er1
26374 ac_status=$?
26375 grep -v '^ *+' conftest.er1 >conftest.err
26376 rm -f conftest.er1
26377 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026379 (exit $ac_status); } && {
26380 test -z "$ac_c_werror_flag" ||
26381 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026382 } && test -s conftest$ac_exeext &&
26383 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026384 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026386 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026387sed 's/^/| /' conftest.$ac_ext >&5
26388
26389 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26390fi
26391
26392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26393 conftest$ac_exeext conftest.$ac_ext
26394LIBS=$ac_check_lib_save_LIBS
26395fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026396{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26397echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26398if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026399
26400cat >>confdefs.h <<\_ACEOF
26401#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26402_ACEOF
26403
26404fi
26405
26406
Martin v. Löwis0daad592001-09-30 21:09:59 +000026407# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026408{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26409echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026410if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026411 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026412else
Martin v. Löwis11437992002-04-12 09:54:03 +000026413 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026414LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026416/* confdefs.h. */
26417_ACEOF
26418cat confdefs.h >>conftest.$ac_ext
26419cat >>conftest.$ac_ext <<_ACEOF
26420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026421
Martin v. Löwiseba40652007-08-30 20:10:57 +000026422/* Override any GCC internal prototype to avoid an error.
26423 Use char because int might match the return type of a GCC
26424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026425#ifdef __cplusplus
26426extern "C"
26427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026428char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026429int
26430main ()
26431{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026432return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026433 ;
26434 return 0;
26435}
26436_ACEOF
26437rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026438if { (ac_try="$ac_link"
26439case "(($ac_try" in
26440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26441 *) ac_try_echo=$ac_try;;
26442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026444 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026446 grep -v '^ *+' conftest.er1 >conftest.err
26447 rm -f conftest.er1
26448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026450 (exit $ac_status); } && {
26451 test -z "$ac_c_werror_flag" ||
26452 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026453 } && test -s conftest$ac_exeext &&
26454 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026455 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026458sed 's/^/| /' conftest.$ac_ext >&5
26459
Martin v. Löwiseba40652007-08-30 20:10:57 +000026460 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026462
26463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026465LIBS=$ac_check_lib_save_LIBS
26466fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026467{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26468echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26469if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026470
Martin v. Löwis11437992002-04-12 09:54:03 +000026471cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026472#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026473_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026474
Guido van Rossum353ae582001-07-10 16:45:32 +000026475fi
26476
Jack Jansendd19cf82001-12-06 22:36:17 +000026477
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026478# also in readline 4.2
26479cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026480/* confdefs.h. */
26481_ACEOF
26482cat confdefs.h >>conftest.$ac_ext
26483cat >>conftest.$ac_ext <<_ACEOF
26484/* end confdefs.h. */
26485#include <readline/readline.h>
26486_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026487if { (ac_try="$ac_cpp conftest.$ac_ext"
26488case "(($ac_try" in
26489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26490 *) ac_try_echo=$ac_try;;
26491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026494 ac_status=$?
26495 grep -v '^ *+' conftest.er1 >conftest.err
26496 rm -f conftest.er1
26497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026499 (exit $ac_status); } >/dev/null && {
26500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26501 test ! -s conftest.err
26502 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026503 have_readline=yes
26504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026505 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026506sed 's/^/| /' conftest.$ac_ext >&5
26507
26508 have_readline=no
26509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026510
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026511rm -f conftest.err conftest.$ac_ext
26512if test $have_readline = yes
26513then
26514 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026515/* confdefs.h. */
26516_ACEOF
26517cat confdefs.h >>conftest.$ac_ext
26518cat >>conftest.$ac_ext <<_ACEOF
26519/* end confdefs.h. */
26520#include <readline/readline.h>
26521
26522_ACEOF
26523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26524 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26525
26526cat >>confdefs.h <<\_ACEOF
26527#define HAVE_RL_CATCH_SIGNAL 1
26528_ACEOF
26529
26530fi
Matthias Klose5183ebd2010-04-24 16:38:36 +000026531rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026532
26533fi
26534
Martin v. Löwis82bca632006-02-10 20:49:30 +000026535# End of readline checks: restore LIBS
26536LIBS=$LIBS_no_readline
26537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026538{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26539echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026540if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026541 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026542else
Martin v. Löwis11437992002-04-12 09:54:03 +000026543
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026544if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026545 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026546else
Martin v. Löwis11437992002-04-12 09:54:03 +000026547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026548/* confdefs.h. */
26549_ACEOF
26550cat confdefs.h >>conftest.$ac_ext
26551cat >>conftest.$ac_ext <<_ACEOF
26552/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026553
26554int main()
26555{
26556 int val1 = nice(1);
26557 if (val1 != -1 && val1 == nice(2))
26558 exit(0);
26559 exit(1);
26560}
26561
Martin v. Löwis11437992002-04-12 09:54:03 +000026562_ACEOF
26563rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026564if { (ac_try="$ac_link"
26565case "(($ac_try" in
26566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26567 *) ac_try_echo=$ac_try;;
26568esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026570 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026571 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026574 { (case "(($ac_try" in
26575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26576 *) ac_try_echo=$ac_try;;
26577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026579 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026580 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026582 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026583 ac_cv_broken_nice=yes
26584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026585 echo "$as_me: program exited with status $ac_status" >&5
26586echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026587sed 's/^/| /' conftest.$ac_ext >&5
26588
Martin v. Löwis11437992002-04-12 09:54:03 +000026589( exit $ac_status )
26590ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026592rm -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 +000026593fi
26594
Martin v. Löwiseba40652007-08-30 20:10:57 +000026595
26596fi
26597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026598{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26599echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026600if test "$ac_cv_broken_nice" = yes
26601then
Martin v. Löwis11437992002-04-12 09:54:03 +000026602
26603cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026604#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026605_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026606
26607fi
26608
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026609{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26610echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026611if test "${ac_cv_broken_poll+set}" = set; then
26612 echo $ECHO_N "(cached) $ECHO_C" >&6
26613else
26614 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026615 ac_cv_broken_poll=no
26616else
26617 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026618/* confdefs.h. */
26619_ACEOF
26620cat confdefs.h >>conftest.$ac_ext
26621cat >>conftest.$ac_ext <<_ACEOF
26622/* end confdefs.h. */
26623
26624#include <poll.h>
26625
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026626int main()
26627{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026628 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026629 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026630
26631 close (42);
26632
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026633 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026634 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026635 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026636 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026637 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026638 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026639 return 1;
26640}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026641
26642_ACEOF
26643rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026644if { (ac_try="$ac_link"
26645case "(($ac_try" in
26646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26647 *) ac_try_echo=$ac_try;;
26648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026650 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026651 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026654 { (case "(($ac_try" in
26655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26656 *) ac_try_echo=$ac_try;;
26657esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026659 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026660 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026662 (exit $ac_status); }; }; then
26663 ac_cv_broken_poll=yes
26664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026665 echo "$as_me: program exited with status $ac_status" >&5
26666echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026667sed 's/^/| /' conftest.$ac_ext >&5
26668
26669( exit $ac_status )
26670ac_cv_broken_poll=no
26671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026672rm -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 +000026673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674
26675
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026676fi
26677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026678{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26679echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026680if test "$ac_cv_broken_poll" = yes
26681then
26682
26683cat >>confdefs.h <<\_ACEOF
26684#define HAVE_BROKEN_POLL 1
26685_ACEOF
26686
26687fi
26688
Brett Cannon43802422005-02-10 20:48:03 +000026689# 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 +000026690# (which is not required by ISO C or UNIX spec) and/or if we support
26691# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026692{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26693echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026694if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026695 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026696else
26697 cat >conftest.$ac_ext <<_ACEOF
26698/* confdefs.h. */
26699_ACEOF
26700cat confdefs.h >>conftest.$ac_ext
26701cat >>conftest.$ac_ext <<_ACEOF
26702/* end confdefs.h. */
26703#include <sys/types.h>
26704#include <$ac_cv_struct_tm>
26705
26706
26707int
26708main ()
26709{
26710static struct tm ac_aggr;
26711if (ac_aggr.tm_zone)
26712return 0;
26713 ;
26714 return 0;
26715}
26716_ACEOF
26717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026718if { (ac_try="$ac_compile"
26719case "(($ac_try" in
26720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26721 *) ac_try_echo=$ac_try;;
26722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026724 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026725 ac_status=$?
26726 grep -v '^ *+' conftest.er1 >conftest.err
26727 rm -f conftest.er1
26728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026730 (exit $ac_status); } && {
26731 test -z "$ac_c_werror_flag" ||
26732 test ! -s conftest.err
26733 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026734 ac_cv_member_struct_tm_tm_zone=yes
26735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026736 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026737sed 's/^/| /' conftest.$ac_ext >&5
26738
Martin v. Löwiseba40652007-08-30 20:10:57 +000026739 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026740/* confdefs.h. */
26741_ACEOF
26742cat confdefs.h >>conftest.$ac_ext
26743cat >>conftest.$ac_ext <<_ACEOF
26744/* end confdefs.h. */
26745#include <sys/types.h>
26746#include <$ac_cv_struct_tm>
26747
26748
26749int
26750main ()
26751{
26752static struct tm ac_aggr;
26753if (sizeof ac_aggr.tm_zone)
26754return 0;
26755 ;
26756 return 0;
26757}
26758_ACEOF
26759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026760if { (ac_try="$ac_compile"
26761case "(($ac_try" in
26762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26763 *) ac_try_echo=$ac_try;;
26764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026766 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026767 ac_status=$?
26768 grep -v '^ *+' conftest.er1 >conftest.err
26769 rm -f conftest.er1
26770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026772 (exit $ac_status); } && {
26773 test -z "$ac_c_werror_flag" ||
26774 test ! -s conftest.err
26775 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026776 ac_cv_member_struct_tm_tm_zone=yes
26777else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026778 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026779sed 's/^/| /' conftest.$ac_ext >&5
26780
Martin v. Löwiseba40652007-08-30 20:10:57 +000026781 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026783
26784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026786
26787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026788fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026789{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26790echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26791if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026792
26793cat >>confdefs.h <<_ACEOF
26794#define HAVE_STRUCT_TM_TM_ZONE 1
26795_ACEOF
26796
26797
26798fi
26799
26800if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26801
26802cat >>confdefs.h <<\_ACEOF
26803#define HAVE_TM_ZONE 1
26804_ACEOF
26805
26806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026807 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26808echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026809if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026810 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026811else
26812 cat >conftest.$ac_ext <<_ACEOF
26813/* confdefs.h. */
26814_ACEOF
26815cat confdefs.h >>conftest.$ac_ext
26816cat >>conftest.$ac_ext <<_ACEOF
26817/* end confdefs.h. */
26818#include <time.h>
26819
26820int
26821main ()
26822{
26823#ifndef tzname
26824 (void) tzname;
26825#endif
26826
26827 ;
26828 return 0;
26829}
26830_ACEOF
26831rm -f conftest.$ac_objext
26832if { (ac_try="$ac_compile"
26833case "(($ac_try" in
26834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26835 *) ac_try_echo=$ac_try;;
26836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026838 (eval "$ac_compile") 2>conftest.er1
26839 ac_status=$?
26840 grep -v '^ *+' conftest.er1 >conftest.err
26841 rm -f conftest.er1
26842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026844 (exit $ac_status); } && {
26845 test -z "$ac_c_werror_flag" ||
26846 test ! -s conftest.err
26847 } && test -s conftest.$ac_objext; then
26848 ac_cv_have_decl_tzname=yes
26849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026850 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026851sed 's/^/| /' conftest.$ac_ext >&5
26852
26853 ac_cv_have_decl_tzname=no
26854fi
26855
26856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026858{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26859echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26860if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026861
26862cat >>confdefs.h <<_ACEOF
26863#define HAVE_DECL_TZNAME 1
26864_ACEOF
26865
26866
26867else
26868 cat >>confdefs.h <<_ACEOF
26869#define HAVE_DECL_TZNAME 0
26870_ACEOF
26871
26872
26873fi
26874
26875
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026876 { echo "$as_me:$LINENO: checking for tzname" >&5
26877echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026878if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026879 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026880else
26881 cat >conftest.$ac_ext <<_ACEOF
26882/* confdefs.h. */
26883_ACEOF
26884cat confdefs.h >>conftest.$ac_ext
26885cat >>conftest.$ac_ext <<_ACEOF
26886/* end confdefs.h. */
26887#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888#if !HAVE_DECL_TZNAME
26889extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026890#endif
26891
26892int
26893main ()
26894{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026895return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026896 ;
26897 return 0;
26898}
26899_ACEOF
26900rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026901if { (ac_try="$ac_link"
26902case "(($ac_try" in
26903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26904 *) ac_try_echo=$ac_try;;
26905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026907 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026908 ac_status=$?
26909 grep -v '^ *+' conftest.er1 >conftest.err
26910 rm -f conftest.er1
26911 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026913 (exit $ac_status); } && {
26914 test -z "$ac_c_werror_flag" ||
26915 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026916 } && test -s conftest$ac_exeext &&
26917 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026918 ac_cv_var_tzname=yes
26919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026920 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026921sed 's/^/| /' conftest.$ac_ext >&5
26922
Martin v. Löwiseba40652007-08-30 20:10:57 +000026923 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026925
26926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026927 conftest$ac_exeext conftest.$ac_ext
26928fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026929{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26930echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026931 if test $ac_cv_var_tzname = yes; then
26932
26933cat >>confdefs.h <<\_ACEOF
26934#define HAVE_TZNAME 1
26935_ACEOF
26936
26937 fi
26938fi
26939
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026940
Martin v. Löwis1d459062005-03-14 21:23:33 +000026941# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026942{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26943echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026944if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026946else
26947
26948if test "$cross_compiling" = yes; then
26949 ac_cv_working_tzset=no
26950else
26951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026952/* confdefs.h. */
26953_ACEOF
26954cat confdefs.h >>conftest.$ac_ext
26955cat >>conftest.$ac_ext <<_ACEOF
26956/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026957
26958#include <stdlib.h>
26959#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026960#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026961
26962#if HAVE_TZNAME
26963extern char *tzname[];
26964#endif
26965
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026966int main()
26967{
Brett Cannon18367812003-09-19 00:59:16 +000026968 /* Note that we need to ensure that not only does tzset(3)
26969 do 'something' with localtime, but it works as documented
26970 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026971 This includes making sure that tzname is set properly if
26972 tm->tm_zone does not exist since it is the alternative way
26973 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026974
26975 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026976 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026977 */
26978
Martin v. Löwis1d459062005-03-14 21:23:33 +000026979 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026980 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26981
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026982 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026983 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026984 if (localtime(&groundhogday)->tm_hour != 0)
26985 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026986#if HAVE_TZNAME
26987 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26988 if (strcmp(tzname[0], "UTC") ||
26989 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26990 exit(1);
26991#endif
Brett Cannon18367812003-09-19 00:59:16 +000026992
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026993 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026994 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026995 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026996 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026997#if HAVE_TZNAME
26998 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26999 exit(1);
27000#endif
Brett Cannon18367812003-09-19 00:59:16 +000027001
27002 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
27003 tzset();
27004 if (localtime(&groundhogday)->tm_hour != 11)
27005 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027006#if HAVE_TZNAME
27007 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
27008 exit(1);
27009#endif
27010
27011#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027012 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27013 exit(1);
27014 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27015 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027016#endif
Brett Cannon18367812003-09-19 00:59:16 +000027017
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027018 exit(0);
27019}
27020
27021_ACEOF
27022rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027023if { (ac_try="$ac_link"
27024case "(($ac_try" in
27025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27026 *) ac_try_echo=$ac_try;;
27027esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027029 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027030 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027032 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027033 { (case "(($ac_try" in
27034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27035 *) ac_try_echo=$ac_try;;
27036esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027038 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027039 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027041 (exit $ac_status); }; }; then
27042 ac_cv_working_tzset=yes
27043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027044 echo "$as_me: program exited with status $ac_status" >&5
27045echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027046sed 's/^/| /' conftest.$ac_ext >&5
27047
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027048( exit $ac_status )
27049ac_cv_working_tzset=no
27050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027051rm -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 +000027052fi
27053
Martin v. Löwiseba40652007-08-30 20:10:57 +000027054
27055fi
27056
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027057{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27058echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027059if test "$ac_cv_working_tzset" = yes
27060then
27061
27062cat >>confdefs.h <<\_ACEOF
27063#define HAVE_WORKING_TZSET 1
27064_ACEOF
27065
27066fi
27067
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027068# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027069{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27070echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027071if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027073else
27074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027075/* confdefs.h. */
27076_ACEOF
27077cat confdefs.h >>conftest.$ac_ext
27078cat >>conftest.$ac_ext <<_ACEOF
27079/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027080#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027081int
27082main ()
27083{
27084
27085struct stat st;
27086st.st_mtim.tv_nsec = 1;
27087
27088 ;
27089 return 0;
27090}
27091_ACEOF
27092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027093if { (ac_try="$ac_compile"
27094case "(($ac_try" in
27095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27096 *) ac_try_echo=$ac_try;;
27097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027101 grep -v '^ *+' conftest.er1 >conftest.err
27102 rm -f conftest.er1
27103 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027105 (exit $ac_status); } && {
27106 test -z "$ac_c_werror_flag" ||
27107 test ! -s conftest.err
27108 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027109 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027110else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027112sed 's/^/| /' conftest.$ac_ext >&5
27113
Martin v. Löwiseba40652007-08-30 20:10:57 +000027114 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027115fi
27116
Martin v. Löwiseba40652007-08-30 20:10:57 +000027117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27118fi
27119
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027120{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27121echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027122if test "$ac_cv_stat_tv_nsec" = yes
27123then
27124
27125cat >>confdefs.h <<\_ACEOF
27126#define HAVE_STAT_TV_NSEC 1
27127_ACEOF
27128
27129fi
27130
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027131# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27133echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027134if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027135 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027136else
27137 cat >conftest.$ac_ext <<_ACEOF
27138/* confdefs.h. */
27139_ACEOF
27140cat confdefs.h >>conftest.$ac_ext
27141cat >>conftest.$ac_ext <<_ACEOF
27142/* end confdefs.h. */
27143#include <sys/stat.h>
27144int
27145main ()
27146{
27147
27148struct stat st;
27149st.st_mtimespec.tv_nsec = 1;
27150
27151 ;
27152 return 0;
27153}
27154_ACEOF
27155rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027156if { (ac_try="$ac_compile"
27157case "(($ac_try" in
27158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27159 *) ac_try_echo=$ac_try;;
27160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027163 ac_status=$?
27164 grep -v '^ *+' conftest.er1 >conftest.err
27165 rm -f conftest.er1
27166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027168 (exit $ac_status); } && {
27169 test -z "$ac_c_werror_flag" ||
27170 test ! -s conftest.err
27171 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027172 ac_cv_stat_tv_nsec2=yes
27173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027174 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027175sed 's/^/| /' conftest.$ac_ext >&5
27176
Martin v. Löwiseba40652007-08-30 20:10:57 +000027177 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027178fi
27179
Martin v. Löwiseba40652007-08-30 20:10:57 +000027180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27181fi
27182
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027183{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27184echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027185if test "$ac_cv_stat_tv_nsec2" = yes
27186then
27187
27188cat >>confdefs.h <<\_ACEOF
27189#define HAVE_STAT_TV_NSEC2 1
27190_ACEOF
27191
27192fi
27193
Jack Jansen666b1e72001-10-31 12:11:48 +000027194# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027195{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27196echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027197if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027198 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027199else
Martin v. Löwis11437992002-04-12 09:54:03 +000027200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027201/* confdefs.h. */
27202_ACEOF
27203cat confdefs.h >>conftest.$ac_ext
27204cat >>conftest.$ac_ext <<_ACEOF
27205/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027206#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027207int
27208main ()
27209{
Jack Jansen666b1e72001-10-31 12:11:48 +000027210
27211 int rtn;
27212 rtn = mvwdelch(0,0,0);
27213
Martin v. Löwis11437992002-04-12 09:54:03 +000027214 ;
27215 return 0;
27216}
27217_ACEOF
27218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027219if { (ac_try="$ac_compile"
27220case "(($ac_try" in
27221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27222 *) ac_try_echo=$ac_try;;
27223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027227 grep -v '^ *+' conftest.er1 >conftest.err
27228 rm -f conftest.er1
27229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027231 (exit $ac_status); } && {
27232 test -z "$ac_c_werror_flag" ||
27233 test ! -s conftest.err
27234 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027235 ac_cv_mvwdelch_is_expression=yes
27236else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027238sed 's/^/| /' conftest.$ac_ext >&5
27239
Martin v. Löwiseba40652007-08-30 20:10:57 +000027240 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027241fi
27242
Martin v. Löwiseba40652007-08-30 20:10:57 +000027243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27244fi
27245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027246{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27247echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027248
27249if test "$ac_cv_mvwdelch_is_expression" = yes
27250then
Martin v. Löwis11437992002-04-12 09:54:03 +000027251
27252cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027253#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027254_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027255
27256fi
27257
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027258{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27259echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027260if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027261 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027262else
Martin v. Löwis11437992002-04-12 09:54:03 +000027263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027264/* confdefs.h. */
27265_ACEOF
27266cat confdefs.h >>conftest.$ac_ext
27267cat >>conftest.$ac_ext <<_ACEOF
27268/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027269#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027270int
27271main ()
27272{
Jack Jansen666b1e72001-10-31 12:11:48 +000027273
27274 WINDOW *w;
27275 w->_flags = 0;
27276
Martin v. Löwis11437992002-04-12 09:54:03 +000027277 ;
27278 return 0;
27279}
27280_ACEOF
27281rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027282if { (ac_try="$ac_compile"
27283case "(($ac_try" in
27284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27285 *) ac_try_echo=$ac_try;;
27286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027290 grep -v '^ *+' conftest.er1 >conftest.err
27291 rm -f conftest.er1
27292 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027294 (exit $ac_status); } && {
27295 test -z "$ac_c_werror_flag" ||
27296 test ! -s conftest.err
27297 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027298 ac_cv_window_has_flags=yes
27299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027301sed 's/^/| /' conftest.$ac_ext >&5
27302
Martin v. Löwiseba40652007-08-30 20:10:57 +000027303 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027304fi
27305
Martin v. Löwiseba40652007-08-30 20:10:57 +000027306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27307fi
27308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027309{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27310echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027311
Jack Jansen666b1e72001-10-31 12:11:48 +000027312
27313if test "$ac_cv_window_has_flags" = yes
27314then
Martin v. Löwis11437992002-04-12 09:54:03 +000027315
27316cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027317#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027318_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027319
27320fi
27321
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027322{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27323echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027324cat >conftest.$ac_ext <<_ACEOF
27325/* confdefs.h. */
27326_ACEOF
27327cat confdefs.h >>conftest.$ac_ext
27328cat >>conftest.$ac_ext <<_ACEOF
27329/* end confdefs.h. */
27330#include <curses.h>
27331int
27332main ()
27333{
27334void *x=is_term_resized
27335 ;
27336 return 0;
27337}
27338_ACEOF
27339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027340if { (ac_try="$ac_compile"
27341case "(($ac_try" in
27342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27343 *) ac_try_echo=$ac_try;;
27344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027346 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027347 ac_status=$?
27348 grep -v '^ *+' conftest.er1 >conftest.err
27349 rm -f conftest.er1
27350 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027352 (exit $ac_status); } && {
27353 test -z "$ac_c_werror_flag" ||
27354 test ! -s conftest.err
27355 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027356
27357cat >>confdefs.h <<\_ACEOF
27358#define HAVE_CURSES_IS_TERM_RESIZED 1
27359_ACEOF
27360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027361 { echo "$as_me:$LINENO: result: yes" >&5
27362echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027363else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027364 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027365sed 's/^/| /' conftest.$ac_ext >&5
27366
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027367 { echo "$as_me:$LINENO: result: no" >&5
27368echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027369
27370fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027371
Martin v. Löwiseba40652007-08-30 20:10:57 +000027372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27373
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027374{ echo "$as_me:$LINENO: checking for resize_term" >&5
27375echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027376cat >conftest.$ac_ext <<_ACEOF
27377/* confdefs.h. */
27378_ACEOF
27379cat confdefs.h >>conftest.$ac_ext
27380cat >>conftest.$ac_ext <<_ACEOF
27381/* end confdefs.h. */
27382#include <curses.h>
27383int
27384main ()
27385{
27386void *x=resize_term
27387 ;
27388 return 0;
27389}
27390_ACEOF
27391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027392if { (ac_try="$ac_compile"
27393case "(($ac_try" in
27394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27395 *) ac_try_echo=$ac_try;;
27396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027398 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027399 ac_status=$?
27400 grep -v '^ *+' conftest.er1 >conftest.err
27401 rm -f conftest.er1
27402 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027404 (exit $ac_status); } && {
27405 test -z "$ac_c_werror_flag" ||
27406 test ! -s conftest.err
27407 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027408
27409cat >>confdefs.h <<\_ACEOF
27410#define HAVE_CURSES_RESIZE_TERM 1
27411_ACEOF
27412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027413 { echo "$as_me:$LINENO: result: yes" >&5
27414echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027416 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027417sed 's/^/| /' conftest.$ac_ext >&5
27418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027419 { echo "$as_me:$LINENO: result: no" >&5
27420echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027421
27422fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027423
Martin v. Löwiseba40652007-08-30 20:10:57 +000027424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27425
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027426{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27427echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027428cat >conftest.$ac_ext <<_ACEOF
27429/* confdefs.h. */
27430_ACEOF
27431cat confdefs.h >>conftest.$ac_ext
27432cat >>conftest.$ac_ext <<_ACEOF
27433/* end confdefs.h. */
27434#include <curses.h>
27435int
27436main ()
27437{
27438void *x=resizeterm
27439 ;
27440 return 0;
27441}
27442_ACEOF
27443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027444if { (ac_try="$ac_compile"
27445case "(($ac_try" in
27446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27447 *) ac_try_echo=$ac_try;;
27448esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027450 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027451 ac_status=$?
27452 grep -v '^ *+' conftest.er1 >conftest.err
27453 rm -f conftest.er1
27454 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027456 (exit $ac_status); } && {
27457 test -z "$ac_c_werror_flag" ||
27458 test ! -s conftest.err
27459 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027460
27461cat >>confdefs.h <<\_ACEOF
27462#define HAVE_CURSES_RESIZETERM 1
27463_ACEOF
27464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027465 { echo "$as_me:$LINENO: result: yes" >&5
27466echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027468 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027469sed 's/^/| /' conftest.$ac_ext >&5
27470
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027471 { echo "$as_me:$LINENO: result: no" >&5
27472echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027473
27474fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027475
Martin v. Löwiseba40652007-08-30 20:10:57 +000027476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27479echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027480
27481if test -r /dev/ptmx
27482then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027483 { echo "$as_me:$LINENO: result: yes" >&5
27484echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027485
27486cat >>confdefs.h <<\_ACEOF
27487#define HAVE_DEV_PTMX 1
27488_ACEOF
27489
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027491 { echo "$as_me:$LINENO: result: no" >&5
27492echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027493fi
27494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027495{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27496echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027497
27498if test -r /dev/ptc
27499then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027500 { echo "$as_me:$LINENO: result: yes" >&5
27501echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027502
27503cat >>confdefs.h <<\_ACEOF
27504#define HAVE_DEV_PTC 1
27505_ACEOF
27506
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027508 { echo "$as_me:$LINENO: result: no" >&5
27509echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027510fi
27511
Mark Dickinson82864d12009-11-15 16:18:58 +000027512if test "$have_long_long" = yes
27513then
27514 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27515echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27516 if test "${ac_cv_have_long_long_format+set}" = set; then
27517 echo $ECHO_N "(cached) $ECHO_C" >&6
27518else
27519 if test "$cross_compiling" = yes; then
27520 ac_cv_have_long_long_format=no
27521else
27522 cat >conftest.$ac_ext <<_ACEOF
27523/* confdefs.h. */
27524_ACEOF
27525cat confdefs.h >>conftest.$ac_ext
27526cat >>conftest.$ac_ext <<_ACEOF
27527/* end confdefs.h. */
27528
27529 #include <stdio.h>
27530 #include <stddef.h>
27531 #include <string.h>
27532
27533 #ifdef HAVE_SYS_TYPES_H
27534 #include <sys/types.h>
27535 #endif
27536
27537 int main()
27538 {
27539 char buffer[256];
27540
27541 if (sprintf(buffer, "%lld", (long long)123) < 0)
27542 return 1;
27543 if (strcmp(buffer, "123"))
27544 return 1;
27545
27546 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27547 return 1;
27548 if (strcmp(buffer, "-123"))
27549 return 1;
27550
27551 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27552 return 1;
27553 if (strcmp(buffer, "123"))
27554 return 1;
27555
27556 return 0;
27557 }
27558
27559_ACEOF
27560rm -f conftest$ac_exeext
27561if { (ac_try="$ac_link"
27562case "(($ac_try" in
27563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27564 *) ac_try_echo=$ac_try;;
27565esac
27566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27567 (eval "$ac_link") 2>&5
27568 ac_status=$?
27569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27571 { (case "(($ac_try" in
27572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27573 *) ac_try_echo=$ac_try;;
27574esac
27575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27576 (eval "$ac_try") 2>&5
27577 ac_status=$?
27578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27579 (exit $ac_status); }; }; then
27580 ac_cv_have_long_long_format=yes
27581else
27582 echo "$as_me: program exited with status $ac_status" >&5
27583echo "$as_me: failed program was:" >&5
27584sed 's/^/| /' conftest.$ac_ext >&5
27585
27586( exit $ac_status )
27587ac_cv_have_long_long_format=no
27588fi
27589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27590fi
27591
27592
27593
27594fi
27595
27596 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27597echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27598fi
27599
Mark Dickinson5ce84742009-12-31 20:48:04 +000027600if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027601then
27602
27603cat >>confdefs.h <<\_ACEOF
27604#define PY_FORMAT_LONG_LONG "ll"
27605_ACEOF
27606
27607fi
27608
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027609if test $ac_sys_system = Darwin
27610then
27611 LIBS="$LIBS -framework CoreFoundation"
27612fi
27613
Mark Dickinson82864d12009-11-15 16:18:58 +000027614
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027615{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27616echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027617if test "${ac_cv_have_size_t_format+set}" = set; then
27618 echo $ECHO_N "(cached) $ECHO_C" >&6
27619else
27620 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027621 ac_cv_have_size_t_format="cross -- assuming yes"
27622
Brett Cannon09d12362006-05-11 05:11:33 +000027623else
27624 cat >conftest.$ac_ext <<_ACEOF
27625/* confdefs.h. */
27626_ACEOF
27627cat confdefs.h >>conftest.$ac_ext
27628cat >>conftest.$ac_ext <<_ACEOF
27629/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027630
Brett Cannon09d12362006-05-11 05:11:33 +000027631#include <stdio.h>
27632#include <stddef.h>
27633#include <string.h>
27634
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027635#ifdef HAVE_SYS_TYPES_H
27636#include <sys/types.h>
27637#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027638
27639#ifdef HAVE_SSIZE_T
27640typedef ssize_t Py_ssize_t;
27641#elif SIZEOF_VOID_P == SIZEOF_LONG
27642typedef long Py_ssize_t;
27643#else
27644typedef int Py_ssize_t;
27645#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027646
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027647int main()
27648{
27649 char buffer[256];
27650
Brett Cannon09d12362006-05-11 05:11:33 +000027651 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27652 return 1;
27653
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027654 if (strcmp(buffer, "123"))
27655 return 1;
27656
27657 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27658 return 1;
27659
27660 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027661 return 1;
27662
27663 return 0;
27664}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027665
Brett Cannon09d12362006-05-11 05:11:33 +000027666_ACEOF
27667rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027668if { (ac_try="$ac_link"
27669case "(($ac_try" in
27670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27671 *) ac_try_echo=$ac_try;;
27672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027674 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027675 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027678 { (case "(($ac_try" in
27679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27680 *) ac_try_echo=$ac_try;;
27681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027683 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027684 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027686 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027687 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027688else
27689 echo "$as_me: program exited with status $ac_status" >&5
27690echo "$as_me: failed program was:" >&5
27691sed 's/^/| /' conftest.$ac_ext >&5
27692
27693( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027694ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027695fi
27696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000027697fi
27698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027699
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027700fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027701{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27702echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027703if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027704
27705cat >>confdefs.h <<\_ACEOF
27706#define PY_FORMAT_SIZE_T "z"
27707_ACEOF
27708
27709fi
27710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027711{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27712echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027713if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027714 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027715else
Martin v. Löwis11437992002-04-12 09:54:03 +000027716 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027717/* confdefs.h. */
27718_ACEOF
27719cat confdefs.h >>conftest.$ac_ext
27720cat >>conftest.$ac_ext <<_ACEOF
27721/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027722
27723#ifdef HAVE_SYS_TYPES_H
27724#include <sys/types.h>
27725#endif
27726#ifdef HAVE_SYS_SOCKET_H
27727#include <sys/socket.h>
27728#endif
27729
27730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027731typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027732int
27733main ()
27734{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027735if ((ac__type_new_ *) 0)
27736 return 0;
27737if (sizeof (ac__type_new_))
27738 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027739 ;
27740 return 0;
27741}
27742_ACEOF
27743rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027744if { (ac_try="$ac_compile"
27745case "(($ac_try" in
27746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27747 *) ac_try_echo=$ac_try;;
27748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027750 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027752 grep -v '^ *+' conftest.er1 >conftest.err
27753 rm -f conftest.er1
27754 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756 (exit $ac_status); } && {
27757 test -z "$ac_c_werror_flag" ||
27758 test ! -s conftest.err
27759 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027760 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027763sed 's/^/| /' conftest.$ac_ext >&5
27764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027765 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027767
27768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027769fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027770{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27771echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27772if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027773 :
27774else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027775
Martin v. Löwis01c04012002-11-11 14:58:44 +000027776cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027777#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027778_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027779
27780fi
27781
Michael W. Hudson54241132001-12-07 15:38:26 +000027782
Michael W. Hudson54241132001-12-07 15:38:26 +000027783
27784
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027785for h in `(cd $srcdir;echo Python/thread_*.h)`
27786do
27787 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27788done
27789
Michael W. Hudson54241132001-12-07 15:38:26 +000027790
Neal Norwitzd24499d2005-12-18 21:36:39 +000027791SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027792{ echo "$as_me:$LINENO: checking for build directories" >&5
27793echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027794for dir in $SRCDIRS; do
27795 if test ! -d $dir; then
27796 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027797 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027798done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027799{ echo "$as_me:$LINENO: result: done" >&5
27800echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027801
Guido van Rossum627b2d71993-12-24 10:39:16 +000027802# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027803ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027804
Martin v. Löwis11437992002-04-12 09:54:03 +000027805cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027806# This file is a shell script that caches the results of configure
27807# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027808# scripts and configure runs, see configure's option --config-cache.
27809# It is not useful on other systems. If it contains results you don't
27810# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027811#
Martin v. Löwis11437992002-04-12 09:54:03 +000027812# config.status only pays attention to the cache file if you give it
27813# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027814#
Skip Montanaro6dead952003-09-25 14:50:04 +000027815# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027816# loading this file, other *unset* `ac_cv_foo' will be assigned the
27817# following values.
27818
27819_ACEOF
27820
Guido van Rossumf78abae1997-01-21 22:02:36 +000027821# The following way of writing the cache mishandles newlines in values,
27822# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027823# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027824# Ultrix sh set writes to stderr and can't be redirected directly,
27825# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027826(
27827 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27828 eval ac_val=\$$ac_var
27829 case $ac_val in #(
27830 *${as_nl}*)
27831 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027832 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27833echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027834 esac
27835 case $ac_var in #(
27836 _ | IFS | as_nl) ;; #(
27837 *) $as_unset $ac_var ;;
27838 esac ;;
27839 esac
27840 done
27841
Martin v. Löwis11437992002-04-12 09:54:03 +000027842 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027843 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27844 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027845 # `set' does not quote correctly, so add quotes (double-quote
27846 # substitution turns \\\\ into \\, and sed turns \\ into \).
27847 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027848 "s/'/'\\\\''/g;
27849 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027850 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 *)
27852 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027853 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027855 esac |
27856 sort
27857) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027858 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027859 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027860 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027861 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027862 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27863 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027864 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27865 :end' >>confcache
27866if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27867 if test -w "$cache_file"; then
27868 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027869 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27870echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027871 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027872 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027873 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27874echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027875 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027876fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027877rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027879test "x$prefix" = xNONE && prefix=$ac_default_prefix
27880# Let make expand exec_prefix.
27881test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027882
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027883DEFS=-DHAVE_CONFIG_H
27884
Skip Montanaro6dead952003-09-25 14:50:04 +000027885ac_libobjs=
27886ac_ltlibobjs=
27887for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27888 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027889 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027890 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027891 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27892 # will be set to the directory where LIBOBJS objects are built.
27893 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27894 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027895done
27896LIBOBJS=$ac_libobjs
27897
27898LTLIBOBJS=$ac_ltlibobjs
27899
27900
Martin v. Löwis11437992002-04-12 09:54:03 +000027901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027902: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027903ac_clean_files_save=$ac_clean_files
27904ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027905{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27906echo "$as_me: creating $CONFIG_STATUS" >&6;}
27907cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027908#! $SHELL
27909# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027910# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027911# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027912# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027913
Martin v. Löwis11437992002-04-12 09:54:03 +000027914debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027915ac_cs_recheck=false
27916ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027917SHELL=\${CONFIG_SHELL-$SHELL}
27918_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027920cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027921## --------------------- ##
27922## M4sh Initialization. ##
27923## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027924
Martin v. Löwiseba40652007-08-30 20:10:57 +000027925# Be more Bourne compatible
27926DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027927if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27928 emulate sh
27929 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027930 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027931 # is contrary to our usage. Disable this feature.
27932 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027933 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027934else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027935 case `(set -o) 2>/dev/null` in
27936 *posix*) set -o posix ;;
27937esac
27938
Martin v. Löwis11437992002-04-12 09:54:03 +000027939fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027940
Skip Montanaro6dead952003-09-25 14:50:04 +000027941
Martin v. Löwis11437992002-04-12 09:54:03 +000027942
27943
Martin v. Löwiseba40652007-08-30 20:10:57 +000027944# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027945# Avoid depending upon Character Ranges.
27946as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27947as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27948as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27949as_cr_digits='0123456789'
27950as_cr_alnum=$as_cr_Letters$as_cr_digits
27951
27952# The user is always right.
27953if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027954 echo "#! /bin/sh" >conf$$.sh
27955 echo "exit 0" >>conf$$.sh
27956 chmod +x conf$$.sh
27957 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27958 PATH_SEPARATOR=';'
27959 else
27960 PATH_SEPARATOR=:
27961 fi
27962 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027963fi
27964
Martin v. Löwiseba40652007-08-30 20:10:57 +000027965# Support unset when possible.
27966if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27967 as_unset=unset
27968else
27969 as_unset=false
27970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027971
Martin v. Löwiseba40652007-08-30 20:10:57 +000027972
27973# IFS
27974# We need space, tab and new line, in precisely that order. Quoting is
27975# there to prevent editors from complaining about space-tab.
27976# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27977# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027978as_nl='
27979'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027980IFS=" "" $as_nl"
27981
27982# Find who we are. Look in the path if we contain no directory separator.
27983case $0 in
27984 *[\\/]* ) as_myself=$0 ;;
27985 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027986for as_dir in $PATH
27987do
27988 IFS=$as_save_IFS
27989 test -z "$as_dir" && as_dir=.
27990 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27991done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027992IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027993
Martin v. Löwiseba40652007-08-30 20:10:57 +000027994 ;;
27995esac
27996# We did not find ourselves, most probably we were run as `sh COMMAND'
27997# in which case we are not to be found in the path.
27998if test "x$as_myself" = x; then
27999 as_myself=$0
28000fi
28001if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028002 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000028003 { (exit 1); exit 1; }
28004fi
28005
28006# Work around bugs in pre-3.0 UWIN ksh.
28007for as_var in ENV MAIL MAILPATH
28008do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28009done
28010PS1='$ '
28011PS2='> '
28012PS4='+ '
28013
28014# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028015for as_var in \
28016 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28017 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28018 LC_TELEPHONE LC_TIME
28019do
28020 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28021 eval $as_var=C; export $as_var
28022 else
28023 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28024 fi
28025done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028026
28027# Required to use basename.
28028if expr a : '\(a\)' >/dev/null 2>&1 &&
28029 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28030 as_expr=expr
28031else
28032 as_expr=false
28033fi
28034
28035if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28036 as_basename=basename
28037else
28038 as_basename=false
28039fi
28040
28041
28042# Name of the executable.
28043as_me=`$as_basename -- "$0" ||
28044$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28045 X"$0" : 'X\(//\)$' \| \
28046 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028047echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028048 sed '/^.*\/\([^/][^/]*\)\/*$/{
28049 s//\1/
28050 q
28051 }
28052 /^X\/\(\/\/\)$/{
28053 s//\1/
28054 q
28055 }
28056 /^X\/\(\/\).*/{
28057 s//\1/
28058 q
28059 }
28060 s/.*/./; q'`
28061
28062# CDPATH.
28063$as_unset CDPATH
28064
28065
28066
Martin v. Löwis11437992002-04-12 09:54:03 +000028067 as_lineno_1=$LINENO
28068 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028069 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028070 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028071
Martin v. Löwis11437992002-04-12 09:54:03 +000028072 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28073 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028074 # line-number line after each line using $LINENO; the second 'sed'
28075 # does the real work. The second script uses 'N' to pair each
28076 # line-number line with the line containing $LINENO, and appends
28077 # trailing '-' during substitution so that $LINENO is not a special
28078 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028079 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028080 # scripts with optimization help from Paolo Bonzini. Blame Lee
28081 # E. McMahon (1931-1989) for sed's syntax. :-)
28082 sed -n '
28083 p
28084 /[$]LINENO/=
28085 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028086 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028087 s/[$]LINENO.*/&-/
28088 t lineno
28089 b
28090 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028091 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028092 :loop
28093 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028094 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028095 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028096 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028097 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028098 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028099 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028100
Martin v. Löwis11437992002-04-12 09:54:03 +000028101 # Don't try to exec as it changes $[0], causing all sort of problems
28102 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028103 # original and so on. Autoconf is especially sensitive to this).
28104 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028105 # Exit status is that of the last command.
28106 exit
28107}
28108
28109
Martin v. Löwiseba40652007-08-30 20:10:57 +000028110if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28111 as_dirname=dirname
28112else
28113 as_dirname=false
28114fi
28115
28116ECHO_C= ECHO_N= ECHO_T=
28117case `echo -n x` in
28118-n*)
28119 case `echo 'x\c'` in
28120 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28121 *) ECHO_C='\c';;
28122 esac;;
28123*)
28124 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028126
Martin v. Löwiseba40652007-08-30 20:10:57 +000028127if expr a : '\(a\)' >/dev/null 2>&1 &&
28128 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028129 as_expr=expr
28130else
28131 as_expr=false
28132fi
28133
28134rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028135if test -d conf$$.dir; then
28136 rm -f conf$$.dir/conf$$.file
28137else
28138 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028139 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028140fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028141echo >conf$$.file
28142if ln -s conf$$.file conf$$ 2>/dev/null; then
28143 as_ln_s='ln -s'
28144 # ... but there are two gotchas:
28145 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28146 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28147 # In both cases, we have to default to `cp -p'.
28148 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028149 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028150elif ln conf$$.file conf$$ 2>/dev/null; then
28151 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028152else
28153 as_ln_s='cp -p'
28154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028155rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28156rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028157
Skip Montanaro6dead952003-09-25 14:50:04 +000028158if mkdir -p . 2>/dev/null; then
28159 as_mkdir_p=:
28160else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028161 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028162 as_mkdir_p=false
28163fi
28164
Martin v. Löwiseba40652007-08-30 20:10:57 +000028165if test -x / >/dev/null 2>&1; then
28166 as_test_x='test -x'
28167else
28168 if ls -dL / >/dev/null 2>&1; then
28169 as_ls_L_option=L
28170 else
28171 as_ls_L_option=
28172 fi
28173 as_test_x='
28174 eval sh -c '\''
28175 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028176 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028177 else
28178 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028179 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028180 esac;
28181 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28182 ???[sx]*):;;*)false;;esac;fi
28183 '\'' sh
28184 '
28185fi
28186as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028187
28188# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028189as_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 +000028190
28191# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028192as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028193
28194
Martin v. Löwis11437992002-04-12 09:54:03 +000028195exec 6>&1
28196
Martin v. Löwiseba40652007-08-30 20:10:57 +000028197# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028198# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028199# values after options handling.
28200ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028201This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028202generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028203
28204 CONFIG_FILES = $CONFIG_FILES
28205 CONFIG_HEADERS = $CONFIG_HEADERS
28206 CONFIG_LINKS = $CONFIG_LINKS
28207 CONFIG_COMMANDS = $CONFIG_COMMANDS
28208 $ $0 $@
28209
Martin v. Löwiseba40652007-08-30 20:10:57 +000028210on `(hostname || uname -n) 2>/dev/null | sed 1q`
28211"
28212
Martin v. Löwis11437992002-04-12 09:54:03 +000028213_ACEOF
28214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028215cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028216# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028217config_files="$ac_config_files"
28218config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028219
Martin v. Löwiseba40652007-08-30 20:10:57 +000028220_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028222cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028223ac_cs_usage="\
28224\`$as_me' instantiates files from templates according to the
28225current configuration.
28226
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028227Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028228
28229 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028230 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028231 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028232 -d, --debug don't remove temporary files
28233 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028234 --file=FILE[:TEMPLATE]
28235 instantiate the configuration file FILE
28236 --header=FILE[:TEMPLATE]
28237 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028238
28239Configuration files:
28240$config_files
28241
28242Configuration headers:
28243$config_headers
28244
28245Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028246
Martin v. Löwiseba40652007-08-30 20:10:57 +000028247_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028248cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028249ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028250python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028251configured by $0, generated by GNU Autoconf 2.61,
28252 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028253
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028254Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028255This config.status script is free software; the Free Software Foundation
28256gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028257
28258ac_pwd='$ac_pwd'
28259srcdir='$srcdir'
28260INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028261_ACEOF
28262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028263cat >>$CONFIG_STATUS <<\_ACEOF
28264# If no file are specified by the user, then we need to provide default
28265# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028266ac_need_defaults=:
28267while test $# != 0
28268do
28269 case $1 in
28270 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028271 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28272 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028273 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028274 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028275 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028276 ac_option=$1
28277 ac_optarg=$2
28278 ac_shift=shift
28279 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028280 esac
28281
Skip Montanaro6dead952003-09-25 14:50:04 +000028282 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028283 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028284 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28285 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028286 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028287 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028288 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028289 debug=: ;;
28290 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028291 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028292 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028293 ac_need_defaults=false;;
28294 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028295 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028296 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028297 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028298 --he | --h)
28299 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028300 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028301Try \`$0 --help' for more information." >&2
28302 { (exit 1); exit 1; }; };;
28303 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028304 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28306 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28307 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028308
28309 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028310 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028311Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028312 { (exit 1); exit 1; }; } ;;
28313
Martin v. Löwiseba40652007-08-30 20:10:57 +000028314 *) ac_config_targets="$ac_config_targets $1"
28315 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028316
28317 esac
28318 shift
28319done
28320
Skip Montanaro6dead952003-09-25 14:50:04 +000028321ac_configure_extra_args=
28322
28323if $ac_cs_silent; then
28324 exec 6>/dev/null
28325 ac_configure_extra_args="$ac_configure_extra_args --silent"
28326fi
28327
28328_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028329cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028330if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028331 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28332 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028333 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028334 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028335fi
28336
Martin v. Löwis11437992002-04-12 09:54:03 +000028337_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028338cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028339exec 5>>config.log
28340{
28341 echo
28342 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28343## Running $as_me. ##
28344_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028345 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028346} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028347
Martin v. Löwiseba40652007-08-30 20:10:57 +000028348_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028349cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028350_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028351
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028352cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028353
28354# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028355for ac_config_target in $ac_config_targets
28356do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028357 case $ac_config_target in
28358 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28359 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28360 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28361 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028362 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28363 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028364 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28365 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028366 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028367
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028368 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28369echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028370 { (exit 1); exit 1; }; };;
28371 esac
28372done
28373
Martin v. Löwiseba40652007-08-30 20:10:57 +000028374
Martin v. Löwis11437992002-04-12 09:54:03 +000028375# If the user did not use the arguments to specify the items to instantiate,
28376# then the envvar interface is used. Set only those that are not.
28377# We use the long form for the default assignment because of an extremely
28378# bizarre bug on SunOS 4.1.3.
28379if $ac_need_defaults; then
28380 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28381 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28382fi
28383
Skip Montanaro6dead952003-09-25 14:50:04 +000028384# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028385# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028386# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028387# Hook for its removal unless debugging.
28388# Note that there is a small window in which the directory will not be cleaned:
28389# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028390$debug ||
28391{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028392 tmp=
28393 trap 'exit_status=$?
28394 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28395' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028396 trap '{ (exit 1); exit 1; }' 1 2 13 15
28397}
Martin v. Löwis11437992002-04-12 09:54:03 +000028398# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028399
Martin v. Löwis11437992002-04-12 09:54:03 +000028400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028401 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028402 test -n "$tmp" && test -d "$tmp"
28403} ||
28404{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028405 tmp=./conf$$-$RANDOM
28406 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028407} ||
28408{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028409 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028410 { (exit 1); exit 1; }
28411}
28412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028413#
28414# Set up the sed scripts for CONFIG_FILES section.
28415#
28416
28417# No need to generate the scripts if there are no CONFIG_FILES.
28418# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028419if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028420
28421_ACEOF
28422
Martin v. Löwiseba40652007-08-30 20:10:57 +000028423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028424
Martin v. Löwiseba40652007-08-30 20:10:57 +000028425ac_delim='%!_!# '
28426for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028427 cat >conf$$subs.sed <<_ACEOF
28428SHELL!$SHELL$ac_delim
28429PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28430PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28431PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28432PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28433PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28434PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28435exec_prefix!$exec_prefix$ac_delim
28436prefix!$prefix$ac_delim
28437program_transform_name!$program_transform_name$ac_delim
28438bindir!$bindir$ac_delim
28439sbindir!$sbindir$ac_delim
28440libexecdir!$libexecdir$ac_delim
28441datarootdir!$datarootdir$ac_delim
28442datadir!$datadir$ac_delim
28443sysconfdir!$sysconfdir$ac_delim
28444sharedstatedir!$sharedstatedir$ac_delim
28445localstatedir!$localstatedir$ac_delim
28446includedir!$includedir$ac_delim
28447oldincludedir!$oldincludedir$ac_delim
28448docdir!$docdir$ac_delim
28449infodir!$infodir$ac_delim
28450htmldir!$htmldir$ac_delim
28451dvidir!$dvidir$ac_delim
28452pdfdir!$pdfdir$ac_delim
28453psdir!$psdir$ac_delim
28454libdir!$libdir$ac_delim
28455localedir!$localedir$ac_delim
28456mandir!$mandir$ac_delim
28457DEFS!$DEFS$ac_delim
28458ECHO_C!$ECHO_C$ac_delim
28459ECHO_N!$ECHO_N$ac_delim
28460ECHO_T!$ECHO_T$ac_delim
28461LIBS!$LIBS$ac_delim
28462build_alias!$build_alias$ac_delim
28463host_alias!$host_alias$ac_delim
28464target_alias!$target_alias$ac_delim
28465VERSION!$VERSION$ac_delim
28466SOVERSION!$SOVERSION$ac_delim
28467CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28468UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28469ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028470LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028471PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28472PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28473PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28474PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28475PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28476FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28477FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28478FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28479FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28480FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28481MACHDEP!$MACHDEP$ac_delim
28482SGI_ABI!$SGI_ABI$ac_delim
28483EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28484EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28485CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28486EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28487CC!$CC$ac_delim
28488CFLAGS!$CFLAGS$ac_delim
28489LDFLAGS!$LDFLAGS$ac_delim
28490CPPFLAGS!$CPPFLAGS$ac_delim
28491ac_ct_CC!$ac_ct_CC$ac_delim
28492EXEEXT!$EXEEXT$ac_delim
28493OBJEXT!$OBJEXT$ac_delim
28494CXX!$CXX$ac_delim
28495MAINCC!$MAINCC$ac_delim
28496CPP!$CPP$ac_delim
28497GREP!$GREP$ac_delim
28498EGREP!$EGREP$ac_delim
28499BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28500LIBRARY!$LIBRARY$ac_delim
28501LDLIBRARY!$LDLIBRARY$ac_delim
28502DLLLIBRARY!$DLLLIBRARY$ac_delim
28503BLDLIBRARY!$BLDLIBRARY$ac_delim
28504LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28505INSTSONAME!$INSTSONAME$ac_delim
28506RUNSHARED!$RUNSHARED$ac_delim
28507LINKCC!$LINKCC$ac_delim
28508GNULD!$GNULD$ac_delim
28509RANLIB!$RANLIB$ac_delim
28510AR!$AR$ac_delim
28511ARFLAGS!$ARFLAGS$ac_delim
28512SVNVERSION!$SVNVERSION$ac_delim
28513INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28514INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28515INSTALL_DATA!$INSTALL_DATA$ac_delim
28516LN!$LN$ac_delim
28517OPT!$OPT$ac_delim
28518BASECFLAGS!$BASECFLAGS$ac_delim
28519UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28520OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28521LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28522SO!$SO$ac_delim
28523LDSHARED!$LDSHARED$ac_delim
Ronald Oussoren75912852010-04-08 08:13:31 +000028524LDCXXSHARED!$LDCXXSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028527 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000028528 break
28529 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028530 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28531echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028532 { (exit 1); exit 1; }; }
28533 else
28534 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028535 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028536done
28537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028538ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28539if test -n "$ac_eof"; then
28540 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28541 ac_eof=`expr $ac_eof + 1`
28542fi
28543
28544cat >>$CONFIG_STATUS <<_ACEOF
28545cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28546/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028547_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028548sed '
28549s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28550s/^/s,@/; s/!/@,|#_!!_#|/
28551:n
28552t n
28553s/'"$ac_delim"'$/,g/; t
28554s/$/\\/; p
28555N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28556' >>$CONFIG_STATUS <conf$$subs.sed
28557rm -f conf$$subs.sed
28558cat >>$CONFIG_STATUS <<_ACEOF
28559CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028560_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028561
28562
28563ac_delim='%!_!# '
28564for ac_last_try in false false false false false :; do
28565 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren75912852010-04-08 08:13:31 +000028566BLDSHARED!$BLDSHARED$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028567CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028568LINKFORSHARED!$LINKFORSHARED$ac_delim
28569CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28570SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028571PKG_CONFIG!$PKG_CONFIG$ac_delim
28572LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028573USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28574SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28575USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28576LDLAST!$LDLAST$ac_delim
28577THREADOBJ!$THREADOBJ$ac_delim
28578DLINCLDIR!$DLINCLDIR$ac_delim
28579DYNLOADFILE!$DYNLOADFILE$ac_delim
28580MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28581TRUE!$TRUE$ac_delim
28582LIBOBJS!$LIBOBJS$ac_delim
28583HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28584HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28585HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28586HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28587HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28588LIBM!$LIBM$ac_delim
28589LIBC!$LIBC$ac_delim
28590UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28591THREADHEADERS!$THREADHEADERS$ac_delim
28592SRCDIRS!$SRCDIRS$ac_delim
28593LTLIBOBJS!$LTLIBOBJS$ac_delim
28594_ACEOF
28595
Ronald Oussoren75912852010-04-08 08:13:31 +000028596 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028597 break
28598 elif $ac_last_try; then
28599 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28600echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028601 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028602 else
28603 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28604 fi
28605done
28606
28607ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28608if test -n "$ac_eof"; then
28609 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28610 ac_eof=`expr $ac_eof + 1`
28611fi
28612
28613cat >>$CONFIG_STATUS <<_ACEOF
28614cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28615/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028616_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028617sed '
28618s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28619s/^/s,@/; s/!/@,|#_!!_#|/
28620:n
28621t n
28622s/'"$ac_delim"'$/,g/; t
28623s/$/\\/; p
28624N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28625' >>$CONFIG_STATUS <conf$$subs.sed
28626rm -f conf$$subs.sed
28627cat >>$CONFIG_STATUS <<_ACEOF
28628:end
28629s/|#_!!_#|//g
28630CEOF$ac_eof
28631_ACEOF
28632
Martin v. Löwiseba40652007-08-30 20:10:57 +000028633
28634# VPATH may cause trouble with some makes, so we remove $(srcdir),
28635# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28636# trailing colons and then remove the whole line if VPATH becomes empty
28637# (actually we leave an empty line to preserve line numbers).
28638if test "x$srcdir" = x.; then
28639 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28640s/:*\$(srcdir):*/:/
28641s/:*\${srcdir}:*/:/
28642s/:*@srcdir@:*/:/
28643s/^\([^=]*=[ ]*\):*/\1/
28644s/:*$//
28645s/^[^=]*=[ ]*$//
28646}'
28647fi
28648
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028649cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028650fi # test -n "$CONFIG_FILES"
28651
Martin v. Löwiseba40652007-08-30 20:10:57 +000028652
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028653for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028654do
28655 case $ac_tag in
28656 :[FHLC]) ac_mode=$ac_tag; continue;;
28657 esac
28658 case $ac_mode$ac_tag in
28659 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028660 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28661echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028662 { (exit 1); exit 1; }; };;
28663 :[FH]-) ac_tag=-:-;;
28664 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28665 esac
28666 ac_save_IFS=$IFS
28667 IFS=:
28668 set x $ac_tag
28669 IFS=$ac_save_IFS
28670 shift
28671 ac_file=$1
28672 shift
28673
28674 case $ac_mode in
28675 :L) ac_source=$1;;
28676 :[FH])
28677 ac_file_inputs=
28678 for ac_f
28679 do
28680 case $ac_f in
28681 -) ac_f="$tmp/stdin";;
28682 *) # Look for the file first in the build tree, then in the source tree
28683 # (if the path is not absolute). The absolute path cannot be DOS-style,
28684 # because $ac_f cannot contain `:'.
28685 test -f "$ac_f" ||
28686 case $ac_f in
28687 [\\/$]*) false;;
28688 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28689 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028690 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28691echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028692 { (exit 1); exit 1; }; };;
28693 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028694 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028695 done
28696
28697 # Let's still pretend it is `configure' which instantiates (i.e., don't
28698 # use $as_me), people would be surprised to read:
28699 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028700 configure_input="Generated from "`IFS=:
28701 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 if test x"$ac_file" != x-; then
28703 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028704 { echo "$as_me:$LINENO: creating $ac_file" >&5
28705echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028706 fi
28707
28708 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028709 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028710 esac
28711 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028712 esac
28713
Martin v. Löwiseba40652007-08-30 20:10:57 +000028714 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028715$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028716 X"$ac_file" : 'X\(//\)[^/]' \| \
28717 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028718 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028719echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028720 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28721 s//\1/
28722 q
28723 }
28724 /^X\(\/\/\)[^/].*/{
28725 s//\1/
28726 q
28727 }
28728 /^X\(\/\/\)$/{
28729 s//\1/
28730 q
28731 }
28732 /^X\(\/\).*/{
28733 s//\1/
28734 q
28735 }
28736 s/.*/./; q'`
28737 { as_dir="$ac_dir"
28738 case $as_dir in #(
28739 -*) as_dir=./$as_dir;;
28740 esac
28741 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028742 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028743 while :; do
28744 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028745 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028746 *) as_qdir=$as_dir;;
28747 esac
28748 as_dirs="'$as_qdir' $as_dirs"
28749 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028750$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028751 X"$as_dir" : 'X\(//\)[^/]' \| \
28752 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028753 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028754echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028755 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28756 s//\1/
28757 q
28758 }
28759 /^X\(\/\/\)[^/].*/{
28760 s//\1/
28761 q
28762 }
28763 /^X\(\/\/\)$/{
28764 s//\1/
28765 q
28766 }
28767 /^X\(\/\).*/{
28768 s//\1/
28769 q
28770 }
28771 s/.*/./; q'`
28772 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028773 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028774 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028775 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28776echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028777 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028778 ac_builddir=.
28779
Martin v. Löwiseba40652007-08-30 20:10:57 +000028780case "$ac_dir" in
28781.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28782*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028783 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028784 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028785 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028786 case $ac_top_builddir_sub in
28787 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28788 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28789 esac ;;
28790esac
28791ac_abs_top_builddir=$ac_pwd
28792ac_abs_builddir=$ac_pwd$ac_dir_suffix
28793# for backward compatibility:
28794ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028795
28796case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028797 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028798 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028799 ac_top_srcdir=$ac_top_builddir_sub
28800 ac_abs_top_srcdir=$ac_pwd ;;
28801 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028802 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028803 ac_top_srcdir=$srcdir
28804 ac_abs_top_srcdir=$srcdir ;;
28805 *) # Relative name.
28806 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28807 ac_top_srcdir=$ac_top_build_prefix$srcdir
28808 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028809esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028810ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028811
Martin v. Löwis11437992002-04-12 09:54:03 +000028812
Martin v. Löwiseba40652007-08-30 20:10:57 +000028813 case $ac_mode in
28814 :F)
28815 #
28816 # CONFIG_FILE
28817 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028818
28819 case $INSTALL in
28820 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028821 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028822 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028823_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028824
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028825cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028826# If the template does not know about datarootdir, expand it.
28827# FIXME: This hack should be removed a few years after 2.60.
28828ac_datarootdir_hack=; ac_datarootdir_seen=
28829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028830case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028831 p
28832 q
28833}
28834/@datadir@/p
28835/@docdir@/p
28836/@infodir@/p
28837/@localedir@/p
28838/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028839' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028840*datarootdir*) ac_datarootdir_seen=yes;;
28841*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028842 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28843echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028844_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028845cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028846 ac_datarootdir_hack='
28847 s&@datadir@&$datadir&g
28848 s&@docdir@&$docdir&g
28849 s&@infodir@&$infodir&g
28850 s&@localedir@&$localedir&g
28851 s&@mandir@&$mandir&g
28852 s&\\\${datarootdir}&$datarootdir&g' ;;
28853esac
28854_ACEOF
28855
28856# Neutralize VPATH when `$srcdir' = `.'.
28857# Shell code in configure.ac might set extrasub.
28858# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028859cat >>$CONFIG_STATUS <<_ACEOF
28860 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028861$extrasub
28862_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028863cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028864:t
28865/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028866s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028867s&@top_builddir@&$ac_top_builddir_sub&;t t
28868s&@srcdir@&$ac_srcdir&;t t
28869s&@abs_srcdir@&$ac_abs_srcdir&;t t
28870s&@top_srcdir@&$ac_top_srcdir&;t t
28871s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28872s&@builddir@&$ac_builddir&;t t
28873s&@abs_builddir@&$ac_abs_builddir&;t t
28874s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28875s&@INSTALL@&$ac_INSTALL&;t t
28876$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028877" $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 +000028878
Martin v. Löwiseba40652007-08-30 20:10:57 +000028879test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28880 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28881 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028882 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028883which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028884echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028885which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028886
Martin v. Löwiseba40652007-08-30 20:10:57 +000028887 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028888 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028889 -) cat "$tmp/out"; rm -f "$tmp/out";;
28890 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28891 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028892 ;;
28893 :H)
28894 #
28895 # CONFIG_HEADER
28896 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028897_ACEOF
28898
28899# Transform confdefs.h into a sed script `conftest.defines', that
28900# substitutes the proper values into config.h.in to produce config.h.
28901rm -f conftest.defines conftest.tail
28902# First, append a space to every undef/define line, to ease matching.
28903echo 's/$/ /' >conftest.defines
28904# Then, protect against being on the right side of a sed subst, or in
28905# an unquoted here document, in config.status. If some macros were
28906# called several times there might be several #defines for the same
28907# symbol, which is useless. But do not sort them, since the last
28908# AC_DEFINE must be honored.
28909ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28910# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28911# NAME is the cpp macro being defined, VALUE is the value it is being given.
28912# PARAMS is the parameter list in the macro definition--in most cases, it's
28913# just an empty string.
28914ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28915ac_dB='\\)[ (].*,\\1define\\2'
28916ac_dC=' '
28917ac_dD=' ,'
28918
28919uniq confdefs.h |
28920 sed -n '
28921 t rset
28922 :rset
28923 s/^[ ]*#[ ]*define[ ][ ]*//
28924 t ok
28925 d
28926 :ok
28927 s/[\\&,]/\\&/g
28928 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28929 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28930 ' >>conftest.defines
28931
28932# Remove the space that was appended to ease matching.
28933# Then replace #undef with comments. This is necessary, for
28934# example, in the case of _POSIX_SOURCE, which is predefined and required
28935# on some systems where configure will not decide to define it.
28936# (The regexp can be short, since the line contains either #define or #undef.)
28937echo 's/ $//
28938s,^[ #]*u.*,/* & */,' >>conftest.defines
28939
28940# Break up conftest.defines:
28941ac_max_sed_lines=50
28942
28943# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28944# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28945# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28946# et cetera.
28947ac_in='$ac_file_inputs'
28948ac_out='"$tmp/out1"'
28949ac_nxt='"$tmp/out2"'
28950
28951while :
28952do
28953 # Write a here document:
28954 cat >>$CONFIG_STATUS <<_ACEOF
28955 # First, check the format of the line:
28956 cat >"\$tmp/defines.sed" <<\\CEOF
28957/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28958/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28959b
28960:def
28961_ACEOF
28962 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28963 echo 'CEOF
28964 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28965 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28966 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28967 grep . conftest.tail >/dev/null || break
28968 rm -f conftest.defines
28969 mv conftest.tail conftest.defines
28970done
28971rm -f conftest.defines conftest.tail
28972
28973echo "ac_result=$ac_in" >>$CONFIG_STATUS
28974cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028975 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028976 echo "/* $configure_input */" >"$tmp/config.h"
28977 cat "$ac_result" >>"$tmp/config.h"
28978 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28979 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28980echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028981 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028982 rm -f $ac_file
28983 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028984 fi
28985 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028986 echo "/* $configure_input */"
28987 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028988 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028989 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028990 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028991
Martin v. Löwiseba40652007-08-30 20:10:57 +000028992
28993 esac
28994
28995done # for ac_tag
28996
Guido van Rossum627b2d71993-12-24 10:39:16 +000028997
Martin v. Löwis11437992002-04-12 09:54:03 +000028998{ (exit 0); exit 0; }
28999_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029000chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000029001ac_clean_files=$ac_clean_files_save
29002
29003
29004# configure is writing to config.log, and then calls config.status.
29005# config.status does its own redirection, appending to config.log.
29006# Unfortunately, on DOS this fails, as config.log is still kept open
29007# by configure, so config.status won't be able to write to it; its
29008# output is simply discarded. So we exec the FD to /dev/null,
29009# effectively closing config.log, so it can be properly (re)opened and
29010# appended to by config.status. When coming back to configure, we
29011# need to make the FD available again.
29012if test "$no_create" != yes; then
29013 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029014 ac_config_status_args=
29015 test "$silent" = yes &&
29016 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029017 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029018 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029019 exec 5>>config.log
29020 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29021 # would make configure fail if this is the last instruction.
29022 $ac_cs_success || { (exit 1); exit 1; }
29023fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029024
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029025
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029026echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029027if test ! -f Modules/Setup
29028then
29029 cp $srcdir/Modules/Setup.dist Modules/Setup
29030fi
29031
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029032echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029033if test ! -f Modules/Setup.local
29034then
29035 echo "# Edit this file for local setup changes" >Modules/Setup.local
29036fi
29037
29038echo "creating Makefile"
29039$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29040 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029041 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029042
29043case $ac_sys_system in
29044BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029045 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029046
29047 Support for BeOS is deprecated as of Python 2.6.
29048 See PEP 11 for the gory details.
29049 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029050echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029051
29052 Support for BeOS is deprecated as of Python 2.6.
29053 See PEP 11 for the gory details.
29054 " >&2;}
29055 ;;
29056*) ;;
29057esac
29058
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029059mv config.c Modules