blob: da22f8d7691a5872e8e5e2a11e3cea232ca8719b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +00002# From configure.in Revision: 76052 .
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
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 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 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001926 if test "${enable_universalsdk}" ; then
1927 :
1928 else
1929 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1930echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1931 { (exit 1); exit 1; }; }
1932 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001933
1934else
1935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001936 { echo "$as_me:$LINENO: result: 32-bit" >&5
1937echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939fi
1940
1941
1942
1943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001944
1945# Check whether --with-framework-name was given.
1946if test "${with_framework_name+set}" = set; then
1947 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001948 if test "${enable_framework}"; then
1949 :
1950 else
1951 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1952echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1953 { (exit 1); exit 1; }; }
1954 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001955 PYTHONFRAMEWORK=${withval}
1956 PYTHONFRAMEWORKDIR=${withval}.framework
1957 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1958
1959else
1960
1961 PYTHONFRAMEWORK=Python
1962 PYTHONFRAMEWORKDIR=Python.framework
1963 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1964
1965fi
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001968if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001969 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001970 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001971 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001972 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001973 esac
1974 case $enableval in
1975 no)
1976 PYTHONFRAMEWORK=
1977 PYTHONFRAMEWORKDIR=no-framework
1978 PYTHONFRAMEWORKPREFIX=
1979 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST=
1981 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001982 FRAMEWORKALTINSTALLFIRST=
1983 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001984 if test "x${prefix}" = "xNONE"; then
1985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1986 else
1987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1988 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001989 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001990 ;;
1991 *)
1992 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001994 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001995 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1996 if test "$UNIVERSAL_ARCHS" = "all"
1997 then
1998 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001999 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2003 fi
2004
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002005 if test "x${prefix}" = "xNONE" ; then
2006 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2007 else
2008 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2009 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002011
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002012 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002013 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002014 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002015
Martin v. Löwiseba40652007-08-30 20:10:57 +00002016 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002017
Martin v. Löwiseba40652007-08-30 20:10:57 +00002018 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002019
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002020 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2021
2022 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2023
Jack Jansene578a632001-08-15 01:27:14 +00002024 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002025
Guido van Rossum563e7081996-09-10 18:20:48 +00002026else
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Jack Jansene578a632001-08-15 01:27:14 +00002028 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002029 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORKPREFIX=
2031 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002032 FRAMEWORKINSTALLFIRST=
2033 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002034 FRAMEWORKALTINSTALLFIRST=
2035 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002036 if test "x${prefix}" = "xNONE" ; then
2037 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2038 else
2039 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2040 fi
Jack Jansene578a632001-08-15 01:27:14 +00002041 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002043 if test "$UNIVERSAL_ARCHS" = "all"
2044 then
2045 FRAMEWORKINSTALLLAST=update4wayuniversal
2046 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2047 fi
2048
Martin v. Löwiseba40652007-08-30 20:10:57 +00002049fi
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002056
2057
Ronald Oussoren5b787322006-06-06 19:50:24 +00002058
2059
2060
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002061
Jack Jansene578a632001-08-15 01:27:14 +00002062##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002063## AC_HELP_STRING(--with-dyld,
2064## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002065##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066# Set name for machine-dependent library files
2067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002068{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2069echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070if test -z "$MACHDEP"
2071then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002073 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002074 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_md_system=`echo $ac_sys_system |
2080 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2081 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002082 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002083 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002084
Guido van Rossum07397971997-04-29 21:49:50 +00002085 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002086 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002087 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002088 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002089 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002090 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002091 esac
2092fi
Guido van Rossum91922671997-10-09 20:24:13 +00002093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002094# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2095# disable features if it is defined, without any means to access these
2096# features as extensions. For these systems, we skip the definition of
2097# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2098# some feature, make sure there is no alternative way to access this
2099# feature. Also, when using wildcards, make sure you have verified the
2100# need for not defining _XOPEN_SOURCE on all systems matching the
2101# wildcard, and that the wildcard does not include future systems
2102# (which may remove their limitations).
2103case $ac_sys_system/$ac_sys_release in
2104 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2105 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002106 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002107 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002108 define_xopen_source=no
2109 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2110 # also defined. This can be overridden by defining _BSD_SOURCE
2111 # As this has a different meaning on Linux, only define it on OpenBSD
2112
2113cat >>confdefs.h <<\_ACEOF
2114#define _BSD_SOURCE 1
2115_ACEOF
2116
2117 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002118 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2119 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2120 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002121 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 +00002122 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002123 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2124 # of union __?sigval. Reported by Stuart Bishop.
2125 SunOS/5.6)
2126 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2128 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002129 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002130 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002131 define_xopen_source=no;;
2132 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002133 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002134 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002135 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002136 # On FreeBSD 4, the math functions C89 does not cover are never defined
2137 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2138 FreeBSD/4.*)
2139 define_xopen_source=no;;
2140 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2141 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2142 # identifies itself as Darwin/7.*
2143 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2144 # disables platform specific features beyond repair.
2145 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2146 # has no effect, don't bother defining them
2147 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002148 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002149 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2150 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2151 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002152 AIX/4)
2153 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002154 AIX/5)
2155 if test `uname -r` -eq 1; then
2156 define_xopen_source=no
2157 fi
2158 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002159 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2160 # defining NI_NUMERICHOST.
2161 QNX/6.3.2)
2162 define_xopen_source=no
2163 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002164
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165esac
2166
2167if test $define_xopen_source = yes
2168then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2170 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002171 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2172 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE 500
2178_ACEOF
2179
2180 ;;
2181 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
2183cat >>confdefs.h <<\_ACEOF
2184#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002185_ACEOF
2186
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187 ;;
2188 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189
2190 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2191 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2192 # several APIs are not declared. Since this is also needed in some
2193 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002194 # except for Solaris 10, where it must not be defined,
2195 # as it implies XPG4.2
2196 case $ac_sys_system/$ac_sys_release in
2197 SunOS/5.10)
2198 ;;
2199 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201cat >>confdefs.h <<\_ACEOF
2202#define _XOPEN_SOURCE_EXTENDED 1
2203_ACEOF
2204
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 ;;
2206 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002208
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002209cat >>confdefs.h <<\_ACEOF
2210#define _POSIX_C_SOURCE 200112L
2211_ACEOF
2212
2213
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002214fi
2215
Guido van Rossum91922671997-10-09 20:24:13 +00002216#
2217# SGI compilers allow the specification of the both the ABI and the
2218# ISA on the command line. Depending on the values of these switches,
2219# different and often incompatable code will be generated.
2220#
2221# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2222# thus supply support for various ABI/ISA combinations. The MACHDEP
2223# variable is also adjusted.
2224#
2225
2226if test ! -z "$SGI_ABI"
2227then
2228 CC="cc $SGI_ABI"
2229 LDFLAGS="$SGI_ABI $LDFLAGS"
2230 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2233echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002234
Jack Jansen83f898c2002-12-30 22:23:40 +00002235# And add extra plat-mac for darwin
2236
Jack Jansen7b59b422003-03-17 15:44:10 +00002237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002238{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2239echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002240if test -z "$EXTRAPLATDIR"
2241then
2242 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002243 darwin)
2244 EXTRAPLATDIR="\$(PLATMACDIRS)"
2245 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2246 ;;
2247 *)
2248 EXTRAPLATDIR=""
2249 EXTRAMACHDEPPATH=""
2250 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002251 esac
2252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2254echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002255
Jack Jansen6b08a402004-06-03 12:41:45 +00002256# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2257# it may influence the way we can build extensions, so distutils
2258# needs to check it
2259
Ronald Oussoren988117f2006-04-29 11:31:35 +00002260
Jack Jansen6b08a402004-06-03 12:41:45 +00002261CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002262EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2265echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002266ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2268echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002269
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002271
2272# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2273# for debug/optimization stuff. BASECFLAGS is for flags that are required
2274# just to get things to compile and link. Users are free to override OPT
2275# when running configure or make. The build should not break if they do.
2276# BASECFLAGS should generally not be messed with, however.
2277
2278# XXX shouldn't some/most/all of this code be merged with the stuff later
2279# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002280{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2281echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002284if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002285 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002286 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002287 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288 without_gcc=yes;;
2289 yes) CC=gcc
2290 without_gcc=no;;
2291 *) CC=$withval
2292 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002293 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002296 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002297 AIX*) CC=cc_r
2298 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 case $BE_HOST_CPU in
2301 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002302 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002304 BASECFLAGS="$BASECFLAGS -export pragma"
2305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
2308 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002309 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002310 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002311 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002312 ;;
2313 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002314 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2315echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002317 ;;
2318 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002319 AR="\$(srcdir)/Modules/ar_beos"
2320 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002321 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002322 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002323 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324fi
2325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2327echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002328
Guido van Rossum8b131c51995-03-09 14:10:13 +00002329# If the user switches compilers, we can't believe the cache
2330if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2331then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002332 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002333(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002334echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002335(it is also a good idea to do 'make clean' before compiling)" >&2;}
2336 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002337fi
2338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339ac_ext=c
2340ac_cpp='$CPP $CPPFLAGS'
2341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2343ac_compiler_gnu=$ac_cv_c_compiler_gnu
2344if test -n "$ac_tool_prefix"; then
2345 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2346set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002347{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002349if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002351else
2352 if test -n "$CC"; then
2353 ac_cv_prog_CC="$CC" # Let the user override the test.
2354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356for as_dir in $PATH
2357do
2358 IFS=$as_save_IFS
2359 test -z "$as_dir" && as_dir=.
2360 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 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 +00002362 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 break 2
2365 fi
2366done
2367done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002369
Jack Jansendd19cf82001-12-06 22:36:17 +00002370fi
2371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002373if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002374 { echo "$as_me:$LINENO: result: $CC" >&5
2375echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377 { echo "$as_me:$LINENO: result: no" >&5
2378echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379fi
2380
Martin v. Löwiseba40652007-08-30 20:10:57 +00002381
Martin v. Löwis11437992002-04-12 09:54:03 +00002382fi
2383if test -z "$ac_cv_prog_CC"; then
2384 ac_ct_CC=$CC
2385 # Extract the first word of "gcc", so it can be a program name with args.
2386set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002389if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
2392 if test -n "$ac_ct_CC"; then
2393 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2394else
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 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 +00002402 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 break 2
2405 fi
2406done
2407done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410fi
2411fi
2412ac_ct_CC=$ac_cv_prog_ac_ct_CC
2413if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002414 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2415echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002417 { echo "$as_me:$LINENO: result: no" >&5
2418echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002419fi
2420
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421 if test "x$ac_ct_CC" = x; then
2422 CC=""
2423 else
2424 case $cross_compiling:$ac_tool_warned in
2425yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002426{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2427whose name does not start with the host triplet. If you think this
2428configuration is useful to you, please write to autoconf@gnu.org." >&5
2429echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2430whose name does not start with the host triplet. If you think this
2431configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432ac_tool_warned=yes ;;
2433esac
2434 CC=$ac_ct_CC
2435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436else
2437 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002438fi
2439
Jack Jansendd19cf82001-12-06 22:36:17 +00002440if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441 if test -n "$ac_tool_prefix"; then
2442 # 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 +00002443set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002444{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002446if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002448else
2449 if test -n "$CC"; then
2450 ac_cv_prog_CC="$CC" # Let the user override the test.
2451else
Martin v. Löwis11437992002-04-12 09:54:03 +00002452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
2457 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 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 +00002459 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 break 2
2462 fi
2463done
2464done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467fi
2468fi
2469CC=$ac_cv_prog_CC
2470if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002471 { echo "$as_me:$LINENO: result: $CC" >&5
2472echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474 { echo "$as_me:$LINENO: result: no" >&5
2475echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002480fi
2481if test -z "$CC"; then
2482 # Extract the first word of "cc", so it can be a program name with args.
2483set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002488else
2489 if test -n "$CC"; then
2490 ac_cv_prog_CC="$CC" # Let the user override the test.
2491else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
2498 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 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 +00002500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2501 ac_prog_rejected=yes
2502 continue
2503 fi
2504 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 break 2
2507 fi
2508done
2509done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002511
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512if test $ac_prog_rejected = yes; then
2513 # We found a bogon in the path, so make sure we never use it.
2514 set dummy $ac_cv_prog_CC
2515 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517 # We chose a different compiler from the bogus one.
2518 # However, it has the same basename, so the bogon will be chosen
2519 # first if we set CC to just the basename; use the full file name.
2520 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522 fi
2523fi
2524fi
2525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002526CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002528 { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002531 { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002533fi
2534
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536fi
2537if test -z "$CC"; then
2538 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 do
2541 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002543{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Martin v. Löwis11437992002-04-12 09:54:03 +00002551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2552for as_dir in $PATH
2553do
2554 IFS=$as_save_IFS
2555 test -z "$as_dir" && as_dir=.
2556 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 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 +00002558 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
2563done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566fi
2567fi
2568CC=$ac_cv_prog_CC
2569if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002570 { echo "$as_me:$LINENO: result: $CC" >&5
2571echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573 { echo "$as_me:$LINENO: result: no" >&5
2574echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002575fi
2576
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 test -n "$CC" && break
2579 done
2580fi
2581if test -z "$CC"; then
2582 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002584do
2585 # Extract the first word of "$ac_prog", so it can be a program name with args.
2586set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002587{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2588echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
2592 if test -n "$ac_ct_CC"; then
2593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2594else
2595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2596for as_dir in $PATH
2597do
2598 IFS=$as_save_IFS
2599 test -z "$as_dir" && as_dir=.
2600 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 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 +00002602 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 break 2
2605 fi
2606done
2607done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611fi
2612ac_ct_CC=$ac_cv_prog_ac_ct_CC
2613if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002614 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2615echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617 { echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 test -n "$ac_ct_CC" && break
2623done
Michael W. Hudson54241132001-12-07 15:38:26 +00002624
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625 if test "x$ac_ct_CC" = x; then
2626 CC=""
2627 else
2628 case $cross_compiling:$ac_tool_warned in
2629yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002630{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2631whose name does not start with the host triplet. If you think this
2632configuration is useful to you, please write to autoconf@gnu.org." >&5
2633echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2634whose name does not start with the host triplet. If you think this
2635configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636ac_tool_warned=yes ;;
2637esac
2638 CC=$ac_ct_CC
2639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002640fi
2641
2642fi
2643
2644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002646See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002648See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
2651# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002652echo "$as_me:$LINENO: checking for C compiler version" >&5
2653ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler --version >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -v >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674{ (ac_try="$ac_compiler -V >&5"
2675case "(($ac_try" in
2676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677 *) ac_try_echo=$ac_try;;
2678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 (exit $ac_status); }
2684
2685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692int
2693main ()
2694{
2695
2696 ;
2697 return 0;
2698}
2699_ACEOF
2700ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702# Try to create an executable without -o first, disregard a.out.
2703# It will help us diagnose broken compilers, and finding out an intuition
2704# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2706echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2707ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2708#
2709# List of possible output files, starting from the most likely.
2710# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2711# only as a last resort. b.out is created by i960 compilers.
2712ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2713#
2714# The IRIX 6 linker writes into existing files which may not be
2715# executable, retaining their permissions. Remove them first so a
2716# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717ac_rmfiles=
2718for ac_file in $ac_files
2719do
2720 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2723 esac
2724done
2725rm -f $ac_rmfiles
2726
2727if { (ac_try="$ac_link_default"
2728case "(($ac_try" in
2729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2730 *) ac_try_echo=$ac_try;;
2731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2738# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2739# in a Makefile. We should not override ac_cv_exeext if it was cached,
2740# so that the user can short-circuit this test for compilers unknown to
2741# Autoconf.
2742for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002743do
2744 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002747 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749 # We found the default executable, but exeext='' is most
2750 # certainly right.
2751 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002752 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2754 then :; else
2755 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2756 fi
2757 # We set ac_cv_exeext here because the later test for it is not
2758 # safe: cross compilers may not add the suffix if given an `-o'
2759 # argument, so we may need to know it at that point already.
2760 # Even if this section looks crufty: it has the advantage of
2761 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002763 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002764 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767test "$ac_cv_exeext" = no && ac_cv_exeext=
2768
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 ac_file=''
2771fi
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ echo "$as_me:$LINENO: result: $ac_file" >&5
2774echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002777sed 's/^/| /' conftest.$ac_ext >&5
2778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002780See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002781echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002782See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002783 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002784fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002785
Martin v. Löwis11437992002-04-12 09:54:03 +00002786ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002789# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2791echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002792# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2793# If not cross compiling, check that we can run a simple program.
2794if test "$cross_compiling" != yes; then
2795 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 { (case "(($ac_try" in
2797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2798 *) ac_try_echo=$ac_try;;
2799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 (exit $ac_status); }; }; then
2805 cross_compiling=no
2806 else
2807 if test "$cross_compiling" = maybe; then
2808 cross_compiling=yes
2809 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002811If you meant to cross compile, use \`--host'.
2812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002814If you meant to cross compile, use \`--host'.
2815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 fi
2818 fi
2819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002820{ echo "$as_me:$LINENO: result: yes" >&5
2821echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002824ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002826# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002827{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2828echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2829{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2830echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2833echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834if { (ac_try="$ac_link"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 (exit $ac_status); }; then
2844 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2845# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2846# work properly (i.e., refer to `conftest.exe'), while it won't with
2847# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002848for ac_file in conftest.exe conftest conftest.*; do
2849 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002853 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 * ) break;;
2855 esac
2856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002863fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002864
Martin v. Löwis11437992002-04-12 09:54:03 +00002865rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2867echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
2869rm -f conftest.$ac_ext
2870EXEEXT=$ac_cv_exeext
2871ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2873echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002874if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002876else
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002878/* confdefs.h. */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Martin v. Löwis11437992002-04-12 09:54:03 +00002884int
2885main ()
2886{
2887
2888 ;
2889 return 0;
2890}
2891_ACEOF
2892rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893if { (ac_try="$ac_compile"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903 for ac_file in conftest.o conftest.obj conftest.*; do
2904 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2908 break;;
2909 esac
2910done
2911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002913sed 's/^/| /' conftest.$ac_ext >&5
2914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002916See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002918See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002919 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920fi
2921
2922rm -f conftest.$ac_cv_objext conftest.$ac_ext
2923fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002924{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2925echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002926OBJEXT=$ac_cv_objext
2927ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002928{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2929echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002930if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002932else
2933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002934/* confdefs.h. */
2935_ACEOF
2936cat confdefs.h >>conftest.$ac_ext
2937cat >>conftest.$ac_ext <<_ACEOF
2938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940int
2941main ()
2942{
2943#ifndef __GNUC__
2944 choke me
2945#endif
2946
2947 ;
2948 return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952if { (ac_try="$ac_compile"
2953case "(($ac_try" in
2954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955 *) ac_try_echo=$ac_try;;
2956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002960 grep -v '^ *+' conftest.er1 >conftest.err
2961 rm -f conftest.er1
2962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964 (exit $ac_status); } && {
2965 test -z "$ac_c_werror_flag" ||
2966 test ! -s conftest.err
2967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 ac_compiler_gnu=yes
2969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002971sed 's/^/| /' conftest.$ac_ext >&5
2972
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975
2976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_cv_c_compiler_gnu=$ac_compiler_gnu
2978
2979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2981echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2982GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002983ac_test_CFLAGS=${CFLAGS+set}
2984ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002985{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2986echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002987if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002989else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990 ac_save_c_werror_flag=$ac_c_werror_flag
2991 ac_c_werror_flag=yes
2992 ac_cv_prog_cc_g=no
2993 CFLAGS="-g"
2994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001int
3002main ()
3003{
3004
3005 ;
3006 return 0;
3007}
3008_ACEOF
3009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010if { (ac_try="$ac_compile"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003018 grep -v '^ *+' conftest.er1 >conftest.err
3019 rm -f conftest.er1
3020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022 (exit $ac_status); } && {
3023 test -z "$ac_c_werror_flag" ||
3024 test ! -s conftest.err
3025 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003026 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003029sed 's/^/| /' conftest.$ac_ext >&5
3030
Martin v. Löwiseba40652007-08-30 20:10:57 +00003031 CFLAGS=""
3032 cat >conftest.$ac_ext <<_ACEOF
3033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
3038
3039int
3040main ()
3041{
3042
3043 ;
3044 return 0;
3045}
3046_ACEOF
3047rm -f conftest.$ac_objext
3048if { (ac_try="$ac_compile"
3049case "(($ac_try" in
3050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051 *) ac_try_echo=$ac_try;;
3052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (eval "$ac_compile") 2>conftest.er1
3055 ac_status=$?
3056 grep -v '^ *+' conftest.er1 >conftest.err
3057 rm -f conftest.er1
3058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060 (exit $ac_status); } && {
3061 test -z "$ac_c_werror_flag" ||
3062 test ! -s conftest.err
3063 } && test -s conftest.$ac_objext; then
3064 :
3065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003066 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067sed 's/^/| /' conftest.$ac_ext >&5
3068
3069 ac_c_werror_flag=$ac_save_c_werror_flag
3070 CFLAGS="-g"
3071 cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h. */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h. */
3077
3078int
3079main ()
3080{
3081
3082 ;
3083 return 0;
3084}
3085_ACEOF
3086rm -f conftest.$ac_objext
3087if { (ac_try="$ac_compile"
3088case "(($ac_try" in
3089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3090 *) ac_try_echo=$ac_try;;
3091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (eval "$ac_compile") 2>conftest.er1
3094 ac_status=$?
3095 grep -v '^ *+' conftest.er1 >conftest.err
3096 rm -f conftest.er1
3097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099 (exit $ac_status); } && {
3100 test -z "$ac_c_werror_flag" ||
3101 test ! -s conftest.err
3102 } && test -s conftest.$ac_objext; then
3103 ac_cv_prog_cc_g=yes
3104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003105 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106sed 's/^/| /' conftest.$ac_ext >&5
3107
3108
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113
3114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3115fi
3116
3117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3118 ac_c_werror_flag=$ac_save_c_werror_flag
3119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003120{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3121echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003124elif test $ac_cv_prog_cc_g = yes; then
3125 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126 CFLAGS="-g -O2"
3127 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003128 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129 fi
3130else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003131 if test "$GCC" = yes; then
3132 CFLAGS="-O2"
3133 else
3134 CFLAGS=
3135 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003137{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3138echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003140 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003141else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003143ac_save_CC=$CC
3144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#include <stdarg.h>
3151#include <stdio.h>
3152#include <sys/types.h>
3153#include <sys/stat.h>
3154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3155struct buf { int x; };
3156FILE * (*rcsopen) (struct buf *, struct stat *, int);
3157static char *e (p, i)
3158 char **p;
3159 int i;
3160{
3161 return p[i];
3162}
3163static char *f (char * (*g) (char **, int), char **p, ...)
3164{
3165 char *s;
3166 va_list v;
3167 va_start (v,p);
3168 s = g (p, va_arg (v,int));
3169 va_end (v);
3170 return s;
3171}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172
3173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3174 function prototypes and stuff, but not '\xHH' hex character constants.
3175 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003177 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3178 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3183 inside strings and character constants. */
3184#define FOO(x) 'x'
3185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187int test (int i, double x);
3188struct s1 {int (*f) (int a);};
3189struct s2 {int (*f) (double a);};
3190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3191int argc;
3192char **argv;
3193int
3194main ()
3195{
3196return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3197 ;
3198 return 0;
3199}
3200_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3202 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003203do
3204 CC="$ac_save_CC $ac_arg"
3205 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206if { (ac_try="$ac_compile"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003214 grep -v '^ *+' conftest.er1 >conftest.err
3215 rm -f conftest.er1
3216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 (exit $ac_status); } && {
3219 test -z "$ac_c_werror_flag" ||
3220 test ! -s conftest.err
3221 } && test -s conftest.$ac_objext; then
3222 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003225sed 's/^/| /' conftest.$ac_ext >&5
3226
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229
3230rm -f core conftest.err conftest.$ac_objext
3231 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003232done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003234CC=$ac_save_CC
3235
3236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237# AC_CACHE_VAL
3238case "x$ac_cv_prog_cc_c89" in
3239 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003240 { echo "$as_me:$LINENO: result: none needed" >&5
3241echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 { echo "$as_me:$LINENO: result: unsupported" >&5
3244echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003245 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3248echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003249esac
3250
Skip Montanaro6dead952003-09-25 14:50:04 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252ac_ext=c
3253ac_cpp='$CPP $CPPFLAGS'
3254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3256ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003258
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
3260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003261{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3262echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003267
3268 case $withval in
3269 no) with_cxx_main=no
3270 MAINCC='$(CC)';;
3271 yes) with_cxx_main=yes
3272 MAINCC='$(CXX)';;
3273 *) with_cxx_main=yes
3274 MAINCC=$withval
3275 if test -z "$CXX"
3276 then
3277 CXX=$withval
3278 fi;;
3279 esac
3280else
3281
3282 with_cxx_main=no
3283 MAINCC='$(CC)'
3284
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285fi
3286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003287{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3288echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003289
3290preset_cxx="$CXX"
3291if test -z "$CXX"
3292then
3293 case "$CC" in
3294 gcc) # Extract the first word of "g++", so it can be a program name with args.
3295set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300else
3301 case $CXX in
3302 [\\/]* | ?:[\\/]*)
3303 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3304 ;;
3305 *)
3306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in notfound
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
3311 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312 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 +00003313 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315 break 2
3316 fi
3317done
3318done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320
3321 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3322 ;;
3323esac
3324fi
3325CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327 { echo "$as_me:$LINENO: result: $CXX" >&5
3328echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 { echo "$as_me:$LINENO: result: no" >&5
3331echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334 ;;
3335 cc) # Extract the first word of "c++", so it can be a program name with args.
3336set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341else
3342 case $CXX in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3345 ;;
3346 *)
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in notfound
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353 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 +00003354 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003356 break 2
3357 fi
3358done
3359done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361
3362 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3363 ;;
3364esac
3365fi
3366CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003368 { echo "$as_me:$LINENO: result: $CXX" >&5
3369echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371 { echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003374
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375 ;;
3376 esac
3377 if test "$CXX" = "notfound"
3378 then
3379 CXX=""
3380 fi
3381fi
3382if test -z "$CXX"
3383then
3384 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3385do
3386 # Extract the first word of "$ac_prog", so it can be a program name with args.
3387set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003388{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
3393 if test -n "$CXX"; then
3394 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3395else
3396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
3401 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 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 +00003403 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003405 break 2
3406 fi
3407done
3408done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410
3411fi
3412fi
3413CXX=$ac_cv_prog_CXX
3414if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003415 { echo "$as_me:$LINENO: result: $CXX" >&5
3416echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003418 { echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003420fi
3421
Martin v. Löwiseba40652007-08-30 20:10:57 +00003422
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423 test -n "$CXX" && break
3424done
3425test -n "$CXX" || CXX="notfound"
3426
3427 if test "$CXX" = "notfound"
3428 then
3429 CXX=""
3430 fi
3431fi
3432if test "$preset_cxx" != "$CXX"
3433then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003434 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003435
3436 By default, distutils will build C++ extension modules with \"$CXX\".
3437 If this is not intended, then set CXX on the configure command line.
3438 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003439echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003440
3441 By default, distutils will build C++ extension modules with \"$CXX\".
3442 If this is not intended, then set CXX on the configure command line.
3443 " >&2;}
3444fi
3445
3446
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
3449ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003454{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3455echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003456# On Suns, sometimes $CPP names a directory.
3457if test -n "$CPP" && test -d "$CPP"; then
3458 CPP=
3459fi
3460if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 # Double quotes because CPP needs to be expanded
3465 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3466 do
3467 ac_preproc_ok=false
3468for ac_c_preproc_warn_flag in '' yes
3469do
3470 # Use a header file that comes with gcc, so configuring glibc
3471 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3473 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # not just through cpp. "Syntax error" is here to catch this case.
3476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003477/* confdefs.h. */
3478_ACEOF
3479cat confdefs.h >>conftest.$ac_ext
3480cat >>conftest.$ac_ext <<_ACEOF
3481/* end confdefs.h. */
3482#ifdef __STDC__
3483# include <limits.h>
3484#else
3485# include <assert.h>
3486#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003487 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003488_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489if { (ac_try="$ac_cpp conftest.$ac_ext"
3490case "(($ac_try" in
3491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492 *) ac_try_echo=$ac_try;;
3493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003497 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 rm -f conftest.er1
3499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501 (exit $ac_status); } >/dev/null && {
3502 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3503 test ! -s conftest.err
3504 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003505 :
3506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003508sed 's/^/| /' conftest.$ac_ext >&5
3509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: fails on valid input.
3511continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # can be detected and how.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003524#include <ac_nonexistent.h>
3525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526if { (ac_try="$ac_cpp conftest.$ac_ext"
3527case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003534 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 rm -f conftest.er1
3536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538 (exit $ac_status); } >/dev/null && {
3539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3540 test ! -s conftest.err
3541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Broken: success on invalid input.
3543continue
3544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003546sed 's/^/| /' conftest.$ac_ext >&5
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # Passes both tests.
3549ac_preproc_ok=:
3550break
3551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f conftest.err conftest.$ac_ext
3554
3555done
3556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3557rm -f conftest.err conftest.$ac_ext
3558if $ac_preproc_ok; then
3559 break
3560fi
3561
3562 done
3563 ac_cv_prog_CPP=$CPP
3564
3565fi
3566 CPP=$ac_cv_prog_CPP
3567else
3568 ac_cv_prog_CPP=$CPP
3569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003570{ echo "$as_me:$LINENO: result: $CPP" >&5
3571echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_preproc_ok=false
3573for ac_c_preproc_warn_flag in '' yes
3574do
3575 # Use a header file that comes with gcc, so configuring glibc
3576 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3578 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # On the NeXT, cc -E runs the code through the compiler's parser,
3580 # not just through cpp. "Syntax error" is here to catch this case.
3581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003582/* confdefs.h. */
3583_ACEOF
3584cat confdefs.h >>conftest.$ac_ext
3585cat >>conftest.$ac_ext <<_ACEOF
3586/* end confdefs.h. */
3587#ifdef __STDC__
3588# include <limits.h>
3589#else
3590# include <assert.h>
3591#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003592 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003593_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594if { (ac_try="$ac_cpp conftest.$ac_ext"
3595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003602 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 rm -f conftest.er1
3604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 (exit $ac_status); } >/dev/null && {
3607 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608 test ! -s conftest.err
3609 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 :
3611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003613sed 's/^/| /' conftest.$ac_ext >&5
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: fails on valid input.
3616continue
3617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619rm -f conftest.err conftest.$ac_ext
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # can be detected and how.
3623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003629#include <ac_nonexistent.h>
3630_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631if { (ac_try="$ac_cpp conftest.$ac_ext"
3632case "(($ac_try" in
3633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3634 *) ac_try_echo=$ac_try;;
3635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 rm -f conftest.er1
3641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643 (exit $ac_status); } >/dev/null && {
3644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3645 test ! -s conftest.err
3646 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Broken: success on invalid input.
3648continue
3649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003651sed 's/^/| /' conftest.$ac_ext >&5
3652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 # Passes both tests.
3654ac_preproc_ok=:
3655break
3656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658rm -f conftest.err conftest.$ac_ext
3659
3660done
3661# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3662rm -f conftest.err conftest.$ac_ext
3663if $ac_preproc_ok; then
3664 :
3665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003668echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672
3673ac_ext=c
3674ac_cpp='$CPP $CPPFLAGS'
3675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3677ac_compiler_gnu=$ac_cv_c_compiler_gnu
3678
3679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003680{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3681echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 # Extract the first word of "grep ggrep" to use in msg output
3686if test -z "$GREP"; then
3687set dummy grep ggrep; ac_prog_name=$2
3688if test "${ac_cv_path_GREP+set}" = set; then
3689 echo $ECHO_N "(cached) $ECHO_C" >&6
3690else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003692# Loop through the user's path and test for each of PROGNAME-LIST
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
3698 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3701 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3702 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 # Check for GNU $ac_path_GREP
3704case `"$ac_path_GREP" --version 2>&1` in
3705*GNU*)
3706 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3707*)
3708 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 while :
3711 do
3712 cat "conftest.in" "conftest.in" >"conftest.tmp"
3713 mv "conftest.tmp" "conftest.in"
3714 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003715 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3717 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3718 ac_count=`expr $ac_count + 1`
3719 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3720 # Best one so far, save it but keep looking for a better one
3721 ac_cv_path_GREP="$ac_path_GREP"
3722 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003723 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 # 10*(2^10) chars as input seems more than enough
3725 test $ac_count -gt 10 && break
3726 done
3727 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3728esac
3729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730
3731 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732 done
3733done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003734
3735done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003737
3738
3739fi
3740
3741GREP="$ac_cv_path_GREP"
3742if test -z "$GREP"; then
3743 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3744echo "$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 +00003745 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746fi
3747
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748else
3749 ac_cv_path_GREP=$GREP
3750fi
3751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3755echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 GREP="$ac_cv_path_GREP"
3757
3758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759{ echo "$as_me:$LINENO: checking for egrep" >&5
3760echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763else
3764 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3765 then ac_cv_path_EGREP="$GREP -E"
3766 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 # Extract the first word of "egrep" to use in msg output
3768if test -z "$EGREP"; then
3769set dummy egrep; ac_prog_name=$2
3770if test "${ac_cv_path_EGREP+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003774# Loop through the user's path and test for each of PROGNAME-LIST
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
3780 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
3782 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3783 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3784 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 # Check for GNU $ac_path_EGREP
3786case `"$ac_path_EGREP" --version 2>&1` in
3787*GNU*)
3788 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3789*)
3790 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 while :
3793 do
3794 cat "conftest.in" "conftest.in" >"conftest.tmp"
3795 mv "conftest.tmp" "conftest.in"
3796 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003797 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3799 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3800 ac_count=`expr $ac_count + 1`
3801 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3802 # Best one so far, save it but keep looking for a better one
3803 ac_cv_path_EGREP="$ac_path_EGREP"
3804 ac_path_EGREP_max=$ac_count
3805 fi
3806 # 10*(2^10) chars as input seems more than enough
3807 test $ac_count -gt 10 && break
3808 done
3809 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3810esac
3811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814 done
3815done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003816
3817done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003819
3820
3821fi
3822
3823EGREP="$ac_cv_path_EGREP"
3824if test -z "$EGREP"; then
3825 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3826echo "$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 +00003827 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828fi
3829
Martin v. Löwiseba40652007-08-30 20:10:57 +00003830else
3831 ac_cv_path_EGREP=$EGREP
3832fi
3833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003834
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 fi
3836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3838echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003840
3841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842
3843{ echo "$as_me:$LINENO: checking for AIX" >&5
3844echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3845cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846/* confdefs.h. */
3847_ACEOF
3848cat confdefs.h >>conftest.$ac_ext
3849cat >>conftest.$ac_ext <<_ACEOF
3850/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003851#ifdef _AIX
3852 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003853#endif
3854
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003855_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857 $EGREP "yes" >/dev/null 2>&1; then
3858 { echo "$as_me:$LINENO: result: yes" >&5
3859echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003860cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003861#define _ALL_SOURCE 1
3862_ACEOF
3863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003864else
3865 { echo "$as_me:$LINENO: result: no" >&5
3866echo "${ECHO_T}no" >&6; }
3867fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00003868rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870
3871
3872# Check for unsupported systems
3873case $ac_sys_system/$ac_sys_release in
3874atheos*|Linux*/1*)
3875 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3876 echo See README for details.
3877 exit 1;;
3878esac
3879
3880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003881{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3882echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003883
3884# Check whether --with-suffix was given.
3885if test "${with_suffix+set}" = set; then
3886 withval=$with_suffix;
3887 case $withval in
3888 no) EXEEXT=;;
3889 yes) EXEEXT=.exe;;
3890 *) EXEEXT=$withval;;
3891 esac
3892fi
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3895echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896
3897# Test whether we're running on a non-case-sensitive system, in which
3898# case we give a warning if no ext is given
3899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3901echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902if test ! -d CaseSensitiveTestDir; then
3903mkdir CaseSensitiveTestDir
3904fi
3905
3906if test -d casesensitivetestdir
3907then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003908 { echo "$as_me:$LINENO: result: yes" >&5
3909echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003910 BUILDEXEEXT=.exe
3911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912 { echo "$as_me:$LINENO: result: no" >&5
3913echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003914 BUILDEXEEXT=$EXEEXT
3915fi
3916rmdir CaseSensitiveTestDir
3917
3918case $MACHDEP in
3919bsdos*)
3920 case $CC in
3921 gcc) CC="$CC -D_HAVE_BSDI";;
3922 esac;;
3923esac
3924
3925case $ac_sys_system in
3926hp*|HP*)
3927 case $CC in
3928 cc|*/cc) CC="$CC -Ae";;
3929 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930SunOS*)
3931 # Some functions have a prototype only with that define, e.g. confstr
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define __EXTENSIONS__ 1
3935_ACEOF
3936
3937 ;;
3938esac
3939
3940
3941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3943echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944if test -z "$LIBRARY"
3945then
3946 LIBRARY='libpython$(VERSION).a'
3947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003948{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3949echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003950
3951# LDLIBRARY is the name of the library to link against (as opposed to the
3952# name of the library into which to insert object files). BLDLIBRARY is also
3953# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3954# is blank as the main program is not linked directly against LDLIBRARY.
3955# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3956# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3957# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3958# DLLLIBRARY is the shared (i.e., DLL) library.
3959#
3960# RUNSHARED is used to run shared python without installed libraries
3961#
3962# INSTSONAME is the name of the shared library that will be use to install
3963# on the system - some systems like version suffix, others don't
3964
3965
3966
3967
3968
3969
3970LDLIBRARY="$LIBRARY"
3971BLDLIBRARY='$(LDLIBRARY)'
3972INSTSONAME='$(LDLIBRARY)'
3973DLLLIBRARY=''
3974LDLIBRARYDIR=''
3975RUNSHARED=''
3976
3977# LINKCC is the command that links the python executable -- default is $(CC).
3978# If CXX is set, and if it is needed to link a main function that was
3979# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3980# python might then depend on the C++ runtime
3981# This is altered for AIX in order to build the export list before
3982# linking.
3983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003984{ echo "$as_me:$LINENO: checking LINKCC" >&5
3985echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003986if test -z "$LINKCC"
3987then
3988 LINKCC='$(PURIFY) $(MAINCC)'
3989 case $ac_sys_system in
3990 AIX*)
3991 exp_extra="\"\""
3992 if test $ac_sys_release -ge 5 -o \
3993 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3994 exp_extra="."
3995 fi
3996 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003997 QNX*)
3998 # qcc must be used because the other compilers do not
3999 # support -N.
4000 LINKCC=qcc;;
4001 esac
4002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004003{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4004echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004005
4006# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4007# make sure we default having it set to "no": this is used by
4008# distutils.unixccompiler to know if it should add --enable-new-dtags
4009# to linker command lines, and failing to detect GNU ld simply results
4010# in the same bahaviour as before.
4011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004012{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4013echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004014ac_prog=ld
4015if test "$GCC" = yes; then
4016 ac_prog=`$CC -print-prog-name=ld`
4017fi
4018case `"$ac_prog" -V 2>&1 < /dev/null` in
4019 *GNU*)
4020 GNULD=yes;;
4021 *)
4022 GNULD=no;;
4023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004024{ echo "$as_me:$LINENO: result: $GNULD" >&5
4025echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004027{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4028echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004029# Check whether --enable-shared was given.
4030if test "${enable_shared+set}" = set; then
4031 enableval=$enable_shared;
4032fi
4033
4034
4035if test -z "$enable_shared"
4036then
4037 case $ac_sys_system in
4038 CYGWIN* | atheos*)
4039 enable_shared="yes";;
4040 *)
4041 enable_shared="no";;
4042 esac
4043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004044{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4045echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004047{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4048echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004049# Check whether --enable-profiling was given.
4050if test "${enable_profiling+set}" = set; then
4051 enableval=$enable_profiling; ac_save_cc="$CC"
4052 CC="$CC -pg"
4053 if test "$cross_compiling" = yes; then
4054 ac_enable_profiling="no"
4055else
4056 cat >conftest.$ac_ext <<_ACEOF
4057/* confdefs.h. */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h. */
4062int main() { return 0; }
4063_ACEOF
4064rm -f conftest$ac_exeext
4065if { (ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004071 (eval "$ac_link") 2>&5
4072 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4075 { (case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080 (eval "$ac_try") 2>&5
4081 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083 (exit $ac_status); }; }; then
4084 ac_enable_profiling="yes"
4085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086 echo "$as_me: program exited with status $ac_status" >&5
4087echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090( exit $ac_status )
4091ac_enable_profiling="no"
4092fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4094fi
4095
4096
4097 CC="$ac_save_cc"
4098fi
4099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004100{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4101echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102
4103case "$ac_enable_profiling" in
4104 "yes")
4105 BASECFLAGS="-pg $BASECFLAGS"
4106 LDFLAGS="-pg $LDFLAGS"
4107 ;;
4108esac
4109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004110{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4111echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112
4113# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4114# library that we build, but we do not want to link against it (we
4115# will find it with a -framework option). For this reason there is an
4116# extra variable BLDLIBRARY against which Python and the extension
4117# modules are linked, BLDLIBRARY. This is normally the same as
4118# LDLIBRARY, but empty for MacOSX framework builds.
4119if test "$enable_framework"
4120then
4121 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4122 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4123 BLDLIBRARY=''
4124else
4125 BLDLIBRARY='$(LDLIBRARY)'
4126fi
4127
4128# Other platforms follow
4129if test $enable_shared = "yes"; then
4130
4131cat >>confdefs.h <<\_ACEOF
4132#define Py_ENABLE_SHARED 1
4133_ACEOF
4134
4135 case $ac_sys_system in
4136 BeOS*)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 ;;
4139 CYGWIN*)
4140 LDLIBRARY='libpython$(VERSION).dll.a'
4141 DLLLIBRARY='libpython$(VERSION).dll'
4142 ;;
4143 SunOS*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 INSTSONAME="$LDLIBRARY".$SOVERSION
4148 ;;
4149 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4150 LDLIBRARY='libpython$(VERSION).so'
4151 BLDLIBRARY='-L. -lpython$(VERSION)'
4152 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4153 case $ac_sys_system in
4154 FreeBSD*)
4155 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4156 ;;
4157 esac
4158 INSTSONAME="$LDLIBRARY".$SOVERSION
4159 ;;
4160 hp*|HP*)
4161 case `uname -m` in
4162 ia64)
4163 LDLIBRARY='libpython$(VERSION).so'
4164 ;;
4165 *)
4166 LDLIBRARY='libpython$(VERSION).sl'
4167 ;;
4168 esac
4169 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4170 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4171 ;;
4172 OSF*)
4173 LDLIBRARY='libpython$(VERSION).so'
4174 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4176 ;;
4177 atheos*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-L. -lpython$(VERSION)'
4180 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4181 ;;
4182 Darwin*)
4183 LDLIBRARY='libpython$(VERSION).dylib'
4184 BLDLIBRARY='-L. -lpython$(VERSION)'
4185 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4186 ;;
4187
4188 esac
4189else # shared is disabled
4190 case $ac_sys_system in
4191 CYGWIN*)
4192 BLDLIBRARY='$(LIBRARY)'
4193 LDLIBRARY='libpython$(VERSION).dll.a'
4194 ;;
4195 esac
4196fi
4197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4199echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200
4201if test -n "$ac_tool_prefix"; then
4202 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4203set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004206if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004208else
4209 if test -n "$RANLIB"; then
4210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229RANLIB=$ac_cv_prog_RANLIB
4230if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4232echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004236fi
4237
4238
4239fi
4240if test -z "$ac_cv_prog_RANLIB"; then
4241 ac_ct_RANLIB=$RANLIB
4242 # Extract the first word of "ranlib", so it can be a program name with args.
4243set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004244{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004246if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004247 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004248else
4249 if test -n "$ac_ct_RANLIB"; then
4250 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4251else
4252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255 IFS=$as_save_IFS
4256 test -z "$as_dir" && as_dir=.
4257 for ac_exec_ext in '' $ac_executable_extensions; do
4258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004261 break 2
4262 fi
4263done
4264done
4265IFS=$as_save_IFS
4266
4267fi
4268fi
4269ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4270if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004271 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4272echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004274 { echo "$as_me:$LINENO: result: no" >&5
4275echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004276fi
4277
4278 if test "x$ac_ct_RANLIB" = x; then
4279 RANLIB=":"
4280 else
4281 case $cross_compiling:$ac_tool_warned in
4282yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004283{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4284whose name does not start with the host triplet. If you think this
4285configuration is useful to you, please write to autoconf@gnu.org." >&5
4286echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4287whose name does not start with the host triplet. If you think this
4288configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004289ac_tool_warned=yes ;;
4290esac
4291 RANLIB=$ac_ct_RANLIB
4292 fi
4293else
4294 RANLIB="$ac_cv_prog_RANLIB"
4295fi
4296
4297
4298for ac_prog in ar aal
4299do
4300 # Extract the first word of "$ac_prog", so it can be a program name with args.
4301set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
4307 if test -n "$AR"; then
4308 ac_cv_prog_AR="$AR" # Let the user override the test.
4309else
4310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313 IFS=$as_save_IFS
4314 test -z "$as_dir" && as_dir=.
4315 for ac_exec_ext in '' $ac_executable_extensions; do
4316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4317 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004319 break 2
4320 fi
4321done
4322done
4323IFS=$as_save_IFS
4324
4325fi
4326fi
4327AR=$ac_cv_prog_AR
4328if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004329 { echo "$as_me:$LINENO: result: $AR" >&5
4330echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004332 { echo "$as_me:$LINENO: result: no" >&5
4333echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004334fi
4335
4336
4337 test -n "$AR" && break
4338done
4339test -n "$AR" || AR="ar"
4340
4341
4342# tweak ARFLAGS only if the user didn't set it on the command line
4343
4344if test -z "$ARFLAGS"
4345then
4346 ARFLAGS="rc"
4347fi
4348
4349
4350# Extract the first word of "svnversion", so it can be a program name with args.
4351set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004355 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004356else
4357 if test -n "$SVNVERSION"; then
4358 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4359else
4360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363 IFS=$as_save_IFS
4364 test -z "$as_dir" && as_dir=.
4365 for ac_exec_ext in '' $ac_executable_extensions; do
4366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004369 break 2
4370 fi
4371done
4372done
4373IFS=$as_save_IFS
4374
4375 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4376fi
4377fi
4378SVNVERSION=$ac_cv_prog_SVNVERSION
4379if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004380 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4381echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383 { echo "$as_me:$LINENO: result: no" >&5
4384echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385fi
4386
4387
4388if test $SVNVERSION = found
4389then
4390 SVNVERSION="svnversion \$(srcdir)"
4391else
4392 SVNVERSION="echo Unversioned directory"
4393fi
4394
4395case $MACHDEP in
4396bsdos*|hp*|HP*)
4397 # install -d does not work on BSDI or HP-UX
4398 if test -z "$INSTALL"
4399 then
4400 INSTALL="${srcdir}/install-sh -c"
4401 fi
4402esac
4403ac_aux_dir=
4404for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4405 if test -f "$ac_dir/install-sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install-sh -c"
4408 break
4409 elif test -f "$ac_dir/install.sh"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/install.sh -c"
4412 break
4413 elif test -f "$ac_dir/shtool"; then
4414 ac_aux_dir=$ac_dir
4415 ac_install_sh="$ac_aux_dir/shtool install -c"
4416 break
4417 fi
4418done
4419if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004420 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4421echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004422 { (exit 1); exit 1; }; }
4423fi
4424
4425# These three variables are undocumented and unsupported,
4426# and are intended to be withdrawn in a future Autoconf release.
4427# They can cause serious problems if a builder's source tree is in a directory
4428# whose full name contains unusual characters.
4429ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4430ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4431ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4432
4433
4434# Find a good install program. We prefer a C program (faster),
4435# so one script is as good as another. But avoid the broken or
4436# incompatible versions:
4437# SysV /etc/install, /usr/sbin/install
4438# SunOS /usr/etc/install
4439# IRIX /sbin/install
4440# AIX /bin/install
4441# AmigaOS /C/install, which installs bootblocks on floppy discs
4442# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4443# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4444# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4445# OS/2's system install, which has a completely different semantic
4446# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4448echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004449if test -z "$INSTALL"; then
4450if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004451 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004452else
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 # Account for people who put trailing slashes in PATH elements.
4459case $as_dir/ in
4460 ./ | .// | /cC/* | \
4461 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4462 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4463 /usr/ucb/* ) ;;
4464 *)
4465 # OSF1 and SCO ODT 3.0 have their own names for install.
4466 # Don't use installbsd from OSF since it installs stuff as root
4467 # by default.
4468 for ac_prog in ginstall scoinst install; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4471 if test $ac_prog = install &&
4472 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # AIX install. It has an incompatible calling convention.
4474 :
4475 elif test $ac_prog = install &&
4476 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4477 # program-specific install script used by HP pwplus--don't use.
4478 :
4479 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4481 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482 fi
4483 fi
4484 done
4485 done
4486 ;;
4487esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004488done
4489IFS=$as_save_IFS
4490
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492fi
4493 if test "${ac_cv_path_install+set}" = set; then
4494 INSTALL=$ac_cv_path_install
4495 else
4496 # As a last resort, use the slow shell script. Don't cache a
4497 # value for INSTALL within a source directory, because that will
4498 # break other packages using the cache if that directory is
4499 # removed, or if the value is a relative name.
4500 INSTALL=$ac_install_sh
4501 fi
4502fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004503{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4504echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004505
4506# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4507# It thinks the first close brace ends the variable substitution.
4508test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4509
4510test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4511
4512test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4513
4514
4515# Not every filesystem supports hard links
4516
4517if test -z "$LN" ; then
4518 case $ac_sys_system in
4519 BeOS*) LN="ln -s";;
4520 CYGWIN*) LN="ln -s";;
4521 atheos*) LN="ln -s";;
4522 *) LN=ln;;
4523 esac
4524fi
4525
4526# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4528echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004529
4530# Check whether --with-pydebug was given.
4531if test "${with_pydebug+set}" = set; then
4532 withval=$with_pydebug;
4533if test "$withval" != no
4534then
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define Py_DEBUG 1
4538_ACEOF
4539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004540 { echo "$as_me:$LINENO: result: yes" >&5
4541echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004542 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543else { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004547 { echo "$as_me:$LINENO: result: no" >&5
4548echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004549fi
4550
4551
4552# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4553# merged with this chunk of code?
4554
4555# Optimizer/debugger flags
4556# ------------------------
4557# (The following bit of code is complicated enough - please keep things
4558# indented properly. Just pretend you're editing Python code. ;-)
4559
4560# There are two parallel sets of case statements below, one that checks to
4561# see if OPT was set and one that does BASECFLAGS setting based upon
4562# compiler and platform. BASECFLAGS tweaks need to be made even if the
4563# user set OPT.
4564
4565# tweak OPT based on compiler and platform, only if the user didn't set
4566# it on the command line
4567
4568if test -z "$OPT"
4569then
4570 case $GCC in
4571 yes)
4572 if test "$CC" != 'g++' ; then
4573 STRICT_PROTO="-Wstrict-prototypes"
4574 fi
4575 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4576 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4577 WRAP="-fwrapv"
4578 fi
4579 case $ac_cv_prog_cc_g in
4580 yes)
4581 if test "$Py_DEBUG" = 'true' ; then
4582 # Optimization messes up debuggers, so turn it off for
4583 # debug builds.
4584 OPT="-g -Wall $STRICT_PROTO"
4585 else
4586 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4587 fi
4588 ;;
4589 *)
4590 OPT="-O3 -Wall $STRICT_PROTO"
4591 ;;
4592 esac
4593 case $ac_sys_system in
4594 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4595 ;;
4596 esac
4597 ;;
4598
4599 *)
4600 OPT="-O"
4601 ;;
4602 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603fi
4604
4605
4606
4607# The -arch flags for universal builds on OSX
4608UNIVERSAL_ARCH_FLAGS=
4609
4610
4611# tweak BASECFLAGS based on compiler and platform
4612case $GCC in
4613yes)
4614 # Python violates C99 rules, by casting between incompatible
4615 # pointer types. GCC may generate bad code as a result of that,
4616 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004617 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4618echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004619 ac_save_cc="$CC"
4620 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004621 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004624 cat >conftest.$ac_ext <<_ACEOF
4625/* confdefs.h. */
4626_ACEOF
4627cat confdefs.h >>conftest.$ac_ext
4628cat >>conftest.$ac_ext <<_ACEOF
4629/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004630
4631int
4632main ()
4633{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004634int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004635 ;
4636 return 0;
4637}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004638_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004639rm -f conftest.$ac_objext
4640if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004641case "(($ac_try" in
4642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643 *) ac_try_echo=$ac_try;;
4644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004646 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004647 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004648 grep -v '^ *+' conftest.er1 >conftest.err
4649 rm -f conftest.er1
4650 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004652 (exit $ac_status); } && {
4653 test -z "$ac_c_werror_flag" ||
4654 test ! -s conftest.err
4655 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 ac_cv_no_strict_aliasing_ok=yes
4657else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004658 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
Gregory P. Smith373469a2009-11-01 21:03:38 +00004661 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004662fi
4663
Gregory P. Smith373469a2009-11-01 21:03:38 +00004664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004665fi
4666
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004667 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004668 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4669echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670 if test $ac_cv_no_strict_aliasing_ok = yes
4671 then
4672 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4673 fi
4674
4675 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4676 # support. Without this, treatment of subnormals doesn't follow
4677 # the standard.
4678 case $ac_sys_machine in
4679 alpha*)
4680 BASECFLAGS="$BASECFLAGS -mieee"
4681 ;;
4682 esac
4683
4684 case $ac_sys_system in
4685 SCO_SV*)
4686 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4687 ;;
4688 # is there any other compiler on Darwin besides gcc?
4689 Darwin*)
4690 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4691 # used to be here, but non-Apple gcc doesn't accept them.
4692
4693
4694 if test "${enable_universalsdk}"; then
4695 UNIVERSAL_ARCH_FLAGS=""
4696 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4697 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4698 ARCH_RUN_32BIT=""
4699
4700 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4701 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004702 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703
4704 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4706 ARCH_RUN_32BIT="arch -i386 -ppc"
4707
Ronald Oussoren23d92532009-09-07 06:12:00 +00004708 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4709 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4710 ARCH_RUN_32BIT="arch -i386"
4711
4712 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4713 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4714 ARCH_RUN_32BIT="arch -i386 -ppc"
4715
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004717 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4718echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 { (exit 1); exit 1; }; }
4720
4721 fi
4722
4723
4724 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4725 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4726 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4727 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4728 fi
4729 fi
4730
4731 # Calculate the right deployment target for this build.
4732 #
4733 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4734 if test ${cur_target} '>' 10.2; then
4735 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004736 if test ${enable_universalsdk}; then
4737 if test "${UNIVERSAL_ARCHS}" = "all"; then
4738 # Ensure that the default platform for a
4739 # 4-way universal build is OSX 10.5,
4740 # that's the first OS release where
4741 # 4-way builds make sense.
4742 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004743
4744 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4745 cur_target='10.5'
4746
4747 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4748 cur_target='10.5'
4749
4750 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4751 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004752 fi
4753 else
4754 if test `arch` = "i386"; then
4755 # On Intel macs default to a deployment
4756 # target of 10.4, that's the first OSX
4757 # release with Intel support.
4758 cur_target="10.4"
4759 fi
4760 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004761 fi
4762 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4763
4764 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4765 # environment with a value that is the same as what we'll use
4766 # in the Makefile to ensure that we'll get the same compiler
4767 # environment during configure and build time.
4768 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4769 export MACOSX_DEPLOYMENT_TARGET
4770 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4771
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -mieee"
4775 ;;
4776 esac
4777 ;;
4778
4779*)
4780 case $ac_sys_system in
4781 OpenUNIX*|UnixWare*)
4782 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4783 ;;
4784 OSF*)
4785 BASECFLAGS="$BASECFLAGS -ieee -std"
4786 ;;
4787 SCO_SV*)
4788 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4789 ;;
4790 esac
4791 ;;
4792esac
4793
4794if test "$Py_DEBUG" = 'true'; then
4795 :
4796else
4797 OPT="-DNDEBUG $OPT"
4798fi
4799
4800if test "$ac_arch_flags"
4801then
4802 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4803fi
4804
4805# disable check for icc since it seems to pass, but generates a warning
4806if test "$CC" = icc
4807then
4808 ac_cv_opt_olimit_ok=no
4809fi
4810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004811{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4812echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004813if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004814 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004815else
4816 ac_save_cc="$CC"
4817CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004818cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819/* confdefs.h. */
4820_ACEOF
4821cat confdefs.h >>conftest.$ac_ext
4822cat >>conftest.$ac_ext <<_ACEOF
4823/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004824
4825int
4826main ()
4827{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004829 ;
4830 return 0;
4831}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004832_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004833rm -f conftest.$ac_objext
4834if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004835case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004840 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004841 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004842 grep -v '^ *+' conftest.er1 >conftest.err
4843 rm -f conftest.er1
4844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004846 (exit $ac_status); } && {
4847 test -z "$ac_c_werror_flag" ||
4848 test ! -s conftest.err
4849 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004850 ac_cv_opt_olimit_ok=yes
4851else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004852 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004853sed 's/^/| /' conftest.$ac_ext >&5
4854
Gregory P. Smith373469a2009-11-01 21:03:38 +00004855 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856fi
4857
Gregory P. Smith373469a2009-11-01 21:03:38 +00004858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004859CC="$ac_save_cc"
4860fi
4861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004862{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4863echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864if test $ac_cv_opt_olimit_ok = yes; then
4865 case $ac_sys_system in
4866 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4867 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4868 # environment?
4869 Darwin*)
4870 ;;
4871 *)
4872 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4873 ;;
4874 esac
4875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004876 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4877echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004879 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880else
4881 ac_save_cc="$CC"
4882 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883 cat >conftest.$ac_ext <<_ACEOF
4884/* confdefs.h. */
4885_ACEOF
4886cat confdefs.h >>conftest.$ac_ext
4887cat >>conftest.$ac_ext <<_ACEOF
4888/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004889
4890int
4891main ()
4892{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004894 ;
4895 return 0;
4896}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004898rm -f conftest.$ac_objext
4899if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900case "(($ac_try" in
4901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4902 *) ac_try_echo=$ac_try;;
4903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004905 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004906 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004907 grep -v '^ *+' conftest.er1 >conftest.err
4908 rm -f conftest.er1
4909 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004911 (exit $ac_status); } && {
4912 test -z "$ac_c_werror_flag" ||
4913 test ! -s conftest.err
4914 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915 ac_cv_olimit_ok=yes
4916else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004917 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918sed 's/^/| /' conftest.$ac_ext >&5
4919
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921fi
4922
Gregory P. Smith373469a2009-11-01 21:03:38 +00004923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 CC="$ac_save_cc"
4925fi
4926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004927 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4928echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929 if test $ac_cv_olimit_ok = yes; then
4930 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4931 fi
4932fi
4933
4934# Check whether GCC supports PyArg_ParseTuple format
4935if test "$GCC" = "yes"
4936then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004937 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4938echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004939 save_CFLAGS=$CFLAGS
4940 CFLAGS="$CFLAGS -Werror"
4941 cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
4947
4948 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4949
4950int
4951main ()
4952{
4953
4954 ;
4955 return 0;
4956}
4957_ACEOF
4958rm -f conftest.$ac_objext
4959if { (ac_try="$ac_compile"
4960case "(($ac_try" in
4961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4962 *) ac_try_echo=$ac_try;;
4963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965 (eval "$ac_compile") 2>conftest.er1
4966 ac_status=$?
4967 grep -v '^ *+' conftest.er1 >conftest.err
4968 rm -f conftest.er1
4969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004971 (exit $ac_status); } && {
4972 test -z "$ac_c_werror_flag" ||
4973 test ! -s conftest.err
4974 } && test -s conftest.$ac_objext; then
4975
4976cat >>confdefs.h <<\_ACEOF
4977#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4978_ACEOF
4979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004980 { echo "$as_me:$LINENO: result: yes" >&5
4981echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004983 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004984sed 's/^/| /' conftest.$ac_ext >&5
4985
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004986 { echo "$as_me:$LINENO: result: no" >&5
4987echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988
4989fi
4990
4991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4992 CFLAGS=$save_CFLAGS
4993fi
4994
4995# On some compilers, pthreads are available without further options
4996# (e.g. MacOS X). On some of these systems, the compiler will not
4997# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4998# So we have to see first whether pthreads are available without
4999# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005000{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5001echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005003 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005004else
5005 if test "$cross_compiling" = yes; then
5006 ac_cv_pthread_is_default=no
5007else
5008 cat >conftest.$ac_ext <<_ACEOF
5009/* confdefs.h. */
5010_ACEOF
5011cat confdefs.h >>conftest.$ac_ext
5012cat >>conftest.$ac_ext <<_ACEOF
5013/* end confdefs.h. */
5014
5015#include <pthread.h>
5016
5017void* routine(void* p){return NULL;}
5018
5019int main(){
5020 pthread_t p;
5021 if(pthread_create(&p,NULL,routine,NULL)!=0)
5022 return 1;
5023 (void)pthread_detach(p);
5024 return 0;
5025}
5026
5027_ACEOF
5028rm -f conftest$ac_exeext
5029if { (ac_try="$ac_link"
5030case "(($ac_try" in
5031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5032 *) ac_try_echo=$ac_try;;
5033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035 (eval "$ac_link") 2>&5
5036 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5039 { (case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 (eval "$ac_try") 2>&5
5045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 (exit $ac_status); }; }; then
5048
5049 ac_cv_pthread_is_default=yes
5050 ac_cv_kthread=no
5051 ac_cv_pthread=no
5052
5053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005054 echo "$as_me: program exited with status $ac_status" >&5
5055echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056sed 's/^/| /' conftest.$ac_ext >&5
5057
5058( exit $ac_status )
5059ac_cv_pthread_is_default=no
5060fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5062fi
5063
5064
5065
5066fi
5067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005068{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5069echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005070
5071
5072if test $ac_cv_pthread_is_default = yes
5073then
5074 ac_cv_kpthread=no
5075else
5076# -Kpthread, if available, provides the right #defines
5077# and linker options to make pthread_create available
5078# Some compilers won't report that they do not support -Kpthread,
5079# so we need to run a program to see whether it really made the
5080# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005081{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5082echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005083if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005084 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005085else
5086 ac_save_cc="$CC"
5087CC="$CC -Kpthread"
5088if test "$cross_compiling" = yes; then
5089 ac_cv_kpthread=no
5090else
5091 cat >conftest.$ac_ext <<_ACEOF
5092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
5097
5098#include <pthread.h>
5099
5100void* routine(void* p){return NULL;}
5101
5102int main(){
5103 pthread_t p;
5104 if(pthread_create(&p,NULL,routine,NULL)!=0)
5105 return 1;
5106 (void)pthread_detach(p);
5107 return 0;
5108}
5109
5110_ACEOF
5111rm -f conftest$ac_exeext
5112if { (ac_try="$ac_link"
5113case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118 (eval "$ac_link") 2>&5
5119 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5122 { (case "(($ac_try" in
5123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5124 *) ac_try_echo=$ac_try;;
5125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (eval "$ac_try") 2>&5
5128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130 (exit $ac_status); }; }; then
5131 ac_cv_kpthread=yes
5132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005133 echo "$as_me: program exited with status $ac_status" >&5
5134echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135sed 's/^/| /' conftest.$ac_ext >&5
5136
5137( exit $ac_status )
5138ac_cv_kpthread=no
5139fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5141fi
5142
5143
5144CC="$ac_save_cc"
5145fi
5146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005147{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5148echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149fi
5150
5151if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5152then
5153# -Kthread, if available, provides the right #defines
5154# and linker options to make pthread_create available
5155# Some compilers won't report that they do not support -Kthread,
5156# so we need to run a program to see whether it really made the
5157# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005158{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5159echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005160if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005161 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005162else
5163 ac_save_cc="$CC"
5164CC="$CC -Kthread"
5165if test "$cross_compiling" = yes; then
5166 ac_cv_kthread=no
5167else
5168 cat >conftest.$ac_ext <<_ACEOF
5169/* confdefs.h. */
5170_ACEOF
5171cat confdefs.h >>conftest.$ac_ext
5172cat >>conftest.$ac_ext <<_ACEOF
5173/* end confdefs.h. */
5174
5175#include <pthread.h>
5176
5177void* routine(void* p){return NULL;}
5178
5179int main(){
5180 pthread_t p;
5181 if(pthread_create(&p,NULL,routine,NULL)!=0)
5182 return 1;
5183 (void)pthread_detach(p);
5184 return 0;
5185}
5186
5187_ACEOF
5188rm -f conftest$ac_exeext
5189if { (ac_try="$ac_link"
5190case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005195 (eval "$ac_link") 2>&5
5196 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5199 { (case "(($ac_try" in
5200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201 *) ac_try_echo=$ac_try;;
5202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 (eval "$ac_try") 2>&5
5205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 (exit $ac_status); }; }; then
5208 ac_cv_kthread=yes
5209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005210 echo "$as_me: program exited with status $ac_status" >&5
5211echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212sed 's/^/| /' conftest.$ac_ext >&5
5213
5214( exit $ac_status )
5215ac_cv_kthread=no
5216fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5218fi
5219
5220
5221CC="$ac_save_cc"
5222fi
5223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005224{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5225echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226fi
5227
5228if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5229then
5230# -pthread, if available, provides the right #defines
5231# and linker options to make pthread_create available
5232# Some compilers won't report that they do not support -pthread,
5233# so we need to run a program to see whether it really made the
5234# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005235{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5236echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005238 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239else
5240 ac_save_cc="$CC"
5241CC="$CC -pthread"
5242if test "$cross_compiling" = yes; then
5243 ac_cv_pthread=no
5244else
5245 cat >conftest.$ac_ext <<_ACEOF
5246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
5251
5252#include <pthread.h>
5253
5254void* routine(void* p){return NULL;}
5255
5256int main(){
5257 pthread_t p;
5258 if(pthread_create(&p,NULL,routine,NULL)!=0)
5259 return 1;
5260 (void)pthread_detach(p);
5261 return 0;
5262}
5263
5264_ACEOF
5265rm -f conftest$ac_exeext
5266if { (ac_try="$ac_link"
5267case "(($ac_try" in
5268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5269 *) ac_try_echo=$ac_try;;
5270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005272 (eval "$ac_link") 2>&5
5273 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5276 { (case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281 (eval "$ac_try") 2>&5
5282 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284 (exit $ac_status); }; }; then
5285 ac_cv_pthread=yes
5286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005287 echo "$as_me: program exited with status $ac_status" >&5
5288echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289sed 's/^/| /' conftest.$ac_ext >&5
5290
5291( exit $ac_status )
5292ac_cv_pthread=no
5293fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5295fi
5296
5297
5298CC="$ac_save_cc"
5299fi
5300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005301{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5302echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303fi
5304
5305# If we have set a CC compiler flag for thread support then
5306# check if it works for CXX, too.
5307ac_cv_cxx_thread=no
5308if test ! -z "$CXX"
5309then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005310{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5311echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312ac_save_cxx="$CXX"
5313
5314if test "$ac_cv_kpthread" = "yes"
5315then
5316 CXX="$CXX -Kpthread"
5317 ac_cv_cxx_thread=yes
5318elif test "$ac_cv_kthread" = "yes"
5319then
5320 CXX="$CXX -Kthread"
5321 ac_cv_cxx_thread=yes
5322elif test "$ac_cv_pthread" = "yes"
5323then
5324 CXX="$CXX -pthread"
5325 ac_cv_cxx_thread=yes
5326fi
5327
5328if test $ac_cv_cxx_thread = yes
5329then
5330 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5331 $CXX -c conftest.$ac_ext 2>&5
5332 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5333 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5334 then
5335 ac_cv_cxx_thread=yes
5336 else
5337 ac_cv_cxx_thread=no
5338 fi
5339 rm -fr conftest*
5340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005341{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5342echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005343fi
5344CXX="$ac_save_cxx"
5345
5346
5347# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005348{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5349echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005351 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352else
5353 cat >conftest.$ac_ext <<_ACEOF
5354/* confdefs.h. */
5355_ACEOF
5356cat confdefs.h >>conftest.$ac_ext
5357cat >>conftest.$ac_ext <<_ACEOF
5358/* end confdefs.h. */
5359#include <stdlib.h>
5360#include <stdarg.h>
5361#include <string.h>
5362#include <float.h>
5363
5364int
5365main ()
5366{
5367
5368 ;
5369 return 0;
5370}
5371_ACEOF
5372rm -f conftest.$ac_objext
5373if { (ac_try="$ac_compile"
5374case "(($ac_try" in
5375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5376 *) ac_try_echo=$ac_try;;
5377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379 (eval "$ac_compile") 2>conftest.er1
5380 ac_status=$?
5381 grep -v '^ *+' conftest.er1 >conftest.err
5382 rm -f conftest.er1
5383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005385 (exit $ac_status); } && {
5386 test -z "$ac_c_werror_flag" ||
5387 test ! -s conftest.err
5388 } && test -s conftest.$ac_objext; then
5389 ac_cv_header_stdc=yes
5390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005391 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005392sed 's/^/| /' conftest.$ac_ext >&5
5393
5394 ac_cv_header_stdc=no
5395fi
5396
5397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398
5399if test $ac_cv_header_stdc = yes; then
5400 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5401 cat >conftest.$ac_ext <<_ACEOF
5402/* confdefs.h. */
5403_ACEOF
5404cat confdefs.h >>conftest.$ac_ext
5405cat >>conftest.$ac_ext <<_ACEOF
5406/* end confdefs.h. */
5407#include <string.h>
5408
5409_ACEOF
5410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5411 $EGREP "memchr" >/dev/null 2>&1; then
5412 :
5413else
5414 ac_cv_header_stdc=no
5415fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00005416rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418fi
5419
5420if test $ac_cv_header_stdc = yes; then
5421 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5422 cat >conftest.$ac_ext <<_ACEOF
5423/* confdefs.h. */
5424_ACEOF
5425cat confdefs.h >>conftest.$ac_ext
5426cat >>conftest.$ac_ext <<_ACEOF
5427/* end confdefs.h. */
5428#include <stdlib.h>
5429
5430_ACEOF
5431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5432 $EGREP "free" >/dev/null 2>&1; then
5433 :
5434else
5435 ac_cv_header_stdc=no
5436fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00005437rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438
5439fi
5440
5441if test $ac_cv_header_stdc = yes; then
5442 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5443 if test "$cross_compiling" = yes; then
5444 :
5445else
5446 cat >conftest.$ac_ext <<_ACEOF
5447/* confdefs.h. */
5448_ACEOF
5449cat confdefs.h >>conftest.$ac_ext
5450cat >>conftest.$ac_ext <<_ACEOF
5451/* end confdefs.h. */
5452#include <ctype.h>
5453#include <stdlib.h>
5454#if ((' ' & 0x0FF) == 0x020)
5455# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5456# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5457#else
5458# define ISLOWER(c) \
5459 (('a' <= (c) && (c) <= 'i') \
5460 || ('j' <= (c) && (c) <= 'r') \
5461 || ('s' <= (c) && (c) <= 'z'))
5462# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5463#endif
5464
5465#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5466int
5467main ()
5468{
5469 int i;
5470 for (i = 0; i < 256; i++)
5471 if (XOR (islower (i), ISLOWER (i))
5472 || toupper (i) != TOUPPER (i))
5473 return 2;
5474 return 0;
5475}
5476_ACEOF
5477rm -f conftest$ac_exeext
5478if { (ac_try="$ac_link"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484 (eval "$ac_link") 2>&5
5485 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5488 { (case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 (eval "$ac_try") 2>&5
5494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 (exit $ac_status); }; }; then
5497 :
5498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005499 echo "$as_me: program exited with status $ac_status" >&5
5500echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501sed 's/^/| /' conftest.$ac_ext >&5
5502
5503( exit $ac_status )
5504ac_cv_header_stdc=no
5505fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5507fi
5508
5509
5510fi
5511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005512{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5513echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514if test $ac_cv_header_stdc = yes; then
5515
5516cat >>confdefs.h <<\_ACEOF
5517#define STDC_HEADERS 1
5518_ACEOF
5519
5520fi
5521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005522# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5533 inttypes.h stdint.h unistd.h
5534do
5535as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5536{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5538if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5539 echo $ECHO_N "(cached) $ECHO_C" >&6
5540else
5541 cat >conftest.$ac_ext <<_ACEOF
5542/* confdefs.h. */
5543_ACEOF
5544cat confdefs.h >>conftest.$ac_ext
5545cat >>conftest.$ac_ext <<_ACEOF
5546/* end confdefs.h. */
5547$ac_includes_default
5548
5549#include <$ac_header>
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (ac_try="$ac_compile"
5553case "(($ac_try" in
5554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5555 *) ac_try_echo=$ac_try;;
5556esac
5557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5558 (eval "$ac_compile") 2>conftest.er1
5559 ac_status=$?
5560 grep -v '^ *+' conftest.er1 >conftest.err
5561 rm -f conftest.er1
5562 cat conftest.err >&5
5563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } && {
5565 test -z "$ac_c_werror_flag" ||
5566 test ! -s conftest.err
5567 } && test -s conftest.$ac_objext; then
5568 eval "$as_ac_Header=yes"
5569else
5570 echo "$as_me: failed program was:" >&5
5571sed 's/^/| /' conftest.$ac_ext >&5
5572
5573 eval "$as_ac_Header=no"
5574fi
5575
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578ac_res=`eval echo '${'$as_ac_Header'}'`
5579 { echo "$as_me:$LINENO: result: $ac_res" >&5
5580echo "${ECHO_T}$ac_res" >&6; }
5581if test `eval echo '${'$as_ac_Header'}'` = yes; then
5582 cat >>confdefs.h <<_ACEOF
5583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591
Martin v. Löwis11437992002-04-12 09:54:03 +00005592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
Anthony Baxter8a560de2004-10-13 15:30:56 +00005627
Martin v. Löwisc3001752005-01-23 09:27:24 +00005628
Martin v. Löwis11017b12006-01-14 18:12:57 +00005629
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005630
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005631
5632
5633
5634
5635
5636
5637
5638
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005639
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005640
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005641
5642
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005643
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005644
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005645for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5646fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005647ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005648shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005649unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005650sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5651sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005652sys/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 +00005653sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005654sys/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 +00005655sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005656bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005657do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005658as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005659if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005660 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5661echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005662if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005663 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005664fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665ac_res=`eval echo '${'$as_ac_Header'}'`
5666 { echo "$as_me:$LINENO: result: $ac_res" >&5
5667echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005668else
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005670{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5671echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005678$ac_includes_default
5679#include <$ac_header>
5680_ACEOF
5681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682if { (ac_try="$ac_compile"
5683case "(($ac_try" in
5684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5685 *) ac_try_echo=$ac_try;;
5686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005690 grep -v '^ *+' conftest.er1 >conftest.err
5691 rm -f conftest.er1
5692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005694 (exit $ac_status); } && {
5695 test -z "$ac_c_werror_flag" ||
5696 test ! -s conftest.err
5697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005701sed 's/^/| /' conftest.$ac_ext >&5
5702
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005705
5706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005707{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5708echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005709
5710# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005711{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5712echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005714/* confdefs.h. */
5715_ACEOF
5716cat confdefs.h >>conftest.$ac_ext
5717cat >>conftest.$ac_ext <<_ACEOF
5718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005719#include <$ac_header>
5720_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005721if { (ac_try="$ac_cpp conftest.$ac_ext"
5722case "(($ac_try" in
5723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5724 *) ac_try_echo=$ac_try;;
5725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005727 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005729 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 rm -f conftest.er1
5731 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005733 (exit $ac_status); } >/dev/null && {
5734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5735 test ! -s conftest.err
5736 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=yes
5738else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005740sed 's/^/| /' conftest.$ac_ext >&5
5741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005744
Martin v. Löwis11437992002-04-12 09:54:03 +00005745rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005746{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5747echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005748
5749# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5751 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5753echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5754 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5755echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005756 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005757 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005758 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5760echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5761 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5762echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5764echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5765 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5766echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5767 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5768echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5769 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5770echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005772## -------------------------------------- ##
5773## Report this to http://bugs.python.org/ ##
5774## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005775_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005777 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005778esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5780echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005781if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005782 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005783else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005784 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786ac_res=`eval echo '${'$as_ac_Header'}'`
5787 { echo "$as_me:$LINENO: result: $ac_res" >&5
5788echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005789
5790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005793#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005794_ACEOF
5795
5796fi
5797
Guido van Rossum627b2d71993-12-24 10:39:16 +00005798done
5799
Martin v. Löwis11437992002-04-12 09:54:03 +00005800
5801
5802
5803
5804
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005805ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005806for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005807 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5808{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5809echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005814/* confdefs.h. */
5815_ACEOF
5816cat confdefs.h >>conftest.$ac_ext
5817cat >>conftest.$ac_ext <<_ACEOF
5818/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005819#include <sys/types.h>
5820#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005821
Martin v. Löwis11437992002-04-12 09:54:03 +00005822int
5823main ()
5824{
5825if ((DIR *) 0)
5826return 0;
5827 ;
5828 return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005832if { (ac_try="$ac_compile"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
5847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005851sed 's/^/| /' conftest.$ac_ext >&5
5852
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005855
5856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858ac_res=`eval echo '${'$as_ac_Header'}'`
5859 { echo "$as_me:$LINENO: result: $ac_res" >&5
5860echo "${ECHO_T}$ac_res" >&6; }
5861if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005862 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005864_ACEOF
5865
5866ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005867fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005868
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005869done
5870# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5871if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005872 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5873echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005874if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876else
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005878cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005884
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885/* Override any GCC internal prototype to avoid an error.
5886 Use char because int might match the return type of a GCC
5887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005888#ifdef __cplusplus
5889extern "C"
5890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005891char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005892int
5893main ()
5894{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005896 ;
5897 return 0;
5898}
5899_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900for ac_lib in '' dir; do
5901 if test -z "$ac_lib"; then
5902 ac_res="none required"
5903 else
5904 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005905 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906 fi
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908if { (ac_try="$ac_link"
5909case "(($ac_try" in
5910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5911 *) ac_try_echo=$ac_try;;
5912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005915 ac_status=$?
5916 grep -v '^ *+' conftest.er1 >conftest.err
5917 rm -f conftest.er1
5918 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920 (exit $ac_status); } && {
5921 test -z "$ac_c_werror_flag" ||
5922 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005923 } && test -s conftest$ac_exeext &&
5924 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005927 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005928sed 's/^/| /' conftest.$ac_ext >&5
5929
Martin v. Löwiseba40652007-08-30 20:10:57 +00005930
Brett Cannon19fab762007-06-02 03:02:29 +00005931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005932
5933rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5934 conftest$ac_exeext
5935 if test "${ac_cv_search_opendir+set}" = set; then
5936 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005938done
5939if test "${ac_cv_search_opendir+set}" = set; then
5940 :
5941else
5942 ac_cv_search_opendir=no
5943fi
5944rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005945LIBS=$ac_func_search_save_LIBS
5946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005947{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5948echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005949ac_res=$ac_cv_search_opendir
5950if test "$ac_res" != no; then
5951 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005952
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005954
Michael W. Hudson54241132001-12-07 15:38:26 +00005955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005956 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5957echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005958if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005959 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005960else
5961 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005963/* confdefs.h. */
5964_ACEOF
5965cat confdefs.h >>conftest.$ac_ext
5966cat >>conftest.$ac_ext <<_ACEOF
5967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005968
Martin v. Löwiseba40652007-08-30 20:10:57 +00005969/* Override any GCC internal prototype to avoid an error.
5970 Use char because int might match the return type of a GCC
5971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005972#ifdef __cplusplus
5973extern "C"
5974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005975char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005976int
5977main ()
5978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005980 ;
5981 return 0;
5982}
5983_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984for ac_lib in '' x; do
5985 if test -z "$ac_lib"; then
5986 ac_res="none required"
5987 else
5988 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 fi
5991 rm -f conftest.$ac_objext conftest$ac_exeext
5992if { (ac_try="$ac_link"
5993case "(($ac_try" in
5994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5995 *) ac_try_echo=$ac_try;;
5996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005999 ac_status=$?
6000 grep -v '^ *+' conftest.er1 >conftest.err
6001 rm -f conftest.er1
6002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004 (exit $ac_status); } && {
6005 test -z "$ac_c_werror_flag" ||
6006 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006007 } && test -s conftest$ac_exeext &&
6008 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006011 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006012sed 's/^/| /' conftest.$ac_ext >&5
6013
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014
Brett Cannon19fab762007-06-02 03:02:29 +00006015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016
6017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6018 conftest$ac_exeext
6019 if test "${ac_cv_search_opendir+set}" = set; then
6020 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006022done
6023if test "${ac_cv_search_opendir+set}" = set; then
6024 :
6025else
6026 ac_cv_search_opendir=no
6027fi
6028rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006029LIBS=$ac_func_search_save_LIBS
6030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006031{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6032echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033ac_res=$ac_cv_search_opendir
6034if test "$ac_res" != no; then
6035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037fi
6038
6039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006041{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6042echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006044 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006045else
6046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006047/* confdefs.h. */
6048_ACEOF
6049cat confdefs.h >>conftest.$ac_ext
6050cat >>conftest.$ac_ext <<_ACEOF
6051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053int
6054main ()
6055{
6056return makedev(0, 0);
6057 ;
6058 return 0;
6059}
6060_ACEOF
6061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006062if { (ac_try="$ac_link"
6063case "(($ac_try" in
6064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6065 *) ac_try_echo=$ac_try;;
6066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006070 grep -v '^ *+' conftest.er1 >conftest.err
6071 rm -f conftest.er1
6072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006074 (exit $ac_status); } && {
6075 test -z "$ac_c_werror_flag" ||
6076 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006077 } && test -s conftest$ac_exeext &&
6078 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079 ac_cv_header_sys_types_h_makedev=yes
6080else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006082sed 's/^/| /' conftest.$ac_ext >&5
6083
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006086
6087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089
6090fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6092echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093
6094if test $ac_cv_header_sys_types_h_makedev = no; then
6095if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6097echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006099 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6102echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103else
6104 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006105{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6106echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113$ac_includes_default
6114#include <sys/mkdev.h>
6115_ACEOF
6116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006117if { (ac_try="$ac_compile"
6118case "(($ac_try" in
6119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6120 *) ac_try_echo=$ac_try;;
6121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 grep -v '^ *+' conftest.er1 >conftest.err
6126 rm -f conftest.er1
6127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006129 (exit $ac_status); } && {
6130 test -z "$ac_c_werror_flag" ||
6131 test ! -s conftest.err
6132 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_header_compiler=yes
6134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006136sed 's/^/| /' conftest.$ac_ext >&5
6137
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006140
6141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006142{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6143echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144
6145# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006146{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6147echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006149/* confdefs.h. */
6150_ACEOF
6151cat confdefs.h >>conftest.$ac_ext
6152cat >>conftest.$ac_ext <<_ACEOF
6153/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154#include <sys/mkdev.h>
6155_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006156if { (ac_try="$ac_cpp conftest.$ac_ext"
6157case "(($ac_try" in
6158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6159 *) ac_try_echo=$ac_try;;
6160esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006162 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165 rm -f conftest.er1
6166 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006168 (exit $ac_status); } >/dev/null && {
6169 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6170 test ! -s conftest.err
6171 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=yes
6173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006175sed 's/^/| /' conftest.$ac_ext >&5
6176
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177 ac_header_preproc=no
6178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006179
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006181{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6182echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006185case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6186 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6188echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006192 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006194 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6195echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6200 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6201echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6202 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6203echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6204 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6205echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006207## -------------------------------------- ##
6208## Report this to http://bugs.python.org/ ##
6209## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006210_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006211 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006212 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006214{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6215echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006217 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218else
6219 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6220fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006221{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6222echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006225if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006226
6227cat >>confdefs.h <<\_ACEOF
6228#define MAJOR_IN_MKDEV 1
6229_ACEOF
6230
6231fi
6232
6233
6234
6235 if test $ac_cv_header_sys_mkdev_h = no; then
6236 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6238echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006240 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006242{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6243echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
6245 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6247echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006249/* confdefs.h. */
6250_ACEOF
6251cat confdefs.h >>conftest.$ac_ext
6252cat >>conftest.$ac_ext <<_ACEOF
6253/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254$ac_includes_default
6255#include <sys/sysmacros.h>
6256_ACEOF
6257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006258if { (ac_try="$ac_compile"
6259case "(($ac_try" in
6260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6261 *) ac_try_echo=$ac_try;;
6262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006266 grep -v '^ *+' conftest.er1 >conftest.err
6267 rm -f conftest.er1
6268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006270 (exit $ac_status); } && {
6271 test -z "$ac_c_werror_flag" ||
6272 test ! -s conftest.err
6273 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 ac_header_compiler=yes
6275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006277sed 's/^/| /' conftest.$ac_ext >&5
6278
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006281
6282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006283{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6284echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285
6286# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006287{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6288echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006290/* confdefs.h. */
6291_ACEOF
6292cat confdefs.h >>conftest.$ac_ext
6293cat >>conftest.$ac_ext <<_ACEOF
6294/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295#include <sys/sysmacros.h>
6296_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297if { (ac_try="$ac_cpp conftest.$ac_ext"
6298case "(($ac_try" in
6299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6300 *) ac_try_echo=$ac_try;;
6301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006305 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006306 rm -f conftest.er1
6307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006309 (exit $ac_status); } >/dev/null && {
6310 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6311 test ! -s conftest.err
6312 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=yes
6314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006316sed 's/^/| /' conftest.$ac_ext >&5
6317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318 ac_header_preproc=no
6319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006322{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6323echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324
6325# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006326case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6327 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006328 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6329echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006332 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006333 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006334 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006335 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6336echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6342echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6344echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6346echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006348## -------------------------------------- ##
6349## Report this to http://bugs.python.org/ ##
6350## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006351_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006352 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006353 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006355{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6356echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006357if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359else
6360 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6363echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364
6365fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006366if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006367
6368cat >>confdefs.h <<\_ACEOF
6369#define MAJOR_IN_SYSMACROS 1
6370_ACEOF
6371
6372fi
6373
6374
6375 fi
6376fi
6377
Michael W. Hudson54241132001-12-07 15:38:26 +00006378
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006379# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006380
6381for ac_header in term.h
6382do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006383as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6384{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6385echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388else
6389 cat >conftest.$ac_ext <<_ACEOF
6390/* confdefs.h. */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006395
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006396#ifdef HAVE_CURSES_H
6397#include <curses.h>
6398#endif
6399
6400
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006401#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006402_ACEOF
6403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006404if { (ac_try="$ac_compile"
6405case "(($ac_try" in
6406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6407 *) ac_try_echo=$ac_try;;
6408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006416 (exit $ac_status); } && {
6417 test -z "$ac_c_werror_flag" ||
6418 test ! -s conftest.err
6419 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006420 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006422 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423sed 's/^/| /' conftest.$ac_ext >&5
6424
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006426fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006427
6428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006429fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006430ac_res=`eval echo '${'$as_ac_Header'}'`
6431 { echo "$as_me:$LINENO: result: $ac_res" >&5
6432echo "${ECHO_T}$ac_res" >&6; }
6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006436_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006437
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006438fi
6439
6440done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006441
6442
Martin v. Löwis11017b12006-01-14 18:12:57 +00006443# On Linux, netlink.h requires asm/types.h
6444
6445for ac_header in linux/netlink.h
6446do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6448{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6449echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006450if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006451 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006452else
6453 cat >conftest.$ac_ext <<_ACEOF
6454/* confdefs.h. */
6455_ACEOF
6456cat confdefs.h >>conftest.$ac_ext
6457cat >>conftest.$ac_ext <<_ACEOF
6458/* end confdefs.h. */
6459
6460#ifdef HAVE_ASM_TYPES_H
6461#include <asm/types.h>
6462#endif
6463#ifdef HAVE_SYS_SOCKET_H
6464#include <sys/socket.h>
6465#endif
6466
6467
6468#include <$ac_header>
6469_ACEOF
6470rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006471if { (ac_try="$ac_compile"
6472case "(($ac_try" in
6473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6474 *) ac_try_echo=$ac_try;;
6475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006478 ac_status=$?
6479 grep -v '^ *+' conftest.er1 >conftest.err
6480 rm -f conftest.er1
6481 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006483 (exit $ac_status); } && {
6484 test -z "$ac_c_werror_flag" ||
6485 test ! -s conftest.err
6486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487 eval "$as_ac_Header=yes"
6488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006489 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490sed 's/^/| /' conftest.$ac_ext >&5
6491
Martin v. Löwiseba40652007-08-30 20:10:57 +00006492 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006494
6495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006497ac_res=`eval echo '${'$as_ac_Header'}'`
6498 { echo "$as_me:$LINENO: result: $ac_res" >&5
6499echo "${ECHO_T}$ac_res" >&6; }
6500if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006501 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006503_ACEOF
6504
6505fi
6506
6507done
6508
6509
Guido van Rossum627b2d71993-12-24 10:39:16 +00006510# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006511was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006512{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6513echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006515/* confdefs.h. */
6516_ACEOF
6517cat confdefs.h >>conftest.$ac_ext
6518cat >>conftest.$ac_ext <<_ACEOF
6519/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
6522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006524 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006526else
Martin v. Löwis11437992002-04-12 09:54:03 +00006527
6528
6529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006532
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006533
Guido van Rossum627b2d71993-12-24 10:39:16 +00006534fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00006535rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006537{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6538echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006539
Neal Norwitz11690112002-07-30 01:08:28 +00006540# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006541{ echo "$as_me:$LINENO: checking for makedev" >&5
6542echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* confdefs.h. */
6545_ACEOF
6546cat confdefs.h >>conftest.$ac_ext
6547cat >>conftest.$ac_ext <<_ACEOF
6548/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006549#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006550int
6551main ()
6552{
6553 makedev(0, 0)
6554 ;
6555 return 0;
6556}
6557_ACEOF
6558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006559if { (ac_try="$ac_link"
6560case "(($ac_try" in
6561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6562 *) ac_try_echo=$ac_try;;
6563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006565 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006567 grep -v '^ *+' conftest.er1 >conftest.err
6568 rm -f conftest.er1
6569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571 (exit $ac_status); } && {
6572 test -z "$ac_c_werror_flag" ||
6573 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006574 } && test -s conftest$ac_exeext &&
6575 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006576 ac_cv_has_makedev=yes
6577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006579sed 's/^/| /' conftest.$ac_ext >&5
6580
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583
6584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006585 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006586if test "$ac_cv_has_makedev" = "no"; then
6587 # we didn't link, try if _OSF_SOURCE will allow us to link
6588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006589/* confdefs.h. */
6590_ACEOF
6591cat confdefs.h >>conftest.$ac_ext
6592cat >>conftest.$ac_ext <<_ACEOF
6593/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006594
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006595#define _OSF_SOURCE 1
6596#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006597
Neal Norwitz11690112002-07-30 01:08:28 +00006598int
6599main ()
6600{
6601 makedev(0, 0)
6602 ;
6603 return 0;
6604}
6605_ACEOF
6606rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006607if { (ac_try="$ac_link"
6608case "(($ac_try" in
6609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6610 *) ac_try_echo=$ac_try;;
6611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006622 } && test -s conftest$ac_exeext &&
6623 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006624 ac_cv_has_makedev=yes
6625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006627sed 's/^/| /' conftest.$ac_ext >&5
6628
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006631
6632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006633 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006634 if test "$ac_cv_has_makedev" = "yes"; then
6635
6636cat >>confdefs.h <<\_ACEOF
6637#define _OSF_SOURCE 1
6638_ACEOF
6639
6640 fi
6641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006642{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6643echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006644if test "$ac_cv_has_makedev" = "yes"; then
6645
6646cat >>confdefs.h <<\_ACEOF
6647#define HAVE_MAKEDEV 1
6648_ACEOF
6649
6650fi
6651
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6653# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6654# defined, but the compiler does not support pragma redefine_extname,
6655# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6656# structures (such as rlimit64) without declaring them. As a
6657# work-around, disable LFS on such configurations
6658
6659use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006660{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6661echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006663/* confdefs.h. */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668
6669#define _LARGEFILE_SOURCE 1
6670#define _FILE_OFFSET_BITS 64
6671#include <sys/resource.h>
6672
Martin v. Löwis399a6892002-10-04 10:22:02 +00006673int
6674main ()
6675{
6676struct rlimit foo;
6677 ;
6678 return 0;
6679}
6680_ACEOF
6681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682if { (ac_try="$ac_compile"
6683case "(($ac_try" in
6684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6685 *) ac_try_echo=$ac_try;;
6686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006690 grep -v '^ *+' conftest.er1 >conftest.err
6691 rm -f conftest.er1
6692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694 (exit $ac_status); } && {
6695 test -z "$ac_c_werror_flag" ||
6696 test ! -s conftest.err
6697 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 sol_lfs_bug=no
6699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006701sed 's/^/| /' conftest.$ac_ext >&5
6702
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006705
6706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006707{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6708echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006709if test "$sol_lfs_bug" = "yes"; then
6710 use_lfs=no
6711fi
6712
6713if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006714# Two defines needed to enable largefile support on various platforms
6715# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717cat >>confdefs.h <<\_ACEOF
6718#define _LARGEFILE_SOURCE 1
6719_ACEOF
6720
6721
6722cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006723#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006724_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006725
Martin v. Löwis399a6892002-10-04 10:22:02 +00006726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006727
Guido van Rossum84e7b241996-08-19 21:59:00 +00006728# Add some code to confdefs.h so that the test for off_t works on SCO
6729cat >> confdefs.h <<\EOF
6730#if defined(SCO_DS)
6731#undef _OFF_T
6732#endif
6733EOF
6734
Guido van Rossumef2255b2000-03-10 22:30:29 +00006735# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006736{ echo "$as_me:$LINENO: checking for mode_t" >&5
6737echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006738if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006740else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741 cat >conftest.$ac_ext <<_ACEOF
6742/* confdefs.h. */
6743_ACEOF
6744cat confdefs.h >>conftest.$ac_ext
6745cat >>conftest.$ac_ext <<_ACEOF
6746/* end confdefs.h. */
6747$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006748typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006749int
6750main ()
6751{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006752if ((ac__type_new_ *) 0)
6753 return 0;
6754if (sizeof (ac__type_new_))
6755 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006756 ;
6757 return 0;
6758}
6759_ACEOF
6760rm -f conftest.$ac_objext
6761if { (ac_try="$ac_compile"
6762case "(($ac_try" in
6763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6764 *) ac_try_echo=$ac_try;;
6765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767 (eval "$ac_compile") 2>conftest.er1
6768 ac_status=$?
6769 grep -v '^ *+' conftest.er1 >conftest.err
6770 rm -f conftest.er1
6771 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006773 (exit $ac_status); } && {
6774 test -z "$ac_c_werror_flag" ||
6775 test ! -s conftest.err
6776 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006780sed 's/^/| /' conftest.$ac_ext >&5
6781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006787{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6788echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6789if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006790 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791else
Martin v. Löwis11437992002-04-12 09:54:03 +00006792
6793cat >>confdefs.h <<_ACEOF
6794#define mode_t int
6795_ACEOF
6796
6797fi
6798
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006799{ echo "$as_me:$LINENO: checking for off_t" >&5
6800echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006801if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006802 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006803else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804 cat >conftest.$ac_ext <<_ACEOF
6805/* confdefs.h. */
6806_ACEOF
6807cat confdefs.h >>conftest.$ac_ext
6808cat >>conftest.$ac_ext <<_ACEOF
6809/* end confdefs.h. */
6810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812int
6813main ()
6814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006815if ((ac__type_new_ *) 0)
6816 return 0;
6817if (sizeof (ac__type_new_))
6818 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819 ;
6820 return 0;
6821}
6822_ACEOF
6823rm -f conftest.$ac_objext
6824if { (ac_try="$ac_compile"
6825case "(($ac_try" in
6826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6827 *) ac_try_echo=$ac_try;;
6828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830 (eval "$ac_compile") 2>conftest.er1
6831 ac_status=$?
6832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006850{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6851echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6852if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854else
Martin v. Löwis11437992002-04-12 09:54:03 +00006855
6856cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006857#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006858_ACEOF
6859
6860fi
6861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006862{ echo "$as_me:$LINENO: checking for pid_t" >&5
6863echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006864if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006866else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875int
6876main ()
6877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878if ((ac__type_new_ *) 0)
6879 return 0;
6880if (sizeof (ac__type_new_))
6881 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
6887if { (ac_try="$ac_compile"
6888case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006893 (eval "$ac_compile") 2>conftest.er1
6894 ac_status=$?
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899 (exit $ac_status); } && {
6900 test -z "$ac_c_werror_flag" ||
6901 test ! -s conftest.err
6902 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006906sed 's/^/| /' conftest.$ac_ext >&5
6907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006912fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006913{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6914echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6915if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006917else
Martin v. Löwis11437992002-04-12 09:54:03 +00006918
6919cat >>confdefs.h <<_ACEOF
6920#define pid_t int
6921_ACEOF
6922
6923fi
6924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006925{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6926echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006927if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
6930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006931/* confdefs.h. */
6932_ACEOF
6933cat confdefs.h >>conftest.$ac_ext
6934cat >>conftest.$ac_ext <<_ACEOF
6935/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006936#include <sys/types.h>
6937#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006938
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
6947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948if { (ac_try="$ac_compile"
6949case "(($ac_try" in
6950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6951 *) ac_try_echo=$ac_try;;
6952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest.$ac_objext; then
6964 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971
6972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006974{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6975echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006976
Martin v. Löwis11437992002-04-12 09:54:03 +00006977cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006979_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006982{ echo "$as_me:$LINENO: checking for size_t" >&5
6983echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006984if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006987 cat >conftest.$ac_ext <<_ACEOF
6988/* confdefs.h. */
6989_ACEOF
6990cat confdefs.h >>conftest.$ac_ext
6991cat >>conftest.$ac_ext <<_ACEOF
6992/* end confdefs.h. */
6993$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006995int
6996main ()
6997{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006998if ((ac__type_new_ *) 0)
6999 return 0;
7000if (sizeof (ac__type_new_))
7001 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
7007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007013 (eval "$ac_compile") 2>conftest.er1
7014 ac_status=$?
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007026sed 's/^/| /' conftest.$ac_ext >&5
7027
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007028 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007032fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007033{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7034echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7035if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037else
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
7039cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
7042
7043fi
7044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007045{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7046echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007047if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
7050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* confdefs.h. */
7052_ACEOF
7053cat confdefs.h >>conftest.$ac_ext
7054cat >>conftest.$ac_ext <<_ACEOF
7055/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
7058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007060 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061 ac_cv_type_uid_t=yes
7062else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063 ac_cv_type_uid_t=no
7064fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +00007065rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007068{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7069echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007070if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071
Martin v. Löwis11437992002-04-12 09:54:03 +00007072cat >>confdefs.h <<\_ACEOF
7073#define uid_t int
7074_ACEOF
7075
7076
7077cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007078#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080
7081fi
7082
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007084 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7085echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007086if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007087 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007088else
7089 ac_cv_c_uint32_t=no
7090 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7091 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7092 cat >conftest.$ac_ext <<_ACEOF
7093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
7098$ac_includes_default
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (ac_try="$ac_compile"
7111case "(($ac_try" in
7112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7113 *) ac_try_echo=$ac_try;;
7114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007116 (eval "$ac_compile") 2>conftest.er1
7117 ac_status=$?
7118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007122 (exit $ac_status); } && {
7123 test -z "$ac_c_werror_flag" ||
7124 test ! -s conftest.err
7125 } && test -s conftest.$ac_objext; then
7126 case $ac_type in
7127 uint32_t) ac_cv_c_uint32_t=yes ;;
7128 *) ac_cv_c_uint32_t=$ac_type ;;
7129esac
7130
7131else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007132 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136fi
7137
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139 test "$ac_cv_c_uint32_t" != no && break
7140 done
7141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007142{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7143echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007144 case $ac_cv_c_uint32_t in #(
7145 no|yes) ;; #(
7146 *)
7147
7148cat >>confdefs.h <<\_ACEOF
7149#define _UINT32_T 1
7150_ACEOF
7151
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uint32_t $ac_cv_c_uint32_t
7155_ACEOF
7156;;
7157 esac
7158
7159
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007160 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7161echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007162if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007163 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007164else
7165 ac_cv_c_uint64_t=no
7166 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7167 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7168 cat >conftest.$ac_ext <<_ACEOF
7169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
7174$ac_includes_default
7175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (ac_try="$ac_compile"
7187case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007192 (eval "$ac_compile") 2>conftest.er1
7193 ac_status=$?
7194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007198 (exit $ac_status); } && {
7199 test -z "$ac_c_werror_flag" ||
7200 test ! -s conftest.err
7201 } && test -s conftest.$ac_objext; then
7202 case $ac_type in
7203 uint64_t) ac_cv_c_uint64_t=yes ;;
7204 *) ac_cv_c_uint64_t=$ac_type ;;
7205esac
7206
7207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007208 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007209sed 's/^/| /' conftest.$ac_ext >&5
7210
7211
7212fi
7213
7214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7215 test "$ac_cv_c_uint64_t" != no && break
7216 done
7217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007218{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7219echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007220 case $ac_cv_c_uint64_t in #(
7221 no|yes) ;; #(
7222 *)
7223
7224cat >>confdefs.h <<\_ACEOF
7225#define _UINT64_T 1
7226_ACEOF
7227
7228
7229cat >>confdefs.h <<_ACEOF
7230#define uint64_t $ac_cv_c_uint64_t
7231_ACEOF
7232;;
7233 esac
7234
7235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007236 { echo "$as_me:$LINENO: checking for int32_t" >&5
7237echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007238if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007239 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007240else
7241 ac_cv_c_int32_t=no
7242 for ac_type in 'int32_t' 'int' 'long int' \
7243 'long long int' 'short int' 'signed char'; do
7244 cat >conftest.$ac_ext <<_ACEOF
7245/* confdefs.h. */
7246_ACEOF
7247cat confdefs.h >>conftest.$ac_ext
7248cat >>conftest.$ac_ext <<_ACEOF
7249/* end confdefs.h. */
7250$ac_includes_default
7251int
7252main ()
7253{
7254static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7255test_array [0] = 0
7256
7257 ;
7258 return 0;
7259}
7260_ACEOF
7261rm -f conftest.$ac_objext
7262if { (ac_try="$ac_compile"
7263case "(($ac_try" in
7264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7265 *) ac_try_echo=$ac_try;;
7266esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007268 (eval "$ac_compile") 2>conftest.er1
7269 ac_status=$?
7270 grep -v '^ *+' conftest.er1 >conftest.err
7271 rm -f conftest.er1
7272 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007274 (exit $ac_status); } && {
7275 test -z "$ac_c_werror_flag" ||
7276 test ! -s conftest.err
7277 } && test -s conftest.$ac_objext; then
7278 cat >conftest.$ac_ext <<_ACEOF
7279/* confdefs.h. */
7280_ACEOF
7281cat confdefs.h >>conftest.$ac_ext
7282cat >>conftest.$ac_ext <<_ACEOF
7283/* end confdefs.h. */
7284$ac_includes_default
7285int
7286main ()
7287{
7288static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007289 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (ac_try="$ac_compile"
7298case "(($ac_try" in
7299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7300 *) ac_try_echo=$ac_try;;
7301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007303 (eval "$ac_compile") 2>conftest.er1
7304 ac_status=$?
7305 grep -v '^ *+' conftest.er1 >conftest.err
7306 rm -f conftest.er1
7307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007309 (exit $ac_status); } && {
7310 test -z "$ac_c_werror_flag" ||
7311 test ! -s conftest.err
7312 } && test -s conftest.$ac_objext; then
7313 :
7314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007315 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007316sed 's/^/| /' conftest.$ac_ext >&5
7317
7318 case $ac_type in
7319 int32_t) ac_cv_c_int32_t=yes ;;
7320 *) ac_cv_c_int32_t=$ac_type ;;
7321esac
7322
7323fi
7324
7325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007327 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007328sed 's/^/| /' conftest.$ac_ext >&5
7329
7330
7331fi
7332
7333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7334 test "$ac_cv_c_int32_t" != no && break
7335 done
7336fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007337{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7338echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007339 case $ac_cv_c_int32_t in #(
7340 no|yes) ;; #(
7341 *)
7342
7343cat >>confdefs.h <<_ACEOF
7344#define int32_t $ac_cv_c_int32_t
7345_ACEOF
7346;;
7347 esac
7348
7349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 { echo "$as_me:$LINENO: checking for int64_t" >&5
7351echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007352if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007353 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007354else
7355 ac_cv_c_int64_t=no
7356 for ac_type in 'int64_t' 'int' 'long int' \
7357 'long long int' 'short int' 'signed char'; do
7358 cat >conftest.$ac_ext <<_ACEOF
7359/* confdefs.h. */
7360_ACEOF
7361cat confdefs.h >>conftest.$ac_ext
7362cat >>conftest.$ac_ext <<_ACEOF
7363/* end confdefs.h. */
7364$ac_includes_default
7365int
7366main ()
7367{
7368static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7369test_array [0] = 0
7370
7371 ;
7372 return 0;
7373}
7374_ACEOF
7375rm -f conftest.$ac_objext
7376if { (ac_try="$ac_compile"
7377case "(($ac_try" in
7378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7379 *) ac_try_echo=$ac_try;;
7380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007382 (eval "$ac_compile") 2>conftest.er1
7383 ac_status=$?
7384 grep -v '^ *+' conftest.er1 >conftest.err
7385 rm -f conftest.er1
7386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007388 (exit $ac_status); } && {
7389 test -z "$ac_c_werror_flag" ||
7390 test ! -s conftest.err
7391 } && test -s conftest.$ac_objext; then
7392 cat >conftest.$ac_ext <<_ACEOF
7393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
7398$ac_includes_default
7399int
7400main ()
7401{
7402static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007403 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007404test_array [0] = 0
7405
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
7411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007417 (eval "$ac_compile") 2>conftest.er1
7418 ac_status=$?
7419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
7427 :
7428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007429 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007430sed 's/^/| /' conftest.$ac_ext >&5
7431
7432 case $ac_type in
7433 int64_t) ac_cv_c_int64_t=yes ;;
7434 *) ac_cv_c_int64_t=$ac_type ;;
7435esac
7436
7437fi
7438
7439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007441 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007442sed 's/^/| /' conftest.$ac_ext >&5
7443
7444
7445fi
7446
7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7448 test "$ac_cv_c_int64_t" != no && break
7449 done
7450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007451{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7452echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007453 case $ac_cv_c_int64_t in #(
7454 no|yes) ;; #(
7455 *)
7456
7457cat >>confdefs.h <<_ACEOF
7458#define int64_t $ac_cv_c_int64_t
7459_ACEOF
7460;;
7461 esac
7462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007463{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7464echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007465if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007466 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007467else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007468 cat >conftest.$ac_ext <<_ACEOF
7469/* confdefs.h. */
7470_ACEOF
7471cat confdefs.h >>conftest.$ac_ext
7472cat >>conftest.$ac_ext <<_ACEOF
7473/* end confdefs.h. */
7474$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007475typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007476int
7477main ()
7478{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007479if ((ac__type_new_ *) 0)
7480 return 0;
7481if (sizeof (ac__type_new_))
7482 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007494 (eval "$ac_compile") 2>conftest.er1
7495 ac_status=$?
7496 grep -v '^ *+' conftest.er1 >conftest.err
7497 rm -f conftest.er1
7498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007500 (exit $ac_status); } && {
7501 test -z "$ac_c_werror_flag" ||
7502 test ! -s conftest.err
7503 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007504 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007506 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507sed 's/^/| /' conftest.$ac_ext >&5
7508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007511
7512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007513fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007514{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7515echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7516if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007517
7518cat >>confdefs.h <<\_ACEOF
7519#define HAVE_SSIZE_T 1
7520_ACEOF
7521
7522fi
7523
Jack Jansendd19cf82001-12-06 22:36:17 +00007524
Michael W. Hudson54241132001-12-07 15:38:26 +00007525# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007526# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007527{ echo "$as_me:$LINENO: checking for int" >&5
7528echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7529if test "${ac_cv_type_int+set}" = set; then
7530 echo $ECHO_N "(cached) $ECHO_C" >&6
7531else
7532 cat >conftest.$ac_ext <<_ACEOF
7533/* confdefs.h. */
7534_ACEOF
7535cat confdefs.h >>conftest.$ac_ext
7536cat >>conftest.$ac_ext <<_ACEOF
7537/* end confdefs.h. */
7538$ac_includes_default
7539typedef int ac__type_new_;
7540int
7541main ()
7542{
7543if ((ac__type_new_ *) 0)
7544 return 0;
7545if (sizeof (ac__type_new_))
7546 return 0;
7547 ;
7548 return 0;
7549}
7550_ACEOF
7551rm -f conftest.$ac_objext
7552if { (ac_try="$ac_compile"
7553case "(($ac_try" in
7554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7555 *) ac_try_echo=$ac_try;;
7556esac
7557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7558 (eval "$ac_compile") 2>conftest.er1
7559 ac_status=$?
7560 grep -v '^ *+' conftest.er1 >conftest.err
7561 rm -f conftest.er1
7562 cat conftest.err >&5
7563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7564 (exit $ac_status); } && {
7565 test -z "$ac_c_werror_flag" ||
7566 test ! -s conftest.err
7567 } && test -s conftest.$ac_objext; then
7568 ac_cv_type_int=yes
7569else
7570 echo "$as_me: failed program was:" >&5
7571sed 's/^/| /' conftest.$ac_ext >&5
7572
7573 ac_cv_type_int=no
7574fi
7575
7576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7577fi
7578{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7579echo "${ECHO_T}$ac_cv_type_int" >&6; }
7580
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581# The cast to long int works around a bug in the HP C Compiler
7582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7584# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585{ echo "$as_me:$LINENO: checking size of int" >&5
7586echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007587if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007588 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 if test "$cross_compiling" = yes; then
7591 # Depending upon the size, compute the lo and hi bounds.
7592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* confdefs.h. */
7594_ACEOF
7595cat confdefs.h >>conftest.$ac_ext
7596cat >>conftest.$ac_ext <<_ACEOF
7597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007598$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007599 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007600int
7601main ()
7602{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007603static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007604test_array [0] = 0
7605
7606 ;
7607 return 0;
7608}
7609_ACEOF
7610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611if { (ac_try="$ac_compile"
7612case "(($ac_try" in
7613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7614 *) ac_try_echo=$ac_try;;
7615esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007619 grep -v '^ *+' conftest.er1 >conftest.err
7620 rm -f conftest.er1
7621 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623 (exit $ac_status); } && {
7624 test -z "$ac_c_werror_flag" ||
7625 test ! -s conftest.err
7626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_lo=0 ac_mid=0
7628 while :; do
7629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007636 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007637int
7638main ()
7639{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007641test_array [0] = 0
7642
7643 ;
7644 return 0;
7645}
7646_ACEOF
7647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648if { (ac_try="$ac_compile"
7649case "(($ac_try" in
7650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7651 *) ac_try_echo=$ac_try;;
7652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007656 grep -v '^ *+' conftest.er1 >conftest.err
7657 rm -f conftest.er1
7658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660 (exit $ac_status); } && {
7661 test -z "$ac_c_werror_flag" ||
7662 test ! -s conftest.err
7663 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_hi=$ac_mid; break
7665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007667sed 's/^/| /' conftest.$ac_ext >&5
7668
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 ac_lo=`expr $ac_mid + 1`
7670 if test $ac_lo -le $ac_mid; then
7671 ac_lo= ac_hi=
7672 break
7673 fi
7674 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007676
7677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 done
7679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007681sed 's/^/| /' conftest.$ac_ext >&5
7682
Martin v. Löwiseba40652007-08-30 20:10:57 +00007683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007684/* confdefs.h. */
7685_ACEOF
7686cat confdefs.h >>conftest.$ac_ext
7687cat >>conftest.$ac_ext <<_ACEOF
7688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007690 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007691int
7692main ()
7693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007695test_array [0] = 0
7696
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702if { (ac_try="$ac_compile"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 (exit $ac_status); } && {
7715 test -z "$ac_c_werror_flag" ||
7716 test ! -s conftest.err
7717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_hi=-1 ac_mid=-1
7719 while :; do
7720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007721/* confdefs.h. */
7722_ACEOF
7723cat confdefs.h >>conftest.$ac_ext
7724cat >>conftest.$ac_ext <<_ACEOF
7725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007732test_array [0] = 0
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739if { (ac_try="$ac_compile"
7740case "(($ac_try" in
7741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7742 *) ac_try_echo=$ac_try;;
7743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007747 grep -v '^ *+' conftest.er1 >conftest.err
7748 rm -f conftest.er1
7749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751 (exit $ac_status); } && {
7752 test -z "$ac_c_werror_flag" ||
7753 test ! -s conftest.err
7754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_lo=$ac_mid; break
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 ac_hi=`expr '(' $ac_mid ')' - 1`
7761 if test $ac_mid -le $ac_hi; then
7762 ac_lo= ac_hi=
7763 break
7764 fi
7765 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007767
7768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 done
7770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007772sed 's/^/| /' conftest.$ac_ext >&5
7773
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007779
7780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781# Binary search between lo and hi bounds.
7782while test "x$ac_lo" != "x$ac_hi"; do
7783 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* confdefs.h. */
7786_ACEOF
7787cat confdefs.h >>conftest.$ac_ext
7788cat >>conftest.$ac_ext <<_ACEOF
7789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007791 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007792int
7793main ()
7794{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007796test_array [0] = 0
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803if { (ac_try="$ac_compile"
7804case "(($ac_try" in
7805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7806 *) ac_try_echo=$ac_try;;
7807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007811 grep -v '^ *+' conftest.er1 >conftest.err
7812 rm -f conftest.er1
7813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007815 (exit $ac_status); } && {
7816 test -z "$ac_c_werror_flag" ||
7817 test ! -s conftest.err
7818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_hi=$ac_mid
7820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007822sed 's/^/| /' conftest.$ac_ext >&5
7823
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826
7827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828done
7829case $ac_lo in
7830?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007833See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007834echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007835See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007836 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007837 else
7838 ac_cv_sizeof_int=0
7839 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007840esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007841else
Martin v. Löwis11437992002-04-12 09:54:03 +00007842 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007843/* confdefs.h. */
7844_ACEOF
7845cat confdefs.h >>conftest.$ac_ext
7846cat >>conftest.$ac_ext <<_ACEOF
7847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007848$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007849 typedef int ac__type_sizeof_;
7850static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7851static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007852#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007854int
7855main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856{
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
7858 FILE *f = fopen ("conftest.val", "w");
7859 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007864 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007866 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 }
7868 else
7869 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007871 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007874 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007876
7877 ;
7878 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007879}
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
7881rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007882if { (ac_try="$ac_link"
7883case "(($ac_try" in
7884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7885 *) ac_try_echo=$ac_try;;
7886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 { (case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 (exit $ac_status); }; }; then
7901 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007903 echo "$as_me: program exited with status $ac_status" >&5
7904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007905sed 's/^/| /' conftest.$ac_ext >&5
7906
Martin v. Löwis11437992002-04-12 09:54:03 +00007907( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007911echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007913 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914 else
7915 ac_cv_sizeof_int=0
7916 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918rm -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 +00007919fi
7920rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007922{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7923echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924
7925
7926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007928#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007929_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930
7931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007932{ echo "$as_me:$LINENO: checking for long" >&5
7933echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7934if test "${ac_cv_type_long+set}" = set; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7936else
7937 cat >conftest.$ac_ext <<_ACEOF
7938/* confdefs.h. */
7939_ACEOF
7940cat confdefs.h >>conftest.$ac_ext
7941cat >>conftest.$ac_ext <<_ACEOF
7942/* end confdefs.h. */
7943$ac_includes_default
7944typedef long ac__type_new_;
7945int
7946main ()
7947{
7948if ((ac__type_new_ *) 0)
7949 return 0;
7950if (sizeof (ac__type_new_))
7951 return 0;
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (ac_try="$ac_compile"
7958case "(($ac_try" in
7959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7960 *) ac_try_echo=$ac_try;;
7961esac
7962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7963 (eval "$ac_compile") 2>conftest.er1
7964 ac_status=$?
7965 grep -v '^ *+' conftest.er1 >conftest.err
7966 rm -f conftest.er1
7967 cat conftest.err >&5
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); } && {
7970 test -z "$ac_c_werror_flag" ||
7971 test ! -s conftest.err
7972 } && test -s conftest.$ac_objext; then
7973 ac_cv_type_long=yes
7974else
7975 echo "$as_me: failed program was:" >&5
7976sed 's/^/| /' conftest.$ac_ext >&5
7977
7978 ac_cv_type_long=no
7979fi
7980
7981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7982fi
7983{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7984echo "${ECHO_T}$ac_cv_type_long" >&6; }
7985
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990{ echo "$as_me:$LINENO: checking size of long" >&5
7991echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007992if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007993 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 if test "$cross_compiling" = yes; then
7996 # Depending upon the size, compute the lo and hi bounds.
7997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008004 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008005int
8006main ()
8007{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008008static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008009test_array [0] = 0
8010
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016if { (ac_try="$ac_compile"
8017case "(($ac_try" in
8018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8019 *) ac_try_echo=$ac_try;;
8020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_lo=0 ac_mid=0
8033 while :; do
8034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* confdefs.h. */
8036_ACEOF
8037cat confdefs.h >>conftest.$ac_ext
8038cat >>conftest.$ac_ext <<_ACEOF
8039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008041 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008046test_array [0] = 0
8047
8048 ;
8049 return 0;
8050}
8051_ACEOF
8052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008053if { (ac_try="$ac_compile"
8054case "(($ac_try" in
8055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8056 *) ac_try_echo=$ac_try;;
8057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008061 grep -v '^ *+' conftest.er1 >conftest.err
8062 rm -f conftest.er1
8063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065 (exit $ac_status); } && {
8066 test -z "$ac_c_werror_flag" ||
8067 test ! -s conftest.err
8068 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_hi=$ac_mid; break
8070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008072sed 's/^/| /' conftest.$ac_ext >&5
8073
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 ac_lo=`expr $ac_mid + 1`
8075 if test $ac_lo -le $ac_mid; then
8076 ac_lo= ac_hi=
8077 break
8078 fi
8079 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081
8082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 done
8084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008095 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008096int
8097main ()
8098{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008099static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008100test_array [0] = 0
8101
8102 ;
8103 return 0;
8104}
8105_ACEOF
8106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107if { (ac_try="$ac_compile"
8108case "(($ac_try" in
8109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8110 *) ac_try_echo=$ac_try;;
8111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_hi=-1 ac_mid=-1
8124 while :; do
8125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008136static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008144if { (ac_try="$ac_compile"
8145case "(($ac_try" in
8146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8147 *) ac_try_echo=$ac_try;;
8148esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008152 grep -v '^ *+' conftest.er1 >conftest.err
8153 rm -f conftest.er1
8154 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156 (exit $ac_status); } && {
8157 test -z "$ac_c_werror_flag" ||
8158 test ! -s conftest.err
8159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_lo=$ac_mid; break
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_hi=`expr '(' $ac_mid ')' - 1`
8166 if test $ac_mid -le $ac_hi; then
8167 ac_lo= ac_hi=
8168 break
8169 fi
8170 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 done
8175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184
8185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186# Binary search between lo and hi bounds.
8187while test "x$ac_lo" != "x$ac_hi"; do
8188 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008196 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008197int
8198main ()
8199{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008201test_array [0] = 0
8202
8203 ;
8204 return 0;
8205}
8206_ACEOF
8207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208if { (ac_try="$ac_compile"
8209case "(($ac_try" in
8210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8211 *) ac_try_echo=$ac_try;;
8212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 (exit $ac_status); } && {
8221 test -z "$ac_c_werror_flag" ||
8222 test ! -s conftest.err
8223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_hi=$ac_mid
8225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008227sed 's/^/| /' conftest.$ac_ext >&5
8228
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231
8232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008233done
8234case $ac_lo in
8235?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008237 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008238See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008239echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008241 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242 else
8243 ac_cv_sizeof_long=0
8244 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008245esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008246else
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008248/* confdefs.h. */
8249_ACEOF
8250cat confdefs.h >>conftest.$ac_ext
8251cat >>conftest.$ac_ext <<_ACEOF
8252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008253$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008254 typedef long ac__type_sizeof_;
8255static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8256static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008257#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008258#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259int
8260main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261{
Martin v. Löwis11437992002-04-12 09:54:03 +00008262
8263 FILE *f = fopen ("conftest.val", "w");
8264 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008269 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008271 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 }
8273 else
8274 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008276 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008279 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008280 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
8282 ;
8283 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008284}
Martin v. Löwis11437992002-04-12 09:54:03 +00008285_ACEOF
8286rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008287if { (ac_try="$ac_link"
8288case "(($ac_try" in
8289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8290 *) ac_try_echo=$ac_try;;
8291esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 { (case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 (exit $ac_status); }; }; then
8306 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008307else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008308 echo "$as_me: program exited with status $ac_status" >&5
8309echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008310sed 's/^/| /' conftest.$ac_ext >&5
8311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008314 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008315See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008316echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008317See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008318 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319 else
8320 ac_cv_sizeof_long=0
8321 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323rm -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 +00008324fi
8325rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008326fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008327{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8328echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329
8330
8331
Martin v. Löwis11437992002-04-12 09:54:03 +00008332cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008333#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008334_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335
8336
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008337{ echo "$as_me:$LINENO: checking for void *" >&5
8338echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8339if test "${ac_cv_type_void_p+set}" = set; then
8340 echo $ECHO_N "(cached) $ECHO_C" >&6
8341else
8342 cat >conftest.$ac_ext <<_ACEOF
8343/* confdefs.h. */
8344_ACEOF
8345cat confdefs.h >>conftest.$ac_ext
8346cat >>conftest.$ac_ext <<_ACEOF
8347/* end confdefs.h. */
8348$ac_includes_default
8349typedef void * ac__type_new_;
8350int
8351main ()
8352{
8353if ((ac__type_new_ *) 0)
8354 return 0;
8355if (sizeof (ac__type_new_))
8356 return 0;
8357 ;
8358 return 0;
8359}
8360_ACEOF
8361rm -f conftest.$ac_objext
8362if { (ac_try="$ac_compile"
8363case "(($ac_try" in
8364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8365 *) ac_try_echo=$ac_try;;
8366esac
8367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8368 (eval "$ac_compile") 2>conftest.er1
8369 ac_status=$?
8370 grep -v '^ *+' conftest.er1 >conftest.err
8371 rm -f conftest.er1
8372 cat conftest.err >&5
8373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8374 (exit $ac_status); } && {
8375 test -z "$ac_c_werror_flag" ||
8376 test ! -s conftest.err
8377 } && test -s conftest.$ac_objext; then
8378 ac_cv_type_void_p=yes
8379else
8380 echo "$as_me: failed program was:" >&5
8381sed 's/^/| /' conftest.$ac_ext >&5
8382
8383 ac_cv_type_void_p=no
8384fi
8385
8386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8387fi
8388{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8389echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8390
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391# The cast to long int works around a bug in the HP C Compiler
8392# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8393# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8394# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395{ echo "$as_me:$LINENO: checking size of void *" >&5
8396echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008397if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 if test "$cross_compiling" = yes; then
8401 # Depending upon the size, compute the lo and hi bounds.
8402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008409 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008410int
8411main ()
8412{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008414test_array [0] = 0
8415
8416 ;
8417 return 0;
8418}
8419_ACEOF
8420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421if { (ac_try="$ac_compile"
8422case "(($ac_try" in
8423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8424 *) ac_try_echo=$ac_try;;
8425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 grep -v '^ *+' conftest.er1 >conftest.err
8430 rm -f conftest.er1
8431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433 (exit $ac_status); } && {
8434 test -z "$ac_c_werror_flag" ||
8435 test ! -s conftest.err
8436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_lo=0 ac_mid=0
8438 while :; do
8439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008445$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008446 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008447int
8448main ()
8449{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008450static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008451test_array [0] = 0
8452
8453 ;
8454 return 0;
8455}
8456_ACEOF
8457rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008458if { (ac_try="$ac_compile"
8459case "(($ac_try" in
8460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8461 *) ac_try_echo=$ac_try;;
8462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008464 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008466 grep -v '^ *+' conftest.er1 >conftest.err
8467 rm -f conftest.er1
8468 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008470 (exit $ac_status); } && {
8471 test -z "$ac_c_werror_flag" ||
8472 test ! -s conftest.err
8473 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_hi=$ac_mid; break
8475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008477sed 's/^/| /' conftest.$ac_ext >&5
8478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 ac_lo=`expr $ac_mid + 1`
8480 if test $ac_lo -le $ac_mid; then
8481 ac_lo= ac_hi=
8482 break
8483 fi
8484 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008486
8487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 done
8489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008491sed 's/^/| /' conftest.$ac_ext >&5
8492
Martin v. Löwiseba40652007-08-30 20:10:57 +00008493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008494/* confdefs.h. */
8495_ACEOF
8496cat confdefs.h >>conftest.$ac_ext
8497cat >>conftest.$ac_ext <<_ACEOF
8498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008500 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008505test_array [0] = 0
8506
8507 ;
8508 return 0;
8509}
8510_ACEOF
8511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008512if { (ac_try="$ac_compile"
8513case "(($ac_try" in
8514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8515 *) ac_try_echo=$ac_try;;
8516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008520 grep -v '^ *+' conftest.er1 >conftest.err
8521 rm -f conftest.er1
8522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 (exit $ac_status); } && {
8525 test -z "$ac_c_werror_flag" ||
8526 test ! -s conftest.err
8527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_hi=-1 ac_mid=-1
8529 while :; do
8530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008531/* confdefs.h. */
8532_ACEOF
8533cat confdefs.h >>conftest.$ac_ext
8534cat >>conftest.$ac_ext <<_ACEOF
8535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008536$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008538int
8539main ()
8540{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008541static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008542test_array [0] = 0
8543
8544 ;
8545 return 0;
8546}
8547_ACEOF
8548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549if { (ac_try="$ac_compile"
8550case "(($ac_try" in
8551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8552 *) ac_try_echo=$ac_try;;
8553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008557 grep -v '^ *+' conftest.er1 >conftest.err
8558 rm -f conftest.er1
8559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008561 (exit $ac_status); } && {
8562 test -z "$ac_c_werror_flag" ||
8563 test ! -s conftest.err
8564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_lo=$ac_mid; break
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 ac_hi=`expr '(' $ac_mid ')' - 1`
8571 if test $ac_mid -le $ac_hi; then
8572 ac_lo= ac_hi=
8573 break
8574 fi
8575 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008577
8578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 done
8580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008582sed 's/^/| /' conftest.$ac_ext >&5
8583
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008589
8590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008591# Binary search between lo and hi bounds.
8592while test "x$ac_lo" != "x$ac_hi"; do
8593 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008595/* confdefs.h. */
8596_ACEOF
8597cat confdefs.h >>conftest.$ac_ext
8598cat >>conftest.$ac_ext <<_ACEOF
8599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008601 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008602int
8603main ()
8604{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008606test_array [0] = 0
8607
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613if { (ac_try="$ac_compile"
8614case "(($ac_try" in
8615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8616 *) ac_try_echo=$ac_try;;
8617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008621 grep -v '^ *+' conftest.er1 >conftest.err
8622 rm -f conftest.er1
8623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 (exit $ac_status); } && {
8626 test -z "$ac_c_werror_flag" ||
8627 test ! -s conftest.err
8628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_hi=$ac_mid
8630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008632sed 's/^/| /' conftest.$ac_ext >&5
8633
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636
8637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008638done
8639case $ac_lo in
8640?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008641'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008643See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008644echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008645See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008646 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008647 else
8648 ac_cv_sizeof_void_p=0
8649 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008650esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008651else
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008653/* confdefs.h. */
8654_ACEOF
8655cat confdefs.h >>conftest.$ac_ext
8656cat >>conftest.$ac_ext <<_ACEOF
8657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008659 typedef void * ac__type_sizeof_;
8660static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8661static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008662#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008663#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008664int
8665main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008666{
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
8668 FILE *f = fopen ("conftest.val", "w");
8669 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008674 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008676 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 }
8678 else
8679 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008681 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
8687 ;
8688 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008689}
Martin v. Löwis11437992002-04-12 09:54:03 +00008690_ACEOF
8691rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008692if { (ac_try="$ac_link"
8693case "(($ac_try" in
8694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8695 *) ac_try_echo=$ac_try;;
8696esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008698 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 { (case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 (exit $ac_status); }; }; then
8711 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008713 echo "$as_me: program exited with status $ac_status" >&5
8714echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008715sed 's/^/| /' conftest.$ac_ext >&5
8716
Martin v. Löwis11437992002-04-12 09:54:03 +00008717( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008719 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008720See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008721echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008722See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008723 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724 else
8725 ac_cv_sizeof_void_p=0
8726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728rm -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 +00008729fi
8730rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008731fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008732{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8733echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734
8735
8736
Martin v. Löwis11437992002-04-12 09:54:03 +00008737cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008738#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008739_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008740
8741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008742{ echo "$as_me:$LINENO: checking for short" >&5
8743echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8744if test "${ac_cv_type_short+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8746else
8747 cat >conftest.$ac_ext <<_ACEOF
8748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
8753$ac_includes_default
8754typedef short ac__type_new_;
8755int
8756main ()
8757{
8758if ((ac__type_new_ *) 0)
8759 return 0;
8760if (sizeof (ac__type_new_))
8761 return 0;
8762 ;
8763 return 0;
8764}
8765_ACEOF
8766rm -f conftest.$ac_objext
8767if { (ac_try="$ac_compile"
8768case "(($ac_try" in
8769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8770 *) ac_try_echo=$ac_try;;
8771esac
8772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8773 (eval "$ac_compile") 2>conftest.er1
8774 ac_status=$?
8775 grep -v '^ *+' conftest.er1 >conftest.err
8776 rm -f conftest.er1
8777 cat conftest.err >&5
8778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779 (exit $ac_status); } && {
8780 test -z "$ac_c_werror_flag" ||
8781 test ! -s conftest.err
8782 } && test -s conftest.$ac_objext; then
8783 ac_cv_type_short=yes
8784else
8785 echo "$as_me: failed program was:" >&5
8786sed 's/^/| /' conftest.$ac_ext >&5
8787
8788 ac_cv_type_short=no
8789fi
8790
8791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8792fi
8793{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8794echo "${ECHO_T}$ac_cv_type_short" >&6; }
8795
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796# The cast to long int works around a bug in the HP C Compiler
8797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8799# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800{ echo "$as_me:$LINENO: checking size of short" >&5
8801echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008802if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008804else
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 if test "$cross_compiling" = yes; then
8806 # Depending upon the size, compute the lo and hi bounds.
8807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008814 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008818static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008819test_array [0] = 0
8820
8821 ;
8822 return 0;
8823}
8824_ACEOF
8825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826if { (ac_try="$ac_compile"
8827case "(($ac_try" in
8828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8829 *) ac_try_echo=$ac_try;;
8830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008834 grep -v '^ *+' conftest.er1 >conftest.err
8835 rm -f conftest.er1
8836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838 (exit $ac_status); } && {
8839 test -z "$ac_c_werror_flag" ||
8840 test ! -s conftest.err
8841 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_lo=0 ac_mid=0
8843 while :; do
8844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* confdefs.h. */
8846_ACEOF
8847cat confdefs.h >>conftest.$ac_ext
8848cat >>conftest.$ac_ext <<_ACEOF
8849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008851 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008852int
8853main ()
8854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008856test_array [0] = 0
8857
8858 ;
8859 return 0;
8860}
8861_ACEOF
8862rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008863if { (ac_try="$ac_compile"
8864case "(($ac_try" in
8865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8866 *) ac_try_echo=$ac_try;;
8867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008869 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008871 grep -v '^ *+' conftest.er1 >conftest.err
8872 rm -f conftest.er1
8873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008875 (exit $ac_status); } && {
8876 test -z "$ac_c_werror_flag" ||
8877 test ! -s conftest.err
8878 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_hi=$ac_mid; break
8880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008882sed 's/^/| /' conftest.$ac_ext >&5
8883
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 ac_lo=`expr $ac_mid + 1`
8885 if test $ac_lo -le $ac_mid; then
8886 ac_lo= ac_hi=
8887 break
8888 fi
8889 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008891
8892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 done
8894else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwiseba40652007-08-30 20:10:57 +00008898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008899/* confdefs.h. */
8900_ACEOF
8901cat confdefs.h >>conftest.$ac_ext
8902cat >>conftest.$ac_ext <<_ACEOF
8903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008905 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906int
8907main ()
8908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008910test_array [0] = 0
8911
8912 ;
8913 return 0;
8914}
8915_ACEOF
8916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917if { (ac_try="$ac_compile"
8918case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008925 grep -v '^ *+' conftest.er1 >conftest.err
8926 rm -f conftest.er1
8927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 (exit $ac_status); } && {
8930 test -z "$ac_c_werror_flag" ||
8931 test ! -s conftest.err
8932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_hi=-1 ac_mid=-1
8934 while :; do
8935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008936/* confdefs.h. */
8937_ACEOF
8938cat confdefs.h >>conftest.$ac_ext
8939cat >>conftest.$ac_ext <<_ACEOF
8940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008941$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008946static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008947test_array [0] = 0
8948
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954if { (ac_try="$ac_compile"
8955case "(($ac_try" in
8956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8957 *) ac_try_echo=$ac_try;;
8958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008962 grep -v '^ *+' conftest.er1 >conftest.err
8963 rm -f conftest.er1
8964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966 (exit $ac_status); } && {
8967 test -z "$ac_c_werror_flag" ||
8968 test ! -s conftest.err
8969 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_lo=$ac_mid; break
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 ac_hi=`expr '(' $ac_mid ')' - 1`
8976 if test $ac_mid -le $ac_hi; then
8977 ac_lo= ac_hi=
8978 break
8979 fi
8980 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 done
8985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008987sed 's/^/| /' conftest.$ac_ext >&5
8988
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008996# Binary search between lo and hi bounds.
8997while test "x$ac_lo" != "x$ac_hi"; do
8998 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009000/* confdefs.h. */
9001_ACEOF
9002cat confdefs.h >>conftest.$ac_ext
9003cat >>conftest.$ac_ext <<_ACEOF
9004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009005$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009006 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009007int
9008main ()
9009{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009010static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009011test_array [0] = 0
9012
9013 ;
9014 return 0;
9015}
9016_ACEOF
9017rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018if { (ac_try="$ac_compile"
9019case "(($ac_try" in
9020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9021 *) ac_try_echo=$ac_try;;
9022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009024 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009026 grep -v '^ *+' conftest.er1 >conftest.err
9027 rm -f conftest.er1
9028 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009030 (exit $ac_status); } && {
9031 test -z "$ac_c_werror_flag" ||
9032 test ! -s conftest.err
9033 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_hi=$ac_mid
9035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009037sed 's/^/| /' conftest.$ac_ext >&5
9038
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041
9042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009043done
9044case $ac_lo in
9045?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009047 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009048See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009049echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009050See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009051 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009052 else
9053 ac_cv_sizeof_short=0
9054 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009055esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009058/* confdefs.h. */
9059_ACEOF
9060cat confdefs.h >>conftest.$ac_ext
9061cat >>conftest.$ac_ext <<_ACEOF
9062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009063$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009064 typedef short ac__type_sizeof_;
9065static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9066static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009067#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009068#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009069int
9070main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071{
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
9073 FILE *f = fopen ("conftest.val", "w");
9074 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009079 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009081 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 }
9083 else
9084 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009086 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009089 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009090 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
9092 ;
9093 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009094}
Martin v. Löwis11437992002-04-12 09:54:03 +00009095_ACEOF
9096rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097if { (ac_try="$ac_link"
9098case "(($ac_try" in
9099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9100 *) ac_try_echo=$ac_try;;
9101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009103 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 { (case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 (exit $ac_status); }; }; then
9116 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009118 echo "$as_me: program exited with status $ac_status" >&5
9119echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009120sed 's/^/| /' conftest.$ac_ext >&5
9121
Martin v. Löwis11437992002-04-12 09:54:03 +00009122( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009124 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009125See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009126echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009127See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009128 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129 else
9130 ac_cv_sizeof_short=0
9131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133rm -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 +00009134fi
9135rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009137{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9138echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139
9140
9141
Martin v. Löwis11437992002-04-12 09:54:03 +00009142cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009143#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009144_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145
9146
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009147{ echo "$as_me:$LINENO: checking for float" >&5
9148echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9149if test "${ac_cv_type_float+set}" = set; then
9150 echo $ECHO_N "(cached) $ECHO_C" >&6
9151else
9152 cat >conftest.$ac_ext <<_ACEOF
9153/* confdefs.h. */
9154_ACEOF
9155cat confdefs.h >>conftest.$ac_ext
9156cat >>conftest.$ac_ext <<_ACEOF
9157/* end confdefs.h. */
9158$ac_includes_default
9159typedef float ac__type_new_;
9160int
9161main ()
9162{
9163if ((ac__type_new_ *) 0)
9164 return 0;
9165if (sizeof (ac__type_new_))
9166 return 0;
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171rm -f conftest.$ac_objext
9172if { (ac_try="$ac_compile"
9173case "(($ac_try" in
9174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9175 *) ac_try_echo=$ac_try;;
9176esac
9177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9178 (eval "$ac_compile") 2>conftest.er1
9179 ac_status=$?
9180 grep -v '^ *+' conftest.er1 >conftest.err
9181 rm -f conftest.er1
9182 cat conftest.err >&5
9183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9184 (exit $ac_status); } && {
9185 test -z "$ac_c_werror_flag" ||
9186 test ! -s conftest.err
9187 } && test -s conftest.$ac_objext; then
9188 ac_cv_type_float=yes
9189else
9190 echo "$as_me: failed program was:" >&5
9191sed 's/^/| /' conftest.$ac_ext >&5
9192
9193 ac_cv_type_float=no
9194fi
9195
9196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9197fi
9198{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9199echo "${ECHO_T}$ac_cv_type_float" >&6; }
9200
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201# The cast to long int works around a bug in the HP C Compiler
9202# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9203# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9204# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205{ echo "$as_me:$LINENO: checking size of float" >&5
9206echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009207if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009209else
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 if test "$cross_compiling" = yes; then
9211 # Depending upon the size, compute the lo and hi bounds.
9212cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009213/* confdefs.h. */
9214_ACEOF
9215cat confdefs.h >>conftest.$ac_ext
9216cat >>conftest.$ac_ext <<_ACEOF
9217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009218$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009219 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009224test_array [0] = 0
9225
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231if { (ac_try="$ac_compile"
9232case "(($ac_try" in
9233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9234 *) ac_try_echo=$ac_try;;
9235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009239 grep -v '^ *+' conftest.er1 >conftest.err
9240 rm -f conftest.er1
9241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243 (exit $ac_status); } && {
9244 test -z "$ac_c_werror_flag" ||
9245 test ! -s conftest.err
9246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_lo=0 ac_mid=0
9248 while :; do
9249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009250/* confdefs.h. */
9251_ACEOF
9252cat confdefs.h >>conftest.$ac_ext
9253cat >>conftest.$ac_ext <<_ACEOF
9254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009255$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009256 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009257int
9258main ()
9259{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009261test_array [0] = 0
9262
9263 ;
9264 return 0;
9265}
9266_ACEOF
9267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268if { (ac_try="$ac_compile"
9269case "(($ac_try" in
9270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271 *) ac_try_echo=$ac_try;;
9272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009276 grep -v '^ *+' conftest.er1 >conftest.err
9277 rm -f conftest.er1
9278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009280 (exit $ac_status); } && {
9281 test -z "$ac_c_werror_flag" ||
9282 test ! -s conftest.err
9283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_hi=$ac_mid; break
9285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009287sed 's/^/| /' conftest.$ac_ext >&5
9288
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 ac_lo=`expr $ac_mid + 1`
9290 if test $ac_lo -le $ac_mid; then
9291 ac_lo= ac_hi=
9292 break
9293 fi
9294 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296
9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 done
9299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009301sed 's/^/| /' conftest.$ac_ext >&5
9302
Martin v. Löwiseba40652007-08-30 20:10:57 +00009303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009310 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009311int
9312main ()
9313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009315test_array [0] = 0
9316
9317 ;
9318 return 0;
9319}
9320_ACEOF
9321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009322if { (ac_try="$ac_compile"
9323case "(($ac_try" in
9324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9325 *) ac_try_echo=$ac_try;;
9326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009330 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1
9332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 (exit $ac_status); } && {
9335 test -z "$ac_c_werror_flag" ||
9336 test ! -s conftest.err
9337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_hi=-1 ac_mid=-1
9339 while :; do
9340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* confdefs.h. */
9342_ACEOF
9343cat confdefs.h >>conftest.$ac_ext
9344cat >>conftest.$ac_ext <<_ACEOF
9345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009346$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009348int
9349main ()
9350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009352test_array [0] = 0
9353
9354 ;
9355 return 0;
9356}
9357_ACEOF
9358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009359if { (ac_try="$ac_compile"
9360case "(($ac_try" in
9361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9362 *) ac_try_echo=$ac_try;;
9363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009367 grep -v '^ *+' conftest.er1 >conftest.err
9368 rm -f conftest.er1
9369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009371 (exit $ac_status); } && {
9372 test -z "$ac_c_werror_flag" ||
9373 test ! -s conftest.err
9374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_lo=$ac_mid; break
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 ac_hi=`expr '(' $ac_mid ')' - 1`
9381 if test $ac_mid -le $ac_hi; then
9382 ac_lo= ac_hi=
9383 break
9384 fi
9385 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009387
9388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 done
9390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009392sed 's/^/| /' conftest.$ac_ext >&5
9393
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009399
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009401# Binary search between lo and hi bounds.
9402while test "x$ac_lo" != "x$ac_hi"; do
9403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* confdefs.h. */
9406_ACEOF
9407cat confdefs.h >>conftest.$ac_ext
9408cat >>conftest.$ac_ext <<_ACEOF
9409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009411 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009412int
9413main ()
9414{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009416test_array [0] = 0
9417
9418 ;
9419 return 0;
9420}
9421_ACEOF
9422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423if { (ac_try="$ac_compile"
9424case "(($ac_try" in
9425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9426 *) ac_try_echo=$ac_try;;
9427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009431 grep -v '^ *+' conftest.er1 >conftest.err
9432 rm -f conftest.er1
9433 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009435 (exit $ac_status); } && {
9436 test -z "$ac_c_werror_flag" ||
9437 test ! -s conftest.err
9438 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_hi=$ac_mid
9440else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009442sed 's/^/| /' conftest.$ac_ext >&5
9443
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446
9447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009448done
9449case $ac_lo in
9450?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009453See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009454echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009455See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009456 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 else
9458 ac_cv_sizeof_float=0
9459 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009460esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009461else
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* confdefs.h. */
9464_ACEOF
9465cat confdefs.h >>conftest.$ac_ext
9466cat >>conftest.$ac_ext <<_ACEOF
9467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009468$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009469 typedef float ac__type_sizeof_;
9470static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9471static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009472#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009473#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476{
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
9478 FILE *f = fopen ("conftest.val", "w");
9479 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009486 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 }
9488 else
9489 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
9497 ;
9498 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009499}
Martin v. Löwis11437992002-04-12 09:54:03 +00009500_ACEOF
9501rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502if { (ac_try="$ac_link"
9503case "(($ac_try" in
9504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9505 *) ac_try_echo=$ac_try;;
9506esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 { (case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 (exit $ac_status); }; }; then
9521 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009523 echo "$as_me: program exited with status $ac_status" >&5
9524echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009525sed 's/^/| /' conftest.$ac_ext >&5
9526
Martin v. Löwis11437992002-04-12 09:54:03 +00009527( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009530See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009531echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009532See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009533 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 else
9535 ac_cv_sizeof_float=0
9536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538rm -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 +00009539fi
9540rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9543echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544
9545
9546
Martin v. Löwis11437992002-04-12 09:54:03 +00009547cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009548#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009549_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550
9551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009552{ echo "$as_me:$LINENO: checking for double" >&5
9553echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9554if test "${ac_cv_type_double+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9556else
9557 cat >conftest.$ac_ext <<_ACEOF
9558/* confdefs.h. */
9559_ACEOF
9560cat confdefs.h >>conftest.$ac_ext
9561cat >>conftest.$ac_ext <<_ACEOF
9562/* end confdefs.h. */
9563$ac_includes_default
9564typedef double ac__type_new_;
9565int
9566main ()
9567{
9568if ((ac__type_new_ *) 0)
9569 return 0;
9570if (sizeof (ac__type_new_))
9571 return 0;
9572 ;
9573 return 0;
9574}
9575_ACEOF
9576rm -f conftest.$ac_objext
9577if { (ac_try="$ac_compile"
9578case "(($ac_try" in
9579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9580 *) ac_try_echo=$ac_try;;
9581esac
9582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9583 (eval "$ac_compile") 2>conftest.er1
9584 ac_status=$?
9585 grep -v '^ *+' conftest.er1 >conftest.err
9586 rm -f conftest.er1
9587 cat conftest.err >&5
9588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9589 (exit $ac_status); } && {
9590 test -z "$ac_c_werror_flag" ||
9591 test ! -s conftest.err
9592 } && test -s conftest.$ac_objext; then
9593 ac_cv_type_double=yes
9594else
9595 echo "$as_me: failed program was:" >&5
9596sed 's/^/| /' conftest.$ac_ext >&5
9597
9598 ac_cv_type_double=no
9599fi
9600
9601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9602fi
9603{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9604echo "${ECHO_T}$ac_cv_type_double" >&6; }
9605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606# The cast to long int works around a bug in the HP C Compiler
9607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9609# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610{ echo "$as_me:$LINENO: checking size of double" >&5
9611echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009612if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 if test "$cross_compiling" = yes; then
9616 # Depending upon the size, compute the lo and hi bounds.
9617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* confdefs.h. */
9619_ACEOF
9620cat confdefs.h >>conftest.$ac_ext
9621cat >>conftest.$ac_ext <<_ACEOF
9622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009624 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009625int
9626main ()
9627{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009629test_array [0] = 0
9630
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636if { (ac_try="$ac_compile"
9637case "(($ac_try" in
9638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9639 *) ac_try_echo=$ac_try;;
9640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009644 grep -v '^ *+' conftest.er1 >conftest.err
9645 rm -f conftest.er1
9646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648 (exit $ac_status); } && {
9649 test -z "$ac_c_werror_flag" ||
9650 test ! -s conftest.err
9651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_lo=0 ac_mid=0
9653 while :; do
9654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* confdefs.h. */
9656_ACEOF
9657cat confdefs.h >>conftest.$ac_ext
9658cat >>conftest.$ac_ext <<_ACEOF
9659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009661 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009662int
9663main ()
9664{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009666test_array [0] = 0
9667
9668 ;
9669 return 0;
9670}
9671_ACEOF
9672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673if { (ac_try="$ac_compile"
9674case "(($ac_try" in
9675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9676 *) ac_try_echo=$ac_try;;
9677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009681 grep -v '^ *+' conftest.er1 >conftest.err
9682 rm -f conftest.er1
9683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009685 (exit $ac_status); } && {
9686 test -z "$ac_c_werror_flag" ||
9687 test ! -s conftest.err
9688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_hi=$ac_mid; break
9690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009692sed 's/^/| /' conftest.$ac_ext >&5
9693
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 ac_lo=`expr $ac_mid + 1`
9695 if test $ac_lo -le $ac_mid; then
9696 ac_lo= ac_hi=
9697 break
9698 fi
9699 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009701
9702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 done
9704else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009706sed 's/^/| /' conftest.$ac_ext >&5
9707
Martin v. Löwiseba40652007-08-30 20:10:57 +00009708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009715 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009720test_array [0] = 0
9721
9722 ;
9723 return 0;
9724}
9725_ACEOF
9726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009727if { (ac_try="$ac_compile"
9728case "(($ac_try" in
9729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9730 *) ac_try_echo=$ac_try;;
9731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735 grep -v '^ *+' conftest.er1 >conftest.err
9736 rm -f conftest.er1
9737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 (exit $ac_status); } && {
9740 test -z "$ac_c_werror_flag" ||
9741 test ! -s conftest.err
9742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_hi=-1 ac_mid=-1
9744 while :; do
9745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* confdefs.h. */
9747_ACEOF
9748cat confdefs.h >>conftest.$ac_ext
9749cat >>conftest.$ac_ext <<_ACEOF
9750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009751$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753int
9754main ()
9755{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009757test_array [0] = 0
9758
9759 ;
9760 return 0;
9761}
9762_ACEOF
9763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764if { (ac_try="$ac_compile"
9765case "(($ac_try" in
9766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9767 *) ac_try_echo=$ac_try;;
9768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009772 grep -v '^ *+' conftest.er1 >conftest.err
9773 rm -f conftest.er1
9774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009776 (exit $ac_status); } && {
9777 test -z "$ac_c_werror_flag" ||
9778 test ! -s conftest.err
9779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_lo=$ac_mid; break
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 ac_hi=`expr '(' $ac_mid ')' - 1`
9786 if test $ac_mid -le $ac_hi; then
9787 ac_lo= ac_hi=
9788 break
9789 fi
9790 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792
9793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 done
9795else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009797sed 's/^/| /' conftest.$ac_ext >&5
9798
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804
9805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806# Binary search between lo and hi bounds.
9807while test "x$ac_lo" != "x$ac_hi"; do
9808 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* confdefs.h. */
9811_ACEOF
9812cat confdefs.h >>conftest.$ac_ext
9813cat >>conftest.$ac_ext <<_ACEOF
9814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009816 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009817int
9818main ()
9819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009821test_array [0] = 0
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828if { (ac_try="$ac_compile"
9829case "(($ac_try" in
9830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9831 *) ac_try_echo=$ac_try;;
9832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009836 grep -v '^ *+' conftest.er1 >conftest.err
9837 rm -f conftest.er1
9838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009840 (exit $ac_status); } && {
9841 test -z "$ac_c_werror_flag" ||
9842 test ! -s conftest.err
9843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_hi=$ac_mid
9845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009847sed 's/^/| /' conftest.$ac_ext >&5
9848
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851
9852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853done
9854case $ac_lo in
9855?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009856'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009858See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009859echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009860See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009861 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009862 else
9863 ac_cv_sizeof_double=0
9864 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009865esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* confdefs.h. */
9869_ACEOF
9870cat confdefs.h >>conftest.$ac_ext
9871cat >>conftest.$ac_ext <<_ACEOF
9872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009874 typedef double ac__type_sizeof_;
9875static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9876static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009878#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009879int
9880main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881{
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
9883 FILE *f = fopen ("conftest.val", "w");
9884 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009891 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 }
9893 else
9894 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009896 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009900 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009901
9902 ;
9903 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009904}
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
9906rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009907if { (ac_try="$ac_link"
9908case "(($ac_try" in
9909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9910 *) ac_try_echo=$ac_try;;
9911esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009913 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 { (case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 (exit $ac_status); }; }; then
9926 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009927else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009928 echo "$as_me: program exited with status $ac_status" >&5
9929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009930sed 's/^/| /' conftest.$ac_ext >&5
9931
Martin v. Löwis11437992002-04-12 09:54:03 +00009932( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009935See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009936echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009937See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009938 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939 else
9940 ac_cv_sizeof_double=0
9941 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943rm -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 +00009944fi
9945rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009947{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9948echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949
9950
9951
Martin v. Löwis11437992002-04-12 09:54:03 +00009952cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009953#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009954_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955
9956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009957{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9958echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9959if test "${ac_cv_type_fpos_t+set}" = set; then
9960 echo $ECHO_N "(cached) $ECHO_C" >&6
9961else
9962 cat >conftest.$ac_ext <<_ACEOF
9963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
9968$ac_includes_default
9969typedef fpos_t ac__type_new_;
9970int
9971main ()
9972{
9973if ((ac__type_new_ *) 0)
9974 return 0;
9975if (sizeof (ac__type_new_))
9976 return 0;
9977 ;
9978 return 0;
9979}
9980_ACEOF
9981rm -f conftest.$ac_objext
9982if { (ac_try="$ac_compile"
9983case "(($ac_try" in
9984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9985 *) ac_try_echo=$ac_try;;
9986esac
9987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9988 (eval "$ac_compile") 2>conftest.er1
9989 ac_status=$?
9990 grep -v '^ *+' conftest.er1 >conftest.err
9991 rm -f conftest.er1
9992 cat conftest.err >&5
9993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9994 (exit $ac_status); } && {
9995 test -z "$ac_c_werror_flag" ||
9996 test ! -s conftest.err
9997 } && test -s conftest.$ac_objext; then
9998 ac_cv_type_fpos_t=yes
9999else
10000 echo "$as_me: failed program was:" >&5
10001sed 's/^/| /' conftest.$ac_ext >&5
10002
10003 ac_cv_type_fpos_t=no
10004fi
10005
10006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10007fi
10008{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10009echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10010
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011# The cast to long int works around a bug in the HP C Compiler
10012# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10013# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10014# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10016echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010017if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010018 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 if test "$cross_compiling" = yes; then
10021 # Depending upon the size, compute the lo and hi bounds.
10022cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* confdefs.h. */
10024_ACEOF
10025cat confdefs.h >>conftest.$ac_ext
10026cat >>conftest.$ac_ext <<_ACEOF
10027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010029 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010030int
10031main ()
10032{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010034test_array [0] = 0
10035
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041if { (ac_try="$ac_compile"
10042case "(($ac_try" in
10043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10044 *) ac_try_echo=$ac_try;;
10045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010049 grep -v '^ *+' conftest.er1 >conftest.err
10050 rm -f conftest.er1
10051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053 (exit $ac_status); } && {
10054 test -z "$ac_c_werror_flag" ||
10055 test ! -s conftest.err
10056 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_lo=0 ac_mid=0
10058 while :; do
10059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* confdefs.h. */
10061_ACEOF
10062cat confdefs.h >>conftest.$ac_ext
10063cat >>conftest.$ac_ext <<_ACEOF
10064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010065$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010066 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010070static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010071test_array [0] = 0
10072
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078if { (ac_try="$ac_compile"
10079case "(($ac_try" in
10080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10081 *) ac_try_echo=$ac_try;;
10082esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010086 grep -v '^ *+' conftest.er1 >conftest.err
10087 rm -f conftest.er1
10088 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010090 (exit $ac_status); } && {
10091 test -z "$ac_c_werror_flag" ||
10092 test ! -s conftest.err
10093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_hi=$ac_mid; break
10095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010097sed 's/^/| /' conftest.$ac_ext >&5
10098
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 ac_lo=`expr $ac_mid + 1`
10100 if test $ac_lo -le $ac_mid; then
10101 ac_lo= ac_hi=
10102 break
10103 fi
10104 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106
10107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 done
10109else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* confdefs.h. */
10115_ACEOF
10116cat confdefs.h >>conftest.$ac_ext
10117cat >>conftest.$ac_ext <<_ACEOF
10118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010120 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010125test_array [0] = 0
10126
10127 ;
10128 return 0;
10129}
10130_ACEOF
10131rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132if { (ac_try="$ac_compile"
10133case "(($ac_try" in
10134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10135 *) ac_try_echo=$ac_try;;
10136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010140 grep -v '^ *+' conftest.er1 >conftest.err
10141 rm -f conftest.er1
10142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 (exit $ac_status); } && {
10145 test -z "$ac_c_werror_flag" ||
10146 test ! -s conftest.err
10147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_hi=-1 ac_mid=-1
10149 while :; do
10150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* confdefs.h. */
10152_ACEOF
10153cat confdefs.h >>conftest.$ac_ext
10154cat >>conftest.$ac_ext <<_ACEOF
10155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010181 (exit $ac_status); } && {
10182 test -z "$ac_c_werror_flag" ||
10183 test ! -s conftest.err
10184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_lo=$ac_mid; break
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 ac_hi=`expr '(' $ac_mid ')' - 1`
10191 if test $ac_mid -le $ac_hi; then
10192 ac_lo= ac_hi=
10193 break
10194 fi
10195 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 done
10200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010202sed 's/^/| /' conftest.$ac_ext >&5
10203
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010209
10210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010211# Binary search between lo and hi bounds.
10212while test "x$ac_lo" != "x$ac_hi"; do
10213 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010221 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010222int
10223main ()
10224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010226test_array [0] = 0
10227
10228 ;
10229 return 0;
10230}
10231_ACEOF
10232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233if { (ac_try="$ac_compile"
10234case "(($ac_try" in
10235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10236 *) ac_try_echo=$ac_try;;
10237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010241 grep -v '^ *+' conftest.er1 >conftest.err
10242 rm -f conftest.er1
10243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010245 (exit $ac_status); } && {
10246 test -z "$ac_c_werror_flag" ||
10247 test ! -s conftest.err
10248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_hi=$ac_mid
10250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010252sed 's/^/| /' conftest.$ac_ext >&5
10253
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010258done
10259case $ac_lo in
10260?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010261'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010262 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010263See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010264echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010265See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010266 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 else
10268 ac_cv_sizeof_fpos_t=0
10269 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010270esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010271else
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* confdefs.h. */
10274_ACEOF
10275cat confdefs.h >>conftest.$ac_ext
10276cat >>conftest.$ac_ext <<_ACEOF
10277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010279 typedef fpos_t ac__type_sizeof_;
10280static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10281static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010282#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010283#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010284int
10285main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286{
Martin v. Löwis11437992002-04-12 09:54:03 +000010287
10288 FILE *f = fopen ("conftest.val", "w");
10289 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010294 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010296 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010297 }
10298 else
10299 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010301 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010306
10307 ;
10308 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010309}
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
10311rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010312if { (ac_try="$ac_link"
10313case "(($ac_try" in
10314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10315 *) ac_try_echo=$ac_try;;
10316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010318 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 { (case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 (exit $ac_status); }; }; then
10331 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010333 echo "$as_me: program exited with status $ac_status" >&5
10334echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010335sed 's/^/| /' conftest.$ac_ext >&5
10336
Martin v. Löwis11437992002-04-12 09:54:03 +000010337( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010339 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010340See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010341echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010342See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010343 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344 else
10345 ac_cv_sizeof_fpos_t=0
10346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010348rm -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 +000010349fi
10350rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010352{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10353echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010354
10355
10356
Martin v. Löwis11437992002-04-12 09:54:03 +000010357cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010358#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010359_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360
Michael W. Hudson54241132001-12-07 15:38:26 +000010361
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010362{ echo "$as_me:$LINENO: checking for size_t" >&5
10363echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10364if test "${ac_cv_type_size_t+set}" = set; then
10365 echo $ECHO_N "(cached) $ECHO_C" >&6
10366else
10367 cat >conftest.$ac_ext <<_ACEOF
10368/* confdefs.h. */
10369_ACEOF
10370cat confdefs.h >>conftest.$ac_ext
10371cat >>conftest.$ac_ext <<_ACEOF
10372/* end confdefs.h. */
10373$ac_includes_default
10374typedef size_t ac__type_new_;
10375int
10376main ()
10377{
10378if ((ac__type_new_ *) 0)
10379 return 0;
10380if (sizeof (ac__type_new_))
10381 return 0;
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext
10387if { (ac_try="$ac_compile"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_compile") 2>conftest.er1
10394 ac_status=$?
10395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10399 (exit $ac_status); } && {
10400 test -z "$ac_c_werror_flag" ||
10401 test ! -s conftest.err
10402 } && test -s conftest.$ac_objext; then
10403 ac_cv_type_size_t=yes
10404else
10405 echo "$as_me: failed program was:" >&5
10406sed 's/^/| /' conftest.$ac_ext >&5
10407
10408 ac_cv_type_size_t=no
10409fi
10410
10411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10412fi
10413{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10414echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10415
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416# The cast to long int works around a bug in the HP C Compiler
10417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10419# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420{ echo "$as_me:$LINENO: checking size of size_t" >&5
10421echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010424else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425 if test "$cross_compiling" = yes; then
10426 # Depending upon the size, compute the lo and hi bounds.
10427cat >conftest.$ac_ext <<_ACEOF
10428/* confdefs.h. */
10429_ACEOF
10430cat confdefs.h >>conftest.$ac_ext
10431cat >>conftest.$ac_ext <<_ACEOF
10432/* end confdefs.h. */
10433$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010434 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435int
10436main ()
10437{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439test_array [0] = 0
10440
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453 ac_status=$?
10454 grep -v '^ *+' conftest.er1 >conftest.err
10455 rm -f conftest.er1
10456 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010458 (exit $ac_status); } && {
10459 test -z "$ac_c_werror_flag" ||
10460 test ! -s conftest.err
10461 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_lo=0 ac_mid=0
10463 while :; do
10464 cat >conftest.$ac_ext <<_ACEOF
10465/* confdefs.h. */
10466_ACEOF
10467cat confdefs.h >>conftest.$ac_ext
10468cat >>conftest.$ac_ext <<_ACEOF
10469/* end confdefs.h. */
10470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010471 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472int
10473main ()
10474{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010475static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010476test_array [0] = 0
10477
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483if { (ac_try="$ac_compile"
10484case "(($ac_try" in
10485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10486 *) ac_try_echo=$ac_try;;
10487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010490 ac_status=$?
10491 grep -v '^ *+' conftest.er1 >conftest.err
10492 rm -f conftest.er1
10493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495 (exit $ac_status); } && {
10496 test -z "$ac_c_werror_flag" ||
10497 test ! -s conftest.err
10498 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 ac_hi=$ac_mid; break
10500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502sed 's/^/| /' conftest.$ac_ext >&5
10503
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 ac_lo=`expr $ac_mid + 1`
10505 if test $ac_lo -le $ac_mid; then
10506 ac_lo= ac_hi=
10507 break
10508 fi
10509 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511
10512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513 done
10514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010515 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516sed 's/^/| /' conftest.$ac_ext >&5
10517
Martin v. Löwiseba40652007-08-30 20:10:57 +000010518 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519/* confdefs.h. */
10520_ACEOF
10521cat confdefs.h >>conftest.$ac_ext
10522cat >>conftest.$ac_ext <<_ACEOF
10523/* end confdefs.h. */
10524$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010525 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526int
10527main ()
10528{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530test_array [0] = 0
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010537if { (ac_try="$ac_compile"
10538case "(($ac_try" in
10539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10540 *) ac_try_echo=$ac_try;;
10541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544 ac_status=$?
10545 grep -v '^ *+' conftest.er1 >conftest.err
10546 rm -f conftest.er1
10547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549 (exit $ac_status); } && {
10550 test -z "$ac_c_werror_flag" ||
10551 test ! -s conftest.err
10552 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_hi=-1 ac_mid=-1
10554 while :; do
10555 cat >conftest.$ac_ext <<_ACEOF
10556/* confdefs.h. */
10557_ACEOF
10558cat confdefs.h >>conftest.$ac_ext
10559cat >>conftest.$ac_ext <<_ACEOF
10560/* end confdefs.h. */
10561$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010563int
10564main ()
10565{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010566static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567test_array [0] = 0
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574if { (ac_try="$ac_compile"
10575case "(($ac_try" in
10576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10577 *) ac_try_echo=$ac_try;;
10578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581 ac_status=$?
10582 grep -v '^ *+' conftest.er1 >conftest.err
10583 rm -f conftest.er1
10584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010586 (exit $ac_status); } && {
10587 test -z "$ac_c_werror_flag" ||
10588 test ! -s conftest.err
10589 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_lo=$ac_mid; break
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 ac_hi=`expr '(' $ac_mid ')' - 1`
10596 if test $ac_mid -le $ac_hi; then
10597 ac_lo= ac_hi=
10598 break
10599 fi
10600 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010602
10603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604 done
10605else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010606 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607sed 's/^/| /' conftest.$ac_ext >&5
10608
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010614
10615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616# Binary search between lo and hi bounds.
10617while test "x$ac_lo" != "x$ac_hi"; do
10618 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10619 cat >conftest.$ac_ext <<_ACEOF
10620/* confdefs.h. */
10621_ACEOF
10622cat confdefs.h >>conftest.$ac_ext
10623cat >>conftest.$ac_ext <<_ACEOF
10624/* end confdefs.h. */
10625$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010626 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627int
10628main ()
10629{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631test_array [0] = 0
10632
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638if { (ac_try="$ac_compile"
10639case "(($ac_try" in
10640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10641 *) ac_try_echo=$ac_try;;
10642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 ac_status=$?
10646 grep -v '^ *+' conftest.er1 >conftest.err
10647 rm -f conftest.er1
10648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010650 (exit $ac_status); } && {
10651 test -z "$ac_c_werror_flag" ||
10652 test ! -s conftest.err
10653 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 ac_hi=$ac_mid
10655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010656 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657sed 's/^/| /' conftest.$ac_ext >&5
10658
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661
10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663done
10664case $ac_lo in
10665?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010667 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010669echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010671 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 else
10673 ac_cv_sizeof_size_t=0
10674 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675esac
10676else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677 cat >conftest.$ac_ext <<_ACEOF
10678/* confdefs.h. */
10679_ACEOF
10680cat confdefs.h >>conftest.$ac_ext
10681cat >>conftest.$ac_ext <<_ACEOF
10682/* end confdefs.h. */
10683$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010684 typedef size_t ac__type_sizeof_;
10685static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10686static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687#include <stdio.h>
10688#include <stdlib.h>
10689int
10690main ()
10691{
10692
10693 FILE *f = fopen ("conftest.val", "w");
10694 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010699 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010701 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702 }
10703 else
10704 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010706 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010709 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010717if { (ac_try="$ac_link"
10718case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010723 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 { (case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 (exit $ac_status); }; }; then
10736 ac_cv_sizeof_size_t=`cat conftest.val`
10737else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738 echo "$as_me: program exited with status $ac_status" >&5
10739echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740sed 's/^/| /' conftest.$ac_ext >&5
10741
10742( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010743if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010744 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010745See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010746echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010748 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749 else
10750 ac_cv_sizeof_size_t=0
10751 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010753rm -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 +000010754fi
10755rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010757{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10758echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759
10760
10761
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762cat >>confdefs.h <<_ACEOF
10763#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10764_ACEOF
10765
10766
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767{ echo "$as_me:$LINENO: checking for pid_t" >&5
10768echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10769if test "${ac_cv_type_pid_t+set}" = set; then
10770 echo $ECHO_N "(cached) $ECHO_C" >&6
10771else
10772 cat >conftest.$ac_ext <<_ACEOF
10773/* confdefs.h. */
10774_ACEOF
10775cat confdefs.h >>conftest.$ac_ext
10776cat >>conftest.$ac_ext <<_ACEOF
10777/* end confdefs.h. */
10778$ac_includes_default
10779typedef pid_t ac__type_new_;
10780int
10781main ()
10782{
10783if ((ac__type_new_ *) 0)
10784 return 0;
10785if (sizeof (ac__type_new_))
10786 return 0;
10787 ;
10788 return 0;
10789}
10790_ACEOF
10791rm -f conftest.$ac_objext
10792if { (ac_try="$ac_compile"
10793case "(($ac_try" in
10794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10795 *) ac_try_echo=$ac_try;;
10796esac
10797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10798 (eval "$ac_compile") 2>conftest.er1
10799 ac_status=$?
10800 grep -v '^ *+' conftest.er1 >conftest.err
10801 rm -f conftest.er1
10802 cat conftest.err >&5
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); } && {
10805 test -z "$ac_c_werror_flag" ||
10806 test ! -s conftest.err
10807 } && test -s conftest.$ac_objext; then
10808 ac_cv_type_pid_t=yes
10809else
10810 echo "$as_me: failed program was:" >&5
10811sed 's/^/| /' conftest.$ac_ext >&5
10812
10813 ac_cv_type_pid_t=no
10814fi
10815
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10817fi
10818{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10819echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10820
Christian Heimes951cc0f2008-01-31 23:08:23 +000010821# The cast to long int works around a bug in the HP C Compiler
10822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10824# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10826echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010827if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010828 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010829else
10830 if test "$cross_compiling" = yes; then
10831 # Depending upon the size, compute the lo and hi bounds.
10832cat >conftest.$ac_ext <<_ACEOF
10833/* confdefs.h. */
10834_ACEOF
10835cat confdefs.h >>conftest.$ac_ext
10836cat >>conftest.$ac_ext <<_ACEOF
10837/* end confdefs.h. */
10838$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010839 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010840int
10841main ()
10842{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010843static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010844test_array [0] = 0
10845
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
10851if { (ac_try="$ac_compile"
10852case "(($ac_try" in
10853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10854 *) ac_try_echo=$ac_try;;
10855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010857 (eval "$ac_compile") 2>conftest.er1
10858 ac_status=$?
10859 grep -v '^ *+' conftest.er1 >conftest.err
10860 rm -f conftest.er1
10861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010863 (exit $ac_status); } && {
10864 test -z "$ac_c_werror_flag" ||
10865 test ! -s conftest.err
10866 } && test -s conftest.$ac_objext; then
10867 ac_lo=0 ac_mid=0
10868 while :; do
10869 cat >conftest.$ac_ext <<_ACEOF
10870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
10875$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010876 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010877int
10878main ()
10879{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010881test_array [0] = 0
10882
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887rm -f conftest.$ac_objext
10888if { (ac_try="$ac_compile"
10889case "(($ac_try" in
10890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10891 *) ac_try_echo=$ac_try;;
10892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010894 (eval "$ac_compile") 2>conftest.er1
10895 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
10904 ac_hi=$ac_mid; break
10905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010906 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010907sed 's/^/| /' conftest.$ac_ext >&5
10908
10909 ac_lo=`expr $ac_mid + 1`
10910 if test $ac_lo -le $ac_mid; then
10911 ac_lo= ac_hi=
10912 break
10913 fi
10914 ac_mid=`expr 2 '*' $ac_mid + 1`
10915fi
10916
10917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10918 done
10919else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010920 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
10923 cat >conftest.$ac_ext <<_ACEOF
10924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
10929$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010930 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931int
10932main ()
10933{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010935test_array [0] = 0
10936
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext
10942if { (ac_try="$ac_compile"
10943case "(($ac_try" in
10944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10945 *) ac_try_echo=$ac_try;;
10946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010948 (eval "$ac_compile") 2>conftest.er1
10949 ac_status=$?
10950 grep -v '^ *+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954 (exit $ac_status); } && {
10955 test -z "$ac_c_werror_flag" ||
10956 test ! -s conftest.err
10957 } && test -s conftest.$ac_objext; then
10958 ac_hi=-1 ac_mid=-1
10959 while :; do
10960 cat >conftest.$ac_ext <<_ACEOF
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
10966$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968int
10969main ()
10970{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010971static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010972test_array [0] = 0
10973
10974 ;
10975 return 0;
10976}
10977_ACEOF
10978rm -f conftest.$ac_objext
10979if { (ac_try="$ac_compile"
10980case "(($ac_try" in
10981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10982 *) ac_try_echo=$ac_try;;
10983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010985 (eval "$ac_compile") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest.$ac_objext; then
10995 ac_lo=$ac_mid; break
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 ac_hi=`expr '(' $ac_mid ')' - 1`
11001 if test $ac_mid -le $ac_hi; then
11002 ac_lo= ac_hi=
11003 break
11004 fi
11005 ac_mid=`expr 2 '*' $ac_mid`
11006fi
11007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009 done
11010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011011 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011012sed 's/^/| /' conftest.$ac_ext >&5
11013
11014 ac_lo= ac_hi=
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018fi
11019
11020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11021# Binary search between lo and hi bounds.
11022while test "x$ac_lo" != "x$ac_hi"; do
11023 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11024 cat >conftest.$ac_ext <<_ACEOF
11025/* confdefs.h. */
11026_ACEOF
11027cat confdefs.h >>conftest.$ac_ext
11028cat >>conftest.$ac_ext <<_ACEOF
11029/* end confdefs.h. */
11030$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011031 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011032int
11033main ()
11034{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011036test_array [0] = 0
11037
11038 ;
11039 return 0;
11040}
11041_ACEOF
11042rm -f conftest.$ac_objext
11043if { (ac_try="$ac_compile"
11044case "(($ac_try" in
11045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11046 *) ac_try_echo=$ac_try;;
11047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011049 (eval "$ac_compile") 2>conftest.er1
11050 ac_status=$?
11051 grep -v '^ *+' conftest.er1 >conftest.err
11052 rm -f conftest.er1
11053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011055 (exit $ac_status); } && {
11056 test -z "$ac_c_werror_flag" ||
11057 test ! -s conftest.err
11058 } && test -s conftest.$ac_objext; then
11059 ac_hi=$ac_mid
11060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011061 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011062sed 's/^/| /' conftest.$ac_ext >&5
11063
11064 ac_lo=`expr '(' $ac_mid ')' + 1`
11065fi
11066
11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11068done
11069case $ac_lo in
11070?*) ac_cv_sizeof_pid_t=$ac_lo;;
11071'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011072 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011073See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011074echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011075See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011076 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011077 else
11078 ac_cv_sizeof_pid_t=0
11079 fi ;;
11080esac
11081else
11082 cat >conftest.$ac_ext <<_ACEOF
11083/* confdefs.h. */
11084_ACEOF
11085cat confdefs.h >>conftest.$ac_ext
11086cat >>conftest.$ac_ext <<_ACEOF
11087/* end confdefs.h. */
11088$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011089 typedef pid_t ac__type_sizeof_;
11090static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11091static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092#include <stdio.h>
11093#include <stdlib.h>
11094int
11095main ()
11096{
11097
11098 FILE *f = fopen ("conftest.val", "w");
11099 if (! f)
11100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 {
11103 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011104 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011105 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011106 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011107 }
11108 else
11109 {
11110 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011111 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011112 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 }
11115 return ferror (f) || fclose (f) != 0;
11116
11117 ;
11118 return 0;
11119}
11120_ACEOF
11121rm -f conftest$ac_exeext
11122if { (ac_try="$ac_link"
11123case "(($ac_try" in
11124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11125 *) ac_try_echo=$ac_try;;
11126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011128 (eval "$ac_link") 2>&5
11129 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11132 { (case "(($ac_try" in
11133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11134 *) ac_try_echo=$ac_try;;
11135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 (eval "$ac_try") 2>&5
11138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 (exit $ac_status); }; }; then
11141 ac_cv_sizeof_pid_t=`cat conftest.val`
11142else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011143 echo "$as_me: program exited with status $ac_status" >&5
11144echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145sed 's/^/| /' conftest.$ac_ext >&5
11146
11147( exit $ac_status )
11148if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011149 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011151echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011153 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011154 else
11155 ac_cv_sizeof_pid_t=0
11156 fi
11157fi
11158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11159fi
11160rm -f conftest.val
11161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11163echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164
11165
11166
11167cat >>confdefs.h <<_ACEOF
11168#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11169_ACEOF
11170
11171
Michael W. Hudson54241132001-12-07 15:38:26 +000011172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011173{ echo "$as_me:$LINENO: checking for long long support" >&5
11174echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011175have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011177/* confdefs.h. */
11178_ACEOF
11179cat confdefs.h >>conftest.$ac_ext
11180cat >>conftest.$ac_ext <<_ACEOF
11181/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011182
Martin v. Löwis11437992002-04-12 09:54:03 +000011183int
11184main ()
11185{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011186long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011192if { (ac_try="$ac_compile"
11193case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011200 grep -v '^ *+' conftest.er1 >conftest.err
11201 rm -f conftest.er1
11202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204 (exit $ac_status); } && {
11205 test -z "$ac_c_werror_flag" ||
11206 test ! -s conftest.err
11207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011208
11209
11210cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
11213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011214 have_long_long=yes
11215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011218sed 's/^/| /' conftest.$ac_ext >&5
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011224{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11225echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011226if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011227{ echo "$as_me:$LINENO: checking for long long" >&5
11228echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11229if test "${ac_cv_type_long_long+set}" = set; then
11230 echo $ECHO_N "(cached) $ECHO_C" >&6
11231else
11232 cat >conftest.$ac_ext <<_ACEOF
11233/* confdefs.h. */
11234_ACEOF
11235cat confdefs.h >>conftest.$ac_ext
11236cat >>conftest.$ac_ext <<_ACEOF
11237/* end confdefs.h. */
11238$ac_includes_default
11239typedef long long ac__type_new_;
11240int
11241main ()
11242{
11243if ((ac__type_new_ *) 0)
11244 return 0;
11245if (sizeof (ac__type_new_))
11246 return 0;
11247 ;
11248 return 0;
11249}
11250_ACEOF
11251rm -f conftest.$ac_objext
11252if { (ac_try="$ac_compile"
11253case "(($ac_try" in
11254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11255 *) ac_try_echo=$ac_try;;
11256esac
11257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11258 (eval "$ac_compile") 2>conftest.er1
11259 ac_status=$?
11260 grep -v '^ *+' conftest.er1 >conftest.err
11261 rm -f conftest.er1
11262 cat conftest.err >&5
11263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11264 (exit $ac_status); } && {
11265 test -z "$ac_c_werror_flag" ||
11266 test ! -s conftest.err
11267 } && test -s conftest.$ac_objext; then
11268 ac_cv_type_long_long=yes
11269else
11270 echo "$as_me: failed program was:" >&5
11271sed 's/^/| /' conftest.$ac_ext >&5
11272
11273 ac_cv_type_long_long=no
11274fi
11275
11276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11277fi
11278{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11279echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11280
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281# The cast to long int works around a bug in the HP C Compiler
11282# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11283# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11284# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011285{ echo "$as_me:$LINENO: checking size of long long" >&5
11286echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011287if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011288 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011289else
Martin v. Löwis11437992002-04-12 09:54:03 +000011290 if test "$cross_compiling" = yes; then
11291 # Depending upon the size, compute the lo and hi bounds.
11292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* confdefs.h. */
11294_ACEOF
11295cat confdefs.h >>conftest.$ac_ext
11296cat >>conftest.$ac_ext <<_ACEOF
11297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011298$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011299 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011303static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011304test_array [0] = 0
11305
11306 ;
11307 return 0;
11308}
11309_ACEOF
11310rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311if { (ac_try="$ac_compile"
11312case "(($ac_try" in
11313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11314 *) ac_try_echo=$ac_try;;
11315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011319 grep -v '^ *+' conftest.er1 >conftest.err
11320 rm -f conftest.er1
11321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011323 (exit $ac_status); } && {
11324 test -z "$ac_c_werror_flag" ||
11325 test ! -s conftest.err
11326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_lo=0 ac_mid=0
11328 while :; do
11329 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* confdefs.h. */
11331_ACEOF
11332cat confdefs.h >>conftest.$ac_ext
11333cat >>conftest.$ac_ext <<_ACEOF
11334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011335$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011336 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011340static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011341test_array [0] = 0
11342
11343 ;
11344 return 0;
11345}
11346_ACEOF
11347rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348if { (ac_try="$ac_compile"
11349case "(($ac_try" in
11350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11351 *) ac_try_echo=$ac_try;;
11352esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011354 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011356 grep -v '^ *+' conftest.er1 >conftest.err
11357 rm -f conftest.er1
11358 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360 (exit $ac_status); } && {
11361 test -z "$ac_c_werror_flag" ||
11362 test ! -s conftest.err
11363 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_hi=$ac_mid; break
11365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011367sed 's/^/| /' conftest.$ac_ext >&5
11368
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 ac_lo=`expr $ac_mid + 1`
11370 if test $ac_lo -le $ac_mid; then
11371 ac_lo= ac_hi=
11372 break
11373 fi
11374 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376
11377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011378 done
11379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011381sed 's/^/| /' conftest.$ac_ext >&5
11382
Martin v. Löwiseba40652007-08-30 20:10:57 +000011383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011390 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011391int
11392main ()
11393{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011395test_array [0] = 0
11396
11397 ;
11398 return 0;
11399}
11400_ACEOF
11401rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011402if { (ac_try="$ac_compile"
11403case "(($ac_try" in
11404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11405 *) ac_try_echo=$ac_try;;
11406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011408 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011410 grep -v '^ *+' conftest.er1 >conftest.err
11411 rm -f conftest.er1
11412 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 (exit $ac_status); } && {
11415 test -z "$ac_c_werror_flag" ||
11416 test ! -s conftest.err
11417 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_hi=-1 ac_mid=-1
11419 while :; do
11420 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011421/* confdefs.h. */
11422_ACEOF
11423cat confdefs.h >>conftest.$ac_ext
11424cat >>conftest.$ac_ext <<_ACEOF
11425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011426$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011428int
11429main ()
11430{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011431static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011432test_array [0] = 0
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439if { (ac_try="$ac_compile"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011447 grep -v '^ *+' conftest.er1 >conftest.err
11448 rm -f conftest.er1
11449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 (exit $ac_status); } && {
11452 test -z "$ac_c_werror_flag" ||
11453 test ! -s conftest.err
11454 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_lo=$ac_mid; break
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 ac_hi=`expr '(' $ac_mid ')' - 1`
11461 if test $ac_mid -le $ac_hi; then
11462 ac_lo= ac_hi=
11463 break
11464 fi
11465 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011467
11468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 done
11470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011472sed 's/^/| /' conftest.$ac_ext >&5
11473
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479
11480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011481# Binary search between lo and hi bounds.
11482while test "x$ac_lo" != "x$ac_hi"; do
11483 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011491 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011492int
11493main ()
11494{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011495static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011496test_array [0] = 0
11497
11498 ;
11499 return 0;
11500}
11501_ACEOF
11502rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503if { (ac_try="$ac_compile"
11504case "(($ac_try" in
11505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11506 *) ac_try_echo=$ac_try;;
11507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011511 grep -v '^ *+' conftest.er1 >conftest.err
11512 rm -f conftest.er1
11513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515 (exit $ac_status); } && {
11516 test -z "$ac_c_werror_flag" ||
11517 test ! -s conftest.err
11518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_hi=$ac_mid
11520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011522sed 's/^/| /' conftest.$ac_ext >&5
11523
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526
11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011528done
11529case $ac_lo in
11530?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011533See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011534echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011535See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011536 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537 else
11538 ac_cv_sizeof_long_long=0
11539 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011540esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011541else
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* confdefs.h. */
11544_ACEOF
11545cat confdefs.h >>conftest.$ac_ext
11546cat >>conftest.$ac_ext <<_ACEOF
11547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011548$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011549 typedef long long ac__type_sizeof_;
11550static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11551static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011552#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011554int
11555main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556{
Martin v. Löwis11437992002-04-12 09:54:03 +000011557
11558 FILE *f = fopen ("conftest.val", "w");
11559 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011564 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011566 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 }
11568 else
11569 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011571 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011574 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011575 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011576
11577 ;
11578 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011579}
Martin v. Löwis11437992002-04-12 09:54:03 +000011580_ACEOF
11581rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011582if { (ac_try="$ac_link"
11583case "(($ac_try" in
11584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11585 *) ac_try_echo=$ac_try;;
11586esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 { (case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 (exit $ac_status); }; }; then
11601 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011603 echo "$as_me: program exited with status $ac_status" >&5
11604echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011605sed 's/^/| /' conftest.$ac_ext >&5
11606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011609 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011610See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011611echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011612See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011613 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614 else
11615 ac_cv_sizeof_long_long=0
11616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618rm -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 +000011619fi
11620rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011622{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11623echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624
11625
11626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632fi
11633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011634{ echo "$as_me:$LINENO: checking for long double support" >&5
11635echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011636have_long_double=no
11637cat >conftest.$ac_ext <<_ACEOF
11638/* confdefs.h. */
11639_ACEOF
11640cat confdefs.h >>conftest.$ac_ext
11641cat >>conftest.$ac_ext <<_ACEOF
11642/* end confdefs.h. */
11643
11644int
11645main ()
11646{
11647long double x; x = (long double)0.;
11648 ;
11649 return 0;
11650}
11651_ACEOF
11652rm -f conftest.$ac_objext
11653if { (ac_try="$ac_compile"
11654case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011659 (eval "$ac_compile") 2>conftest.er1
11660 ac_status=$?
11661 grep -v '^ *+' conftest.er1 >conftest.err
11662 rm -f conftest.er1
11663 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011665 (exit $ac_status); } && {
11666 test -z "$ac_c_werror_flag" ||
11667 test ! -s conftest.err
11668 } && test -s conftest.$ac_objext; then
11669
11670
11671cat >>confdefs.h <<\_ACEOF
11672#define HAVE_LONG_DOUBLE 1
11673_ACEOF
11674
11675 have_long_double=yes
11676
11677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011678 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011679sed 's/^/| /' conftest.$ac_ext >&5
11680
11681
11682fi
11683
11684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011685{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11686echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011687if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011688{ echo "$as_me:$LINENO: checking for long double" >&5
11689echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11690if test "${ac_cv_type_long_double+set}" = set; then
11691 echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693 cat >conftest.$ac_ext <<_ACEOF
11694/* confdefs.h. */
11695_ACEOF
11696cat confdefs.h >>conftest.$ac_ext
11697cat >>conftest.$ac_ext <<_ACEOF
11698/* end confdefs.h. */
11699$ac_includes_default
11700typedef long double ac__type_new_;
11701int
11702main ()
11703{
11704if ((ac__type_new_ *) 0)
11705 return 0;
11706if (sizeof (ac__type_new_))
11707 return 0;
11708 ;
11709 return 0;
11710}
11711_ACEOF
11712rm -f conftest.$ac_objext
11713if { (ac_try="$ac_compile"
11714case "(($ac_try" in
11715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11716 *) ac_try_echo=$ac_try;;
11717esac
11718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11719 (eval "$ac_compile") 2>conftest.er1
11720 ac_status=$?
11721 grep -v '^ *+' conftest.er1 >conftest.err
11722 rm -f conftest.er1
11723 cat conftest.err >&5
11724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11725 (exit $ac_status); } && {
11726 test -z "$ac_c_werror_flag" ||
11727 test ! -s conftest.err
11728 } && test -s conftest.$ac_objext; then
11729 ac_cv_type_long_double=yes
11730else
11731 echo "$as_me: failed program was:" >&5
11732sed 's/^/| /' conftest.$ac_ext >&5
11733
11734 ac_cv_type_long_double=no
11735fi
11736
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11738fi
11739{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11740echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11741
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011742# The cast to long int works around a bug in the HP C Compiler
11743# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11744# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11745# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011746{ echo "$as_me:$LINENO: checking size of long double" >&5
11747echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011748if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011749 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011750else
11751 if test "$cross_compiling" = yes; then
11752 # Depending upon the size, compute the lo and hi bounds.
11753cat >conftest.$ac_ext <<_ACEOF
11754/* confdefs.h. */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h. */
11759$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011760 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011761int
11762main ()
11763{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011764static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011765test_array [0] = 0
11766
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771rm -f conftest.$ac_objext
11772if { (ac_try="$ac_compile"
11773case "(($ac_try" in
11774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11775 *) ac_try_echo=$ac_try;;
11776esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011778 (eval "$ac_compile") 2>conftest.er1
11779 ac_status=$?
11780 grep -v '^ *+' conftest.er1 >conftest.err
11781 rm -f conftest.er1
11782 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011784 (exit $ac_status); } && {
11785 test -z "$ac_c_werror_flag" ||
11786 test ! -s conftest.err
11787 } && test -s conftest.$ac_objext; then
11788 ac_lo=0 ac_mid=0
11789 while :; do
11790 cat >conftest.$ac_ext <<_ACEOF
11791/* confdefs.h. */
11792_ACEOF
11793cat confdefs.h >>conftest.$ac_ext
11794cat >>conftest.$ac_ext <<_ACEOF
11795/* end confdefs.h. */
11796$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011797 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798int
11799main ()
11800{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011801static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011802test_array [0] = 0
11803
11804 ;
11805 return 0;
11806}
11807_ACEOF
11808rm -f conftest.$ac_objext
11809if { (ac_try="$ac_compile"
11810case "(($ac_try" in
11811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11812 *) ac_try_echo=$ac_try;;
11813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011815 (eval "$ac_compile") 2>conftest.er1
11816 ac_status=$?
11817 grep -v '^ *+' conftest.er1 >conftest.err
11818 rm -f conftest.er1
11819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011821 (exit $ac_status); } && {
11822 test -z "$ac_c_werror_flag" ||
11823 test ! -s conftest.err
11824 } && test -s conftest.$ac_objext; then
11825 ac_hi=$ac_mid; break
11826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011827 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011828sed 's/^/| /' conftest.$ac_ext >&5
11829
11830 ac_lo=`expr $ac_mid + 1`
11831 if test $ac_lo -le $ac_mid; then
11832 ac_lo= ac_hi=
11833 break
11834 fi
11835 ac_mid=`expr 2 '*' $ac_mid + 1`
11836fi
11837
11838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11839 done
11840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011841 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011842sed 's/^/| /' conftest.$ac_ext >&5
11843
11844 cat >conftest.$ac_ext <<_ACEOF
11845/* confdefs.h. */
11846_ACEOF
11847cat confdefs.h >>conftest.$ac_ext
11848cat >>conftest.$ac_ext <<_ACEOF
11849/* end confdefs.h. */
11850$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011851 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011852int
11853main ()
11854{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011855static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011856test_array [0] = 0
11857
11858 ;
11859 return 0;
11860}
11861_ACEOF
11862rm -f conftest.$ac_objext
11863if { (ac_try="$ac_compile"
11864case "(($ac_try" in
11865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11866 *) ac_try_echo=$ac_try;;
11867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011869 (eval "$ac_compile") 2>conftest.er1
11870 ac_status=$?
11871 grep -v '^ *+' conftest.er1 >conftest.err
11872 rm -f conftest.er1
11873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875 (exit $ac_status); } && {
11876 test -z "$ac_c_werror_flag" ||
11877 test ! -s conftest.err
11878 } && test -s conftest.$ac_objext; then
11879 ac_hi=-1 ac_mid=-1
11880 while :; do
11881 cat >conftest.$ac_ext <<_ACEOF
11882/* confdefs.h. */
11883_ACEOF
11884cat confdefs.h >>conftest.$ac_ext
11885cat >>conftest.$ac_ext <<_ACEOF
11886/* end confdefs.h. */
11887$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889int
11890main ()
11891{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011892static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011893test_array [0] = 0
11894
11895 ;
11896 return 0;
11897}
11898_ACEOF
11899rm -f conftest.$ac_objext
11900if { (ac_try="$ac_compile"
11901case "(($ac_try" in
11902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11903 *) ac_try_echo=$ac_try;;
11904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011906 (eval "$ac_compile") 2>conftest.er1
11907 ac_status=$?
11908 grep -v '^ *+' conftest.er1 >conftest.err
11909 rm -f conftest.er1
11910 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011912 (exit $ac_status); } && {
11913 test -z "$ac_c_werror_flag" ||
11914 test ! -s conftest.err
11915 } && test -s conftest.$ac_objext; then
11916 ac_lo=$ac_mid; break
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 ac_hi=`expr '(' $ac_mid ')' - 1`
11922 if test $ac_mid -le $ac_hi; then
11923 ac_lo= ac_hi=
11924 break
11925 fi
11926 ac_mid=`expr 2 '*' $ac_mid`
11927fi
11928
11929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11930 done
11931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011932 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011933sed 's/^/| /' conftest.$ac_ext >&5
11934
11935 ac_lo= ac_hi=
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939fi
11940
11941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11942# Binary search between lo and hi bounds.
11943while test "x$ac_lo" != "x$ac_hi"; do
11944 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11945 cat >conftest.$ac_ext <<_ACEOF
11946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
11951$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011952 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011953int
11954main ()
11955{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011956static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011957test_array [0] = 0
11958
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963rm -f conftest.$ac_objext
11964if { (ac_try="$ac_compile"
11965case "(($ac_try" in
11966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11967 *) ac_try_echo=$ac_try;;
11968esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011970 (eval "$ac_compile") 2>conftest.er1
11971 ac_status=$?
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976 (exit $ac_status); } && {
11977 test -z "$ac_c_werror_flag" ||
11978 test ! -s conftest.err
11979 } && test -s conftest.$ac_objext; then
11980 ac_hi=$ac_mid
11981else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011982 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011983sed 's/^/| /' conftest.$ac_ext >&5
11984
11985 ac_lo=`expr '(' $ac_mid ')' + 1`
11986fi
11987
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989done
11990case $ac_lo in
11991?*) ac_cv_sizeof_long_double=$ac_lo;;
11992'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011993 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011994See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011995echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011996See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011997 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011998 else
11999 ac_cv_sizeof_long_double=0
12000 fi ;;
12001esac
12002else
12003 cat >conftest.$ac_ext <<_ACEOF
12004/* confdefs.h. */
12005_ACEOF
12006cat confdefs.h >>conftest.$ac_ext
12007cat >>conftest.$ac_ext <<_ACEOF
12008/* end confdefs.h. */
12009$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012010 typedef long double ac__type_sizeof_;
12011static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12012static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013#include <stdio.h>
12014#include <stdlib.h>
12015int
12016main ()
12017{
12018
12019 FILE *f = fopen ("conftest.val", "w");
12020 if (! f)
12021 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 {
12024 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012025 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012026 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012027 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012028 }
12029 else
12030 {
12031 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012032 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012033 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 }
12036 return ferror (f) || fclose (f) != 0;
12037
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest$ac_exeext
12043if { (ac_try="$ac_link"
12044case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012049 (eval "$ac_link") 2>&5
12050 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012052 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12053 { (case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 (eval "$ac_try") 2>&5
12059 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 (exit $ac_status); }; }; then
12062 ac_cv_sizeof_long_double=`cat conftest.val`
12063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012064 echo "$as_me: program exited with status $ac_status" >&5
12065echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
12068( exit $ac_status )
12069if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012070 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012071See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012072echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012073See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012074 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012075 else
12076 ac_cv_sizeof_long_double=0
12077 fi
12078fi
12079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12080fi
12081rm -f conftest.val
12082fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012083{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12084echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085
12086
12087
12088cat >>confdefs.h <<_ACEOF
12089#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12090_ACEOF
12091
12092
12093fi
12094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012095{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12096echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012097have_c99_bool=no
12098cat >conftest.$ac_ext <<_ACEOF
12099/* confdefs.h. */
12100_ACEOF
12101cat confdefs.h >>conftest.$ac_ext
12102cat >>conftest.$ac_ext <<_ACEOF
12103/* end confdefs.h. */
12104
12105int
12106main ()
12107{
12108_Bool x; x = (_Bool)0;
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012114if { (ac_try="$ac_compile"
12115case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121 ac_status=$?
12122 grep -v '^ *+' conftest.er1 >conftest.err
12123 rm -f conftest.er1
12124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012126 (exit $ac_status); } && {
12127 test -z "$ac_c_werror_flag" ||
12128 test ! -s conftest.err
12129 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130
12131
12132cat >>confdefs.h <<\_ACEOF
12133#define HAVE_C99_BOOL 1
12134_ACEOF
12135
12136 have_c99_bool=yes
12137
12138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012139 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwiseba40652007-08-30 20:10:57 +000012142
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012144
12145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012146{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12147echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012148if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012149{ echo "$as_me:$LINENO: checking for _Bool" >&5
12150echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12151if test "${ac_cv_type__Bool+set}" = set; then
12152 echo $ECHO_N "(cached) $ECHO_C" >&6
12153else
12154 cat >conftest.$ac_ext <<_ACEOF
12155/* confdefs.h. */
12156_ACEOF
12157cat confdefs.h >>conftest.$ac_ext
12158cat >>conftest.$ac_ext <<_ACEOF
12159/* end confdefs.h. */
12160$ac_includes_default
12161typedef _Bool ac__type_new_;
12162int
12163main ()
12164{
12165if ((ac__type_new_ *) 0)
12166 return 0;
12167if (sizeof (ac__type_new_))
12168 return 0;
12169 ;
12170 return 0;
12171}
12172_ACEOF
12173rm -f conftest.$ac_objext
12174if { (ac_try="$ac_compile"
12175case "(($ac_try" in
12176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12177 *) ac_try_echo=$ac_try;;
12178esac
12179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12180 (eval "$ac_compile") 2>conftest.er1
12181 ac_status=$?
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest.$ac_objext; then
12190 ac_cv_type__Bool=yes
12191else
12192 echo "$as_me: failed program was:" >&5
12193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195 ac_cv_type__Bool=no
12196fi
12197
12198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199fi
12200{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12201echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12202
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203# The cast to long int works around a bug in the HP C Compiler
12204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12206# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012207{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12208echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012209if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012211else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212 if test "$cross_compiling" = yes; then
12213 # Depending upon the size, compute the lo and hi bounds.
12214cat >conftest.$ac_ext <<_ACEOF
12215/* confdefs.h. */
12216_ACEOF
12217cat confdefs.h >>conftest.$ac_ext
12218cat >>conftest.$ac_ext <<_ACEOF
12219/* end confdefs.h. */
12220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012221 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012222int
12223main ()
12224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012226test_array [0] = 0
12227
12228 ;
12229 return 0;
12230}
12231_ACEOF
12232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233if { (ac_try="$ac_compile"
12234case "(($ac_try" in
12235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12236 *) ac_try_echo=$ac_try;;
12237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012240 ac_status=$?
12241 grep -v '^ *+' conftest.er1 >conftest.err
12242 rm -f conftest.er1
12243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245 (exit $ac_status); } && {
12246 test -z "$ac_c_werror_flag" ||
12247 test ! -s conftest.err
12248 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249 ac_lo=0 ac_mid=0
12250 while :; do
12251 cat >conftest.$ac_ext <<_ACEOF
12252/* confdefs.h. */
12253_ACEOF
12254cat confdefs.h >>conftest.$ac_ext
12255cat >>conftest.$ac_ext <<_ACEOF
12256/* end confdefs.h. */
12257$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012258 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259int
12260main ()
12261{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012262static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012263test_array [0] = 0
12264
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270if { (ac_try="$ac_compile"
12271case "(($ac_try" in
12272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12273 *) ac_try_echo=$ac_try;;
12274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012277 ac_status=$?
12278 grep -v '^ *+' conftest.er1 >conftest.err
12279 rm -f conftest.er1
12280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012282 (exit $ac_status); } && {
12283 test -z "$ac_c_werror_flag" ||
12284 test ! -s conftest.err
12285 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286 ac_hi=$ac_mid; break
12287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012288 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289sed 's/^/| /' conftest.$ac_ext >&5
12290
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 ac_lo=`expr $ac_mid + 1`
12292 if test $ac_lo -le $ac_mid; then
12293 ac_lo= ac_hi=
12294 break
12295 fi
12296 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298
12299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300 done
12301else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012302 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303sed 's/^/| /' conftest.$ac_ext >&5
12304
Martin v. Löwiseba40652007-08-30 20:10:57 +000012305 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012312 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012313int
12314main ()
12315{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012316static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317test_array [0] = 0
12318
12319 ;
12320 return 0;
12321}
12322_ACEOF
12323rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324if { (ac_try="$ac_compile"
12325case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;;
12328esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012331 ac_status=$?
12332 grep -v '^ *+' conftest.er1 >conftest.err
12333 rm -f conftest.er1
12334 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 (exit $ac_status); } && {
12337 test -z "$ac_c_werror_flag" ||
12338 test ! -s conftest.err
12339 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340 ac_hi=-1 ac_mid=-1
12341 while :; do
12342 cat >conftest.$ac_ext <<_ACEOF
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
12348$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012350int
12351main ()
12352{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012353static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354test_array [0] = 0
12355
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361if { (ac_try="$ac_compile"
12362case "(($ac_try" in
12363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12364 *) ac_try_echo=$ac_try;;
12365esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368 ac_status=$?
12369 grep -v '^ *+' conftest.er1 >conftest.err
12370 rm -f conftest.er1
12371 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012373 (exit $ac_status); } && {
12374 test -z "$ac_c_werror_flag" ||
12375 test ! -s conftest.err
12376 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 ac_lo=$ac_mid; break
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ac_hi=`expr '(' $ac_mid ')' - 1`
12383 if test $ac_mid -le $ac_hi; then
12384 ac_lo= ac_hi=
12385 break
12386 fi
12387 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389
12390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012391 done
12392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012393 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012394sed 's/^/| /' conftest.$ac_ext >&5
12395
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398
12399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012401
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403# Binary search between lo and hi bounds.
12404while test "x$ac_lo" != "x$ac_hi"; do
12405 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12406 cat >conftest.$ac_ext <<_ACEOF
12407/* confdefs.h. */
12408_ACEOF
12409cat confdefs.h >>conftest.$ac_ext
12410cat >>conftest.$ac_ext <<_ACEOF
12411/* end confdefs.h. */
12412$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012413 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414int
12415main ()
12416{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418test_array [0] = 0
12419
12420 ;
12421 return 0;
12422}
12423_ACEOF
12424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425if { (ac_try="$ac_compile"
12426case "(($ac_try" in
12427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12428 *) ac_try_echo=$ac_try;;
12429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012432 ac_status=$?
12433 grep -v '^ *+' conftest.er1 >conftest.err
12434 rm -f conftest.er1
12435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437 (exit $ac_status); } && {
12438 test -z "$ac_c_werror_flag" ||
12439 test ! -s conftest.err
12440 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441 ac_hi=$ac_mid
12442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012443 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012444sed 's/^/| /' conftest.$ac_ext >&5
12445
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450done
12451case $ac_lo in
12452?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012453'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012454 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012455See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012456echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012458 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012459 else
12460 ac_cv_sizeof__Bool=0
12461 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012462esac
12463else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464 cat >conftest.$ac_ext <<_ACEOF
12465/* confdefs.h. */
12466_ACEOF
12467cat confdefs.h >>conftest.$ac_ext
12468cat >>conftest.$ac_ext <<_ACEOF
12469/* end confdefs.h. */
12470$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012471 typedef _Bool ac__type_sizeof_;
12472static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12473static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012474#include <stdio.h>
12475#include <stdlib.h>
12476int
12477main ()
12478{
12479
12480 FILE *f = fopen ("conftest.val", "w");
12481 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012488 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489 }
12490 else
12491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012496 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012497 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498
12499 ;
12500 return 0;
12501}
12502_ACEOF
12503rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504if { (ac_try="$ac_link"
12505case "(($ac_try" in
12506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12507 *) ac_try_echo=$ac_try;;
12508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012510 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 { (case "(($ac_try" in
12515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12516 *) ac_try_echo=$ac_try;;
12517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522 (exit $ac_status); }; }; then
12523 ac_cv_sizeof__Bool=`cat conftest.val`
12524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012525 echo "$as_me: program exited with status $ac_status" >&5
12526echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527sed 's/^/| /' conftest.$ac_ext >&5
12528
12529( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012531 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012532See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012533echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012535 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 else
12537 ac_cv_sizeof__Bool=0
12538 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540rm -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 +000012541fi
12542rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012544{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12545echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012546
12547
12548
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012549cat >>confdefs.h <<_ACEOF
12550#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12551_ACEOF
12552
12553
12554fi
12555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012558if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012559 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012560else
12561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012562/* confdefs.h. */
12563_ACEOF
12564cat confdefs.h >>conftest.$ac_ext
12565cat >>conftest.$ac_ext <<_ACEOF
12566/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012567#ifdef HAVE_STDINT_H
12568 #include <stdint.h>
12569 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012571typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012572int
12573main ()
12574{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575if ((ac__type_new_ *) 0)
12576 return 0;
12577if (sizeof (ac__type_new_))
12578 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ;
12580 return 0;
12581}
12582_ACEOF
12583rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012584if { (ac_try="$ac_compile"
12585case "(($ac_try" in
12586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12587 *) ac_try_echo=$ac_try;;
12588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012592 grep -v '^ *+' conftest.er1 >conftest.err
12593 rm -f conftest.er1
12594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 (exit $ac_status); } && {
12597 test -z "$ac_c_werror_flag" ||
12598 test ! -s conftest.err
12599 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012603sed 's/^/| /' conftest.$ac_ext >&5
12604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012607
12608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012610{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12611echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12612if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012613
12614cat >>confdefs.h <<_ACEOF
12615#define HAVE_UINTPTR_T 1
12616_ACEOF
12617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012618{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12619echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12620if test "${ac_cv_type_uintptr_t+set}" = set; then
12621 echo $ECHO_N "(cached) $ECHO_C" >&6
12622else
12623 cat >conftest.$ac_ext <<_ACEOF
12624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
12629$ac_includes_default
12630typedef uintptr_t ac__type_new_;
12631int
12632main ()
12633{
12634if ((ac__type_new_ *) 0)
12635 return 0;
12636if (sizeof (ac__type_new_))
12637 return 0;
12638 ;
12639 return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (ac_try="$ac_compile"
12644case "(($ac_try" in
12645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12646 *) ac_try_echo=$ac_try;;
12647esac
12648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12649 (eval "$ac_compile") 2>conftest.er1
12650 ac_status=$?
12651 grep -v '^ *+' conftest.er1 >conftest.err
12652 rm -f conftest.er1
12653 cat conftest.err >&5
12654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12655 (exit $ac_status); } && {
12656 test -z "$ac_c_werror_flag" ||
12657 test ! -s conftest.err
12658 } && test -s conftest.$ac_objext; then
12659 ac_cv_type_uintptr_t=yes
12660else
12661 echo "$as_me: failed program was:" >&5
12662sed 's/^/| /' conftest.$ac_ext >&5
12663
12664 ac_cv_type_uintptr_t=no
12665fi
12666
12667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12668fi
12669{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12670echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12671
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672# The cast to long int works around a bug in the HP C Compiler
12673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12675# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12677echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012678if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012680else
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 if test "$cross_compiling" = yes; then
12682 # Depending upon the size, compute the lo and hi bounds.
12683cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* confdefs.h. */
12685_ACEOF
12686cat confdefs.h >>conftest.$ac_ext
12687cat >>conftest.$ac_ext <<_ACEOF
12688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012690 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012691int
12692main ()
12693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012695test_array [0] = 0
12696
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702if { (ac_try="$ac_compile"
12703case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012714 (exit $ac_status); } && {
12715 test -z "$ac_c_werror_flag" ||
12716 test ! -s conftest.err
12717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_lo=0 ac_mid=0
12719 while :; do
12720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* confdefs.h. */
12722_ACEOF
12723cat confdefs.h >>conftest.$ac_ext
12724cat >>conftest.$ac_ext <<_ACEOF
12725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012726$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012727 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012728int
12729main ()
12730{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012732test_array [0] = 0
12733
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012739if { (ac_try="$ac_compile"
12740case "(($ac_try" in
12741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12742 *) ac_try_echo=$ac_try;;
12743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012747 grep -v '^ *+' conftest.er1 >conftest.err
12748 rm -f conftest.er1
12749 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751 (exit $ac_status); } && {
12752 test -z "$ac_c_werror_flag" ||
12753 test ! -s conftest.err
12754 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ac_hi=$ac_mid; break
12756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012758sed 's/^/| /' conftest.$ac_ext >&5
12759
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 ac_lo=`expr $ac_mid + 1`
12761 if test $ac_lo -le $ac_mid; then
12762 ac_lo= ac_hi=
12763 break
12764 fi
12765 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767
12768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769 done
12770else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012772sed 's/^/| /' conftest.$ac_ext >&5
12773
Martin v. Löwiseba40652007-08-30 20:10:57 +000012774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012775/* confdefs.h. */
12776_ACEOF
12777cat confdefs.h >>conftest.$ac_ext
12778cat >>conftest.$ac_ext <<_ACEOF
12779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012780$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012781 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012785static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012786test_array [0] = 0
12787
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012801 grep -v '^ *+' conftest.er1 >conftest.err
12802 rm -f conftest.er1
12803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805 (exit $ac_status); } && {
12806 test -z "$ac_c_werror_flag" ||
12807 test ! -s conftest.err
12808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_hi=-1 ac_mid=-1
12810 while :; do
12811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012812/* confdefs.h. */
12813_ACEOF
12814cat confdefs.h >>conftest.$ac_ext
12815cat >>conftest.$ac_ext <<_ACEOF
12816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012817$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012819int
12820main ()
12821{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012823test_array [0] = 0
12824
12825 ;
12826 return 0;
12827}
12828_ACEOF
12829rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830if { (ac_try="$ac_compile"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_lo=$ac_mid; break
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 ac_hi=`expr '(' $ac_mid ')' - 1`
12852 if test $ac_mid -le $ac_hi; then
12853 ac_lo= ac_hi=
12854 break
12855 fi
12856 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012858
12859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 done
12861else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012863sed 's/^/| /' conftest.$ac_ext >&5
12864
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867
12868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012870
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012872# Binary search between lo and hi bounds.
12873while test "x$ac_lo" != "x$ac_hi"; do
12874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12875 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* confdefs.h. */
12877_ACEOF
12878cat confdefs.h >>conftest.$ac_ext
12879cat >>conftest.$ac_ext <<_ACEOF
12880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012882 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012886static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012887test_array [0] = 0
12888
12889 ;
12890 return 0;
12891}
12892_ACEOF
12893rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894if { (ac_try="$ac_compile"
12895case "(($ac_try" in
12896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12897 *) ac_try_echo=$ac_try;;
12898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012902 grep -v '^ *+' conftest.er1 >conftest.err
12903 rm -f conftest.er1
12904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906 (exit $ac_status); } && {
12907 test -z "$ac_c_werror_flag" ||
12908 test ! -s conftest.err
12909 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_hi=$ac_mid
12911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012913sed 's/^/| /' conftest.$ac_ext >&5
12914
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917
12918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012919done
12920case $ac_lo in
12921?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012922'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012923 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012924See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012925echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012927 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928 else
12929 ac_cv_sizeof_uintptr_t=0
12930 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012931esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012932else
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* confdefs.h. */
12935_ACEOF
12936cat confdefs.h >>conftest.$ac_ext
12937cat >>conftest.$ac_ext <<_ACEOF
12938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012940 typedef uintptr_t ac__type_sizeof_;
12941static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12942static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012943#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012944#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012947{
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
12949 FILE *f = fopen ("conftest.val", "w");
12950 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012955 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012957 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 }
12959 else
12960 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012962 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012966 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
12968 ;
12969 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012970}
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
12972rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012973if { (ac_try="$ac_link"
12974case "(($ac_try" in
12975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12976 *) ac_try_echo=$ac_try;;
12977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012979 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 { (case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 (exit $ac_status); }; }; then
12992 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012994 echo "$as_me: program exited with status $ac_status" >&5
12995echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012996sed 's/^/| /' conftest.$ac_ext >&5
12997
Martin v. Löwis11437992002-04-12 09:54:03 +000012998( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012999if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013001See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013002echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013003See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013004 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005 else
13006 ac_cv_sizeof_uintptr_t=0
13007 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013009rm -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 +000013010fi
13011rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013012fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013013{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13014echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013015
13016
13017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013020_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021
Michael W. Hudson54241132001-12-07 15:38:26 +000013022
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013023fi
13024
Martin v. Löwisebe26702006-10-02 14:55:51 +000013025
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013026{ echo "$as_me:$LINENO: checking for off_t" >&5
13027echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13028if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030else
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013032/* confdefs.h. */
13033_ACEOF
13034cat confdefs.h >>conftest.$ac_ext
13035cat >>conftest.$ac_ext <<_ACEOF
13036/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013037
13038#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013039#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013040#endif
13041
13042
13043typedef off_t ac__type_new_;
13044int
13045main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013046{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013047if ((ac__type_new_ *) 0)
13048 return 0;
13049if (sizeof (ac__type_new_))
13050 return 0;
13051 ;
13052 return 0;
13053}
13054_ACEOF
13055rm -f conftest.$ac_objext
13056if { (ac_try="$ac_compile"
13057case "(($ac_try" in
13058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13059 *) ac_try_echo=$ac_try;;
13060esac
13061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13062 (eval "$ac_compile") 2>conftest.er1
13063 ac_status=$?
13064 grep -v '^ *+' conftest.er1 >conftest.err
13065 rm -f conftest.er1
13066 cat conftest.err >&5
13067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13068 (exit $ac_status); } && {
13069 test -z "$ac_c_werror_flag" ||
13070 test ! -s conftest.err
13071 } && test -s conftest.$ac_objext; then
13072 ac_cv_type_off_t=yes
13073else
13074 echo "$as_me: failed program was:" >&5
13075sed 's/^/| /' conftest.$ac_ext >&5
13076
13077 ac_cv_type_off_t=no
13078fi
13079
13080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13081fi
13082{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13083echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13084
13085# The cast to long int works around a bug in the HP C Compiler
13086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13088# This bug is HP SR number 8606223364.
13089{ echo "$as_me:$LINENO: checking size of off_t" >&5
13090echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13091if test "${ac_cv_sizeof_off_t+set}" = set; then
13092 echo $ECHO_N "(cached) $ECHO_C" >&6
13093else
13094 if test "$cross_compiling" = yes; then
13095 # Depending upon the size, compute the lo and hi bounds.
13096cat >conftest.$ac_ext <<_ACEOF
13097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
13102
13103#ifdef HAVE_SYS_TYPES_H
13104#include <sys/types.h>
13105#endif
13106
13107
13108 typedef off_t ac__type_sizeof_;
13109int
13110main ()
13111{
13112static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13113test_array [0] = 0
13114
13115 ;
13116 return 0;
13117}
13118_ACEOF
13119rm -f conftest.$ac_objext
13120if { (ac_try="$ac_compile"
13121case "(($ac_try" in
13122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13123 *) ac_try_echo=$ac_try;;
13124esac
13125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13126 (eval "$ac_compile") 2>conftest.er1
13127 ac_status=$?
13128 grep -v '^ *+' conftest.er1 >conftest.err
13129 rm -f conftest.er1
13130 cat conftest.err >&5
13131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13132 (exit $ac_status); } && {
13133 test -z "$ac_c_werror_flag" ||
13134 test ! -s conftest.err
13135 } && test -s conftest.$ac_objext; then
13136 ac_lo=0 ac_mid=0
13137 while :; do
13138 cat >conftest.$ac_ext <<_ACEOF
13139/* confdefs.h. */
13140_ACEOF
13141cat confdefs.h >>conftest.$ac_ext
13142cat >>conftest.$ac_ext <<_ACEOF
13143/* end confdefs.h. */
13144
13145#ifdef HAVE_SYS_TYPES_H
13146#include <sys/types.h>
13147#endif
13148
13149
13150 typedef off_t ac__type_sizeof_;
13151int
13152main ()
13153{
13154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13155test_array [0] = 0
13156
13157 ;
13158 return 0;
13159}
13160_ACEOF
13161rm -f conftest.$ac_objext
13162if { (ac_try="$ac_compile"
13163case "(($ac_try" in
13164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13165 *) ac_try_echo=$ac_try;;
13166esac
13167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13168 (eval "$ac_compile") 2>conftest.er1
13169 ac_status=$?
13170 grep -v '^ *+' conftest.er1 >conftest.err
13171 rm -f conftest.er1
13172 cat conftest.err >&5
13173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13174 (exit $ac_status); } && {
13175 test -z "$ac_c_werror_flag" ||
13176 test ! -s conftest.err
13177 } && test -s conftest.$ac_objext; then
13178 ac_hi=$ac_mid; break
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183 ac_lo=`expr $ac_mid + 1`
13184 if test $ac_lo -le $ac_mid; then
13185 ac_lo= ac_hi=
13186 break
13187 fi
13188 ac_mid=`expr 2 '*' $ac_mid + 1`
13189fi
13190
13191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13192 done
13193else
13194 echo "$as_me: failed program was:" >&5
13195sed 's/^/| /' conftest.$ac_ext >&5
13196
13197 cat >conftest.$ac_ext <<_ACEOF
13198/* confdefs.h. */
13199_ACEOF
13200cat confdefs.h >>conftest.$ac_ext
13201cat >>conftest.$ac_ext <<_ACEOF
13202/* end confdefs.h. */
13203
13204#ifdef HAVE_SYS_TYPES_H
13205#include <sys/types.h>
13206#endif
13207
13208
13209 typedef off_t ac__type_sizeof_;
13210int
13211main ()
13212{
13213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13214test_array [0] = 0
13215
13216 ;
13217 return 0;
13218}
13219_ACEOF
13220rm -f conftest.$ac_objext
13221if { (ac_try="$ac_compile"
13222case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
13226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13227 (eval "$ac_compile") 2>conftest.er1
13228 ac_status=$?
13229 grep -v '^ *+' conftest.er1 >conftest.err
13230 rm -f conftest.er1
13231 cat conftest.err >&5
13232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13233 (exit $ac_status); } && {
13234 test -z "$ac_c_werror_flag" ||
13235 test ! -s conftest.err
13236 } && test -s conftest.$ac_objext; then
13237 ac_hi=-1 ac_mid=-1
13238 while :; do
13239 cat >conftest.$ac_ext <<_ACEOF
13240/* confdefs.h. */
13241_ACEOF
13242cat confdefs.h >>conftest.$ac_ext
13243cat >>conftest.$ac_ext <<_ACEOF
13244/* end confdefs.h. */
13245
13246#ifdef HAVE_SYS_TYPES_H
13247#include <sys/types.h>
13248#endif
13249
13250
13251 typedef off_t ac__type_sizeof_;
13252int
13253main ()
13254{
13255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13256test_array [0] = 0
13257
13258 ;
13259 return 0;
13260}
13261_ACEOF
13262rm -f conftest.$ac_objext
13263if { (ac_try="$ac_compile"
13264case "(($ac_try" in
13265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13266 *) ac_try_echo=$ac_try;;
13267esac
13268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13269 (eval "$ac_compile") 2>conftest.er1
13270 ac_status=$?
13271 grep -v '^ *+' conftest.er1 >conftest.err
13272 rm -f conftest.er1
13273 cat conftest.err >&5
13274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13275 (exit $ac_status); } && {
13276 test -z "$ac_c_werror_flag" ||
13277 test ! -s conftest.err
13278 } && test -s conftest.$ac_objext; then
13279 ac_lo=$ac_mid; break
13280else
13281 echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284 ac_hi=`expr '(' $ac_mid ')' - 1`
13285 if test $ac_mid -le $ac_hi; then
13286 ac_lo= ac_hi=
13287 break
13288 fi
13289 ac_mid=`expr 2 '*' $ac_mid`
13290fi
13291
13292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293 done
13294else
13295 echo "$as_me: failed program was:" >&5
13296sed 's/^/| /' conftest.$ac_ext >&5
13297
13298 ac_lo= ac_hi=
13299fi
13300
13301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303
13304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13305# Binary search between lo and hi bounds.
13306while test "x$ac_lo" != "x$ac_hi"; do
13307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13308 cat >conftest.$ac_ext <<_ACEOF
13309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
13314
13315#ifdef HAVE_SYS_TYPES_H
13316#include <sys/types.h>
13317#endif
13318
13319
13320 typedef off_t ac__type_sizeof_;
13321int
13322main ()
13323{
13324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13325test_array [0] = 0
13326
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331rm -f conftest.$ac_objext
13332if { (ac_try="$ac_compile"
13333case "(($ac_try" in
13334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13335 *) ac_try_echo=$ac_try;;
13336esac
13337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13338 (eval "$ac_compile") 2>conftest.er1
13339 ac_status=$?
13340 grep -v '^ *+' conftest.er1 >conftest.err
13341 rm -f conftest.er1
13342 cat conftest.err >&5
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } && {
13345 test -z "$ac_c_werror_flag" ||
13346 test ! -s conftest.err
13347 } && test -s conftest.$ac_objext; then
13348 ac_hi=$ac_mid
13349else
13350 echo "$as_me: failed program was:" >&5
13351sed 's/^/| /' conftest.$ac_ext >&5
13352
13353 ac_lo=`expr '(' $ac_mid ')' + 1`
13354fi
13355
13356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357done
13358case $ac_lo in
13359?*) ac_cv_sizeof_off_t=$ac_lo;;
13360'') if test "$ac_cv_type_off_t" = yes; then
13361 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13362See \`config.log' for more details." >&5
13363echo "$as_me: error: cannot compute sizeof (off_t)
13364See \`config.log' for more details." >&2;}
13365 { (exit 77); exit 77; }; }
13366 else
13367 ac_cv_sizeof_off_t=0
13368 fi ;;
13369esac
13370else
13371 cat >conftest.$ac_ext <<_ACEOF
13372/* confdefs.h. */
13373_ACEOF
13374cat confdefs.h >>conftest.$ac_ext
13375cat >>conftest.$ac_ext <<_ACEOF
13376/* end confdefs.h. */
13377
13378#ifdef HAVE_SYS_TYPES_H
13379#include <sys/types.h>
13380#endif
13381
13382
13383 typedef off_t ac__type_sizeof_;
13384static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13385static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13386#include <stdio.h>
13387#include <stdlib.h>
13388int
13389main ()
13390{
13391
13392 FILE *f = fopen ("conftest.val", "w");
13393 if (! f)
13394 return 1;
13395 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13396 {
13397 long int i = longval ();
13398 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13399 return 1;
13400 fprintf (f, "%ld\n", i);
13401 }
13402 else
13403 {
13404 unsigned long int i = ulongval ();
13405 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13406 return 1;
13407 fprintf (f, "%lu\n", i);
13408 }
13409 return ferror (f) || fclose (f) != 0;
13410
13411 ;
13412 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013413}
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
13415rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013416if { (ac_try="$ac_link"
13417case "(($ac_try" in
13418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13419 *) ac_try_echo=$ac_try;;
13420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 { (case "(($ac_try" in
13427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13428 *) ac_try_echo=$ac_try;;
13429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013435 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013437 echo "$as_me: program exited with status $ac_status" >&5
13438echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013439sed 's/^/| /' conftest.$ac_ext >&5
13440
Martin v. Löwis11437992002-04-12 09:54:03 +000013441( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013442if test "$ac_cv_type_off_t" = yes; then
13443 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13444See \`config.log' for more details." >&5
13445echo "$as_me: error: cannot compute sizeof (off_t)
13446See \`config.log' for more details." >&2;}
13447 { (exit 77); exit 77; }; }
13448 else
13449 ac_cv_sizeof_off_t=0
13450 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013452rm -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 +000013453fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013454rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013456{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13457echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013459
13460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013463_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013464
Michael W. Hudson54241132001-12-07 15:38:26 +000013465
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013467{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13468echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013469if test "$have_long_long" = yes -a \
13470 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13471 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013472
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >>confdefs.h <<\_ACEOF
13474#define HAVE_LARGEFILE_SUPPORT 1
13475_ACEOF
13476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013477 { echo "$as_me:$LINENO: result: yes" >&5
13478echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013480 { echo "$as_me:$LINENO: result: no" >&5
13481echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013482fi
13483
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013484{ echo "$as_me:$LINENO: checking for time_t" >&5
13485echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13486if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013488else
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013490/* confdefs.h. */
13491_ACEOF
13492cat confdefs.h >>conftest.$ac_ext
13493cat >>conftest.$ac_ext <<_ACEOF
13494/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013495
13496#ifdef HAVE_SYS_TYPES_H
13497#include <sys/types.h>
13498#endif
13499#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013500#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013501#endif
13502
13503
13504typedef time_t ac__type_new_;
13505int
13506main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013507{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013508if ((ac__type_new_ *) 0)
13509 return 0;
13510if (sizeof (ac__type_new_))
13511 return 0;
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516rm -f conftest.$ac_objext
13517if { (ac_try="$ac_compile"
13518case "(($ac_try" in
13519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13520 *) ac_try_echo=$ac_try;;
13521esac
13522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13523 (eval "$ac_compile") 2>conftest.er1
13524 ac_status=$?
13525 grep -v '^ *+' conftest.er1 >conftest.err
13526 rm -f conftest.er1
13527 cat conftest.err >&5
13528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13529 (exit $ac_status); } && {
13530 test -z "$ac_c_werror_flag" ||
13531 test ! -s conftest.err
13532 } && test -s conftest.$ac_objext; then
13533 ac_cv_type_time_t=yes
13534else
13535 echo "$as_me: failed program was:" >&5
13536sed 's/^/| /' conftest.$ac_ext >&5
13537
13538 ac_cv_type_time_t=no
13539fi
13540
13541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13544echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13545
13546# The cast to long int works around a bug in the HP C Compiler
13547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13549# This bug is HP SR number 8606223364.
13550{ echo "$as_me:$LINENO: checking size of time_t" >&5
13551echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13552if test "${ac_cv_sizeof_time_t+set}" = set; then
13553 echo $ECHO_N "(cached) $ECHO_C" >&6
13554else
13555 if test "$cross_compiling" = yes; then
13556 # Depending upon the size, compute the lo and hi bounds.
13557cat >conftest.$ac_ext <<_ACEOF
13558/* confdefs.h. */
13559_ACEOF
13560cat confdefs.h >>conftest.$ac_ext
13561cat >>conftest.$ac_ext <<_ACEOF
13562/* end confdefs.h. */
13563
13564#ifdef HAVE_SYS_TYPES_H
13565#include <sys/types.h>
13566#endif
13567#ifdef HAVE_TIME_H
13568#include <time.h>
13569#endif
13570
13571
13572 typedef time_t ac__type_sizeof_;
13573int
13574main ()
13575{
13576static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13577test_array [0] = 0
13578
13579 ;
13580 return 0;
13581}
13582_ACEOF
13583rm -f conftest.$ac_objext
13584if { (ac_try="$ac_compile"
13585case "(($ac_try" in
13586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13587 *) ac_try_echo=$ac_try;;
13588esac
13589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13590 (eval "$ac_compile") 2>conftest.er1
13591 ac_status=$?
13592 grep -v '^ *+' conftest.er1 >conftest.err
13593 rm -f conftest.er1
13594 cat conftest.err >&5
13595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13596 (exit $ac_status); } && {
13597 test -z "$ac_c_werror_flag" ||
13598 test ! -s conftest.err
13599 } && test -s conftest.$ac_objext; then
13600 ac_lo=0 ac_mid=0
13601 while :; do
13602 cat >conftest.$ac_ext <<_ACEOF
13603/* confdefs.h. */
13604_ACEOF
13605cat confdefs.h >>conftest.$ac_ext
13606cat >>conftest.$ac_ext <<_ACEOF
13607/* end confdefs.h. */
13608
13609#ifdef HAVE_SYS_TYPES_H
13610#include <sys/types.h>
13611#endif
13612#ifdef HAVE_TIME_H
13613#include <time.h>
13614#endif
13615
13616
13617 typedef time_t ac__type_sizeof_;
13618int
13619main ()
13620{
13621static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13622test_array [0] = 0
13623
13624 ;
13625 return 0;
13626}
13627_ACEOF
13628rm -f conftest.$ac_objext
13629if { (ac_try="$ac_compile"
13630case "(($ac_try" in
13631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13632 *) ac_try_echo=$ac_try;;
13633esac
13634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13635 (eval "$ac_compile") 2>conftest.er1
13636 ac_status=$?
13637 grep -v '^ *+' conftest.er1 >conftest.err
13638 rm -f conftest.er1
13639 cat conftest.err >&5
13640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13641 (exit $ac_status); } && {
13642 test -z "$ac_c_werror_flag" ||
13643 test ! -s conftest.err
13644 } && test -s conftest.$ac_objext; then
13645 ac_hi=$ac_mid; break
13646else
13647 echo "$as_me: failed program was:" >&5
13648sed 's/^/| /' conftest.$ac_ext >&5
13649
13650 ac_lo=`expr $ac_mid + 1`
13651 if test $ac_lo -le $ac_mid; then
13652 ac_lo= ac_hi=
13653 break
13654 fi
13655 ac_mid=`expr 2 '*' $ac_mid + 1`
13656fi
13657
13658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13659 done
13660else
13661 echo "$as_me: failed program was:" >&5
13662sed 's/^/| /' conftest.$ac_ext >&5
13663
13664 cat >conftest.$ac_ext <<_ACEOF
13665/* confdefs.h. */
13666_ACEOF
13667cat confdefs.h >>conftest.$ac_ext
13668cat >>conftest.$ac_ext <<_ACEOF
13669/* end confdefs.h. */
13670
13671#ifdef HAVE_SYS_TYPES_H
13672#include <sys/types.h>
13673#endif
13674#ifdef HAVE_TIME_H
13675#include <time.h>
13676#endif
13677
13678
13679 typedef time_t ac__type_sizeof_;
13680int
13681main ()
13682{
13683static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13684test_array [0] = 0
13685
13686 ;
13687 return 0;
13688}
13689_ACEOF
13690rm -f conftest.$ac_objext
13691if { (ac_try="$ac_compile"
13692case "(($ac_try" in
13693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13694 *) ac_try_echo=$ac_try;;
13695esac
13696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13697 (eval "$ac_compile") 2>conftest.er1
13698 ac_status=$?
13699 grep -v '^ *+' conftest.er1 >conftest.err
13700 rm -f conftest.er1
13701 cat conftest.err >&5
13702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13703 (exit $ac_status); } && {
13704 test -z "$ac_c_werror_flag" ||
13705 test ! -s conftest.err
13706 } && test -s conftest.$ac_objext; then
13707 ac_hi=-1 ac_mid=-1
13708 while :; do
13709 cat >conftest.$ac_ext <<_ACEOF
13710/* confdefs.h. */
13711_ACEOF
13712cat confdefs.h >>conftest.$ac_ext
13713cat >>conftest.$ac_ext <<_ACEOF
13714/* end confdefs.h. */
13715
13716#ifdef HAVE_SYS_TYPES_H
13717#include <sys/types.h>
13718#endif
13719#ifdef HAVE_TIME_H
13720#include <time.h>
13721#endif
13722
13723
13724 typedef time_t ac__type_sizeof_;
13725int
13726main ()
13727{
13728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13729test_array [0] = 0
13730
13731 ;
13732 return 0;
13733}
13734_ACEOF
13735rm -f conftest.$ac_objext
13736if { (ac_try="$ac_compile"
13737case "(($ac_try" in
13738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13739 *) ac_try_echo=$ac_try;;
13740esac
13741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13742 (eval "$ac_compile") 2>conftest.er1
13743 ac_status=$?
13744 grep -v '^ *+' conftest.er1 >conftest.err
13745 rm -f conftest.er1
13746 cat conftest.err >&5
13747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13748 (exit $ac_status); } && {
13749 test -z "$ac_c_werror_flag" ||
13750 test ! -s conftest.err
13751 } && test -s conftest.$ac_objext; then
13752 ac_lo=$ac_mid; break
13753else
13754 echo "$as_me: failed program was:" >&5
13755sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_hi=`expr '(' $ac_mid ')' - 1`
13758 if test $ac_mid -le $ac_hi; then
13759 ac_lo= ac_hi=
13760 break
13761 fi
13762 ac_mid=`expr 2 '*' $ac_mid`
13763fi
13764
13765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13766 done
13767else
13768 echo "$as_me: failed program was:" >&5
13769sed 's/^/| /' conftest.$ac_ext >&5
13770
13771 ac_lo= ac_hi=
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775fi
13776
13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778# Binary search between lo and hi bounds.
13779while test "x$ac_lo" != "x$ac_hi"; do
13780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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_hi=$ac_mid
13825else
13826 echo "$as_me: failed program was:" >&5
13827sed 's/^/| /' conftest.$ac_ext >&5
13828
13829 ac_lo=`expr '(' $ac_mid ')' + 1`
13830fi
13831
13832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13833done
13834case $ac_lo in
13835?*) ac_cv_sizeof_time_t=$ac_lo;;
13836'') if test "$ac_cv_type_time_t" = yes; then
13837 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13838See \`config.log' for more details." >&5
13839echo "$as_me: error: cannot compute sizeof (time_t)
13840See \`config.log' for more details." >&2;}
13841 { (exit 77); exit 77; }; }
13842 else
13843 ac_cv_sizeof_time_t=0
13844 fi ;;
13845esac
13846else
13847 cat >conftest.$ac_ext <<_ACEOF
13848/* confdefs.h. */
13849_ACEOF
13850cat confdefs.h >>conftest.$ac_ext
13851cat >>conftest.$ac_ext <<_ACEOF
13852/* end confdefs.h. */
13853
13854#ifdef HAVE_SYS_TYPES_H
13855#include <sys/types.h>
13856#endif
13857#ifdef HAVE_TIME_H
13858#include <time.h>
13859#endif
13860
13861
13862 typedef time_t ac__type_sizeof_;
13863static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13864static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13865#include <stdio.h>
13866#include <stdlib.h>
13867int
13868main ()
13869{
13870
13871 FILE *f = fopen ("conftest.val", "w");
13872 if (! f)
13873 return 1;
13874 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13875 {
13876 long int i = longval ();
13877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13878 return 1;
13879 fprintf (f, "%ld\n", i);
13880 }
13881 else
13882 {
13883 unsigned long int i = ulongval ();
13884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13885 return 1;
13886 fprintf (f, "%lu\n", i);
13887 }
13888 return ferror (f) || fclose (f) != 0;
13889
13890 ;
13891 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013892}
Martin v. Löwis11437992002-04-12 09:54:03 +000013893_ACEOF
13894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013895if { (ac_try="$ac_link"
13896case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;;
13899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 { (case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013914 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013916 echo "$as_me: program exited with status $ac_status" >&5
13917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Martin v. Löwis11437992002-04-12 09:54:03 +000013920( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013921if test "$ac_cv_type_time_t" = yes; then
13922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13923See \`config.log' for more details." >&5
13924echo "$as_me: error: cannot compute sizeof (time_t)
13925See \`config.log' for more details." >&2;}
13926 { (exit 77); exit 77; }; }
13927 else
13928 ac_cv_sizeof_time_t=0
13929 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931rm -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 +000013932fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013935{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13936echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013938
13939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013941#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013942_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013943
Michael W. Hudson54241132001-12-07 15:38:26 +000013944
13945
Trent Mick635f6fb2000-08-23 21:33:05 +000013946# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013947ac_save_cc="$CC"
13948if test "$ac_cv_kpthread" = "yes"
13949then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013950elif test "$ac_cv_kthread" = "yes"
13951then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013952elif test "$ac_cv_pthread" = "yes"
13953then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013954fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013955{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13956echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013957have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013959/* confdefs.h. */
13960_ACEOF
13961cat confdefs.h >>conftest.$ac_ext
13962cat >>conftest.$ac_ext <<_ACEOF
13963/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013964#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Guido van Rossum12580492000-09-24 16:47:19 +000013968pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
13973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974if { (ac_try="$ac_compile"
13975case "(($ac_try" in
13976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13977 *) ac_try_echo=$ac_try;;
13978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 grep -v '^ *+' conftest.er1 >conftest.err
13983 rm -f conftest.er1
13984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986 (exit $ac_status); } && {
13987 test -z "$ac_c_werror_flag" ||
13988 test ! -s conftest.err
13989 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013990 have_pthread_t=yes
13991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013993sed 's/^/| /' conftest.$ac_ext >&5
13994
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995
Trent Mick635f6fb2000-08-23 21:33:05 +000013996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997
13998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013999{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14000echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014001if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014002 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14003echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14004if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014005 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014006else
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014013
14014#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014015#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014016#endif
14017
14018
14019typedef pthread_t ac__type_new_;
14020int
14021main ()
14022{
14023if ((ac__type_new_ *) 0)
14024 return 0;
14025if (sizeof (ac__type_new_))
14026 return 0;
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext
14032if { (ac_try="$ac_compile"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_compile") 2>conftest.er1
14039 ac_status=$?
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest.$ac_objext; then
14048 ac_cv_type_pthread_t=yes
14049else
14050 echo "$as_me: failed program was:" >&5
14051sed 's/^/| /' conftest.$ac_ext >&5
14052
14053 ac_cv_type_pthread_t=no
14054fi
14055
14056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14057fi
14058{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14059echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14060
14061# The cast to long int works around a bug in the HP C Compiler
14062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14064# This bug is HP SR number 8606223364.
14065{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14066echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14067if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14068 echo $ECHO_N "(cached) $ECHO_C" >&6
14069else
14070 if test "$cross_compiling" = yes; then
14071 # Depending upon the size, compute the lo and hi bounds.
14072cat >conftest.$ac_ext <<_ACEOF
14073/* confdefs.h. */
14074_ACEOF
14075cat confdefs.h >>conftest.$ac_ext
14076cat >>conftest.$ac_ext <<_ACEOF
14077/* end confdefs.h. */
14078
14079#ifdef HAVE_PTHREAD_H
14080#include <pthread.h>
14081#endif
14082
14083
14084 typedef pthread_t ac__type_sizeof_;
14085int
14086main ()
14087{
14088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14089test_array [0] = 0
14090
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095rm -f conftest.$ac_objext
14096if { (ac_try="$ac_compile"
14097case "(($ac_try" in
14098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14099 *) ac_try_echo=$ac_try;;
14100esac
14101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14102 (eval "$ac_compile") 2>conftest.er1
14103 ac_status=$?
14104 grep -v '^ *+' conftest.er1 >conftest.err
14105 rm -f conftest.er1
14106 cat conftest.err >&5
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); } && {
14109 test -z "$ac_c_werror_flag" ||
14110 test ! -s conftest.err
14111 } && test -s conftest.$ac_objext; then
14112 ac_lo=0 ac_mid=0
14113 while :; do
14114 cat >conftest.$ac_ext <<_ACEOF
14115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
14120
14121#ifdef HAVE_PTHREAD_H
14122#include <pthread.h>
14123#endif
14124
14125
14126 typedef pthread_t ac__type_sizeof_;
14127int
14128main ()
14129{
14130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14131test_array [0] = 0
14132
14133 ;
14134 return 0;
14135}
14136_ACEOF
14137rm -f conftest.$ac_objext
14138if { (ac_try="$ac_compile"
14139case "(($ac_try" in
14140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14141 *) ac_try_echo=$ac_try;;
14142esac
14143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14144 (eval "$ac_compile") 2>conftest.er1
14145 ac_status=$?
14146 grep -v '^ *+' conftest.er1 >conftest.err
14147 rm -f conftest.er1
14148 cat conftest.err >&5
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); } && {
14151 test -z "$ac_c_werror_flag" ||
14152 test ! -s conftest.err
14153 } && test -s conftest.$ac_objext; then
14154 ac_hi=$ac_mid; break
14155else
14156 echo "$as_me: failed program was:" >&5
14157sed 's/^/| /' conftest.$ac_ext >&5
14158
14159 ac_lo=`expr $ac_mid + 1`
14160 if test $ac_lo -le $ac_mid; then
14161 ac_lo= ac_hi=
14162 break
14163 fi
14164 ac_mid=`expr 2 '*' $ac_mid + 1`
14165fi
14166
14167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14168 done
14169else
14170 echo "$as_me: failed program was:" >&5
14171sed 's/^/| /' conftest.$ac_ext >&5
14172
14173 cat >conftest.$ac_ext <<_ACEOF
14174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
14179
14180#ifdef HAVE_PTHREAD_H
14181#include <pthread.h>
14182#endif
14183
14184
14185 typedef pthread_t ac__type_sizeof_;
14186int
14187main ()
14188{
14189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14190test_array [0] = 0
14191
14192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext
14197if { (ac_try="$ac_compile"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_compile") 2>conftest.er1
14204 ac_status=$?
14205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
14208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest.$ac_objext; then
14213 ac_hi=-1 ac_mid=-1
14214 while :; do
14215 cat >conftest.$ac_ext <<_ACEOF
14216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
14221
14222#ifdef HAVE_PTHREAD_H
14223#include <pthread.h>
14224#endif
14225
14226
14227 typedef pthread_t ac__type_sizeof_;
14228int
14229main ()
14230{
14231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14232test_array [0] = 0
14233
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (ac_try="$ac_compile"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_compile") 2>conftest.er1
14246 ac_status=$?
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest.$ac_objext; then
14255 ac_lo=$ac_mid; break
14256else
14257 echo "$as_me: failed program was:" >&5
14258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_hi=`expr '(' $ac_mid ')' - 1`
14261 if test $ac_mid -le $ac_hi; then
14262 ac_lo= ac_hi=
14263 break
14264 fi
14265 ac_mid=`expr 2 '*' $ac_mid`
14266fi
14267
14268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14269 done
14270else
14271 echo "$as_me: failed program was:" >&5
14272sed 's/^/| /' conftest.$ac_ext >&5
14273
14274 ac_lo= ac_hi=
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278fi
14279
14280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14281# Binary search between lo and hi bounds.
14282while test "x$ac_lo" != "x$ac_hi"; do
14283 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14284 cat >conftest.$ac_ext <<_ACEOF
14285/* confdefs.h. */
14286_ACEOF
14287cat confdefs.h >>conftest.$ac_ext
14288cat >>conftest.$ac_ext <<_ACEOF
14289/* end confdefs.h. */
14290
14291#ifdef HAVE_PTHREAD_H
14292#include <pthread.h>
14293#endif
14294
14295
14296 typedef pthread_t ac__type_sizeof_;
14297int
14298main ()
14299{
14300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14301test_array [0] = 0
14302
14303 ;
14304 return 0;
14305}
14306_ACEOF
14307rm -f conftest.$ac_objext
14308if { (ac_try="$ac_compile"
14309case "(($ac_try" in
14310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14311 *) ac_try_echo=$ac_try;;
14312esac
14313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14314 (eval "$ac_compile") 2>conftest.er1
14315 ac_status=$?
14316 grep -v '^ *+' conftest.er1 >conftest.err
14317 rm -f conftest.er1
14318 cat conftest.err >&5
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); } && {
14321 test -z "$ac_c_werror_flag" ||
14322 test ! -s conftest.err
14323 } && test -s conftest.$ac_objext; then
14324 ac_hi=$ac_mid
14325else
14326 echo "$as_me: failed program was:" >&5
14327sed 's/^/| /' conftest.$ac_ext >&5
14328
14329 ac_lo=`expr '(' $ac_mid ')' + 1`
14330fi
14331
14332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14333done
14334case $ac_lo in
14335?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14336'') if test "$ac_cv_type_pthread_t" = yes; then
14337 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14338See \`config.log' for more details." >&5
14339echo "$as_me: error: cannot compute sizeof (pthread_t)
14340See \`config.log' for more details." >&2;}
14341 { (exit 77); exit 77; }; }
14342 else
14343 ac_cv_sizeof_pthread_t=0
14344 fi ;;
14345esac
14346else
14347 cat >conftest.$ac_ext <<_ACEOF
14348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
14353
14354#ifdef HAVE_PTHREAD_H
14355#include <pthread.h>
14356#endif
14357
14358
14359 typedef pthread_t ac__type_sizeof_;
14360static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14361static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14362#include <stdio.h>
14363#include <stdlib.h>
14364int
14365main ()
14366{
14367
14368 FILE *f = fopen ("conftest.val", "w");
14369 if (! f)
14370 return 1;
14371 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14372 {
14373 long int i = longval ();
14374 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14375 return 1;
14376 fprintf (f, "%ld\n", i);
14377 }
14378 else
14379 {
14380 unsigned long int i = ulongval ();
14381 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14382 return 1;
14383 fprintf (f, "%lu\n", i);
14384 }
14385 return ferror (f) || fclose (f) != 0;
14386
14387 ;
14388 return 0;
14389}
Martin v. Löwis11437992002-04-12 09:54:03 +000014390_ACEOF
14391rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392if { (ac_try="$ac_link"
14393case "(($ac_try" in
14394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14395 *) ac_try_echo=$ac_try;;
14396esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014398 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 { (case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014411 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014413 echo "$as_me: program exited with status $ac_status" >&5
14414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014415sed 's/^/| /' conftest.$ac_ext >&5
14416
Martin v. Löwis11437992002-04-12 09:54:03 +000014417( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014418if test "$ac_cv_type_pthread_t" = yes; then
14419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14420See \`config.log' for more details." >&5
14421echo "$as_me: error: cannot compute sizeof (pthread_t)
14422See \`config.log' for more details." >&2;}
14423 { (exit 77); exit 77; }; }
14424 else
14425 ac_cv_sizeof_pthread_t=0
14426 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428rm -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 +000014429fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014430rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014432{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014433echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014435
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014438#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014439_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014440
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014441
Trent Mick635f6fb2000-08-23 21:33:05 +000014442fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014443CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014445{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14446echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014447# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014448if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014449 enableval=$enable_toolbox_glue;
14450fi
Jack Jansene578a632001-08-15 01:27:14 +000014451
14452
14453if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014454then
Jack Jansene578a632001-08-15 01:27:14 +000014455 case $ac_sys_system/$ac_sys_release in
14456 Darwin/*)
14457 enable_toolbox_glue="yes";;
14458 *)
14459 enable_toolbox_glue="no";;
14460 esac
14461fi
14462case "$enable_toolbox_glue" in
14463yes)
Jack Jansene578a632001-08-15 01:27:14 +000014464 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014465 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
14467cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014468#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014469_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014470
14471 ;;
14472*)
Jack Jansene578a632001-08-15 01:27:14 +000014473 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014474 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014475 ;;
14476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014477{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14478echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014479
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014480
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014481
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014482case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014483 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014484 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14485 ;;
14486 Darwin/*)
14487 OTHER_LIBTOOL_OPT=""
14488 ;;
14489esac
14490
14491
Ronald Oussoren25967582009-09-06 10:00:26 +000014492ARCH_RUN_32BIT=""
14493
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014494case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014495 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014496 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14497 if test "${enable_universalsdk}"; then
14498 :
14499 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014500 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014501 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014502 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014503 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014504 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014505 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14506 if test ${gcc_version} '<' 4.0
14507 then
14508 LIBTOOL_CRUFT="-lcc_dynamic"
14509 else
14510 LIBTOOL_CRUFT=""
14511 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014512 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014513 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014514else
14515 cat >conftest.$ac_ext <<_ACEOF
14516/* confdefs.h. */
14517_ACEOF
14518cat confdefs.h >>conftest.$ac_ext
14519cat >>conftest.$ac_ext <<_ACEOF
14520/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014521
Ronald Oussoren25967582009-09-06 10:00:26 +000014522 #include <unistd.h>
14523 int main(int argc, char*argv[])
14524 {
14525 if (sizeof(long) == 4) {
14526 return 0;
14527 } else {
14528 return 1;
14529 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014530 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014531
Ronald Oussoren25967582009-09-06 10:00:26 +000014532_ACEOF
14533rm -f conftest$ac_exeext
14534if { (ac_try="$ac_link"
14535case "(($ac_try" in
14536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14537 *) ac_try_echo=$ac_try;;
14538esac
14539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14540 (eval "$ac_link") 2>&5
14541 ac_status=$?
14542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14544 { (case "(($ac_try" in
14545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546 *) ac_try_echo=$ac_try;;
14547esac
14548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14549 (eval "$ac_try") 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); }; }; then
14553 ac_osx_32bit=yes
14554else
14555 echo "$as_me: program exited with status $ac_status" >&5
14556echo "$as_me: failed program was:" >&5
14557sed 's/^/| /' conftest.$ac_ext >&5
14558
14559( exit $ac_status )
14560ac_osx_32bit=no
14561fi
14562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14563fi
14564
14565
14566
14567 if test "${ac_osx_32bit}" = "yes"; then
14568 case `arch` in
14569 i386)
14570 MACOSX_DEFAULT_ARCH="i386"
14571 ;;
14572 ppc)
14573 MACOSX_DEFAULT_ARCH="ppc"
14574 ;;
14575 *)
14576 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14577echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14578 { (exit 1); exit 1; }; }
14579 ;;
14580 esac
14581 else
14582 case `arch` in
14583 i386)
14584 MACOSX_DEFAULT_ARCH="x86_64"
14585 ;;
14586 ppc)
14587 MACOSX_DEFAULT_ARCH="ppc64"
14588 ;;
14589 *)
14590 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14591echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14592 { (exit 1); exit 1; }; }
14593 ;;
14594 esac
14595
14596 #ARCH_RUN_32BIT="true"
14597 fi
14598
14599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014601 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014602esac
14603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014604{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14605echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014606if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014607then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014608 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014610 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612cat >>confdefs.h <<\_ACEOF
14613#define WITH_NEXT_FRAMEWORK 1
14614_ACEOF
14615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014616 { echo "$as_me:$LINENO: result: yes" >&5
14617echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014618 if test $enable_shared = "yes"
14619 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014620 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14621echo "$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 +000014622 { (exit 1); exit 1; }; }
14623 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014625 { echo "$as_me:$LINENO: result: no" >&5
14626echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627fi
14628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014629{ echo "$as_me:$LINENO: checking for dyld" >&5
14630echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014631case $ac_sys_system/$ac_sys_release in
14632 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634cat >>confdefs.h <<\_ACEOF
14635#define WITH_DYLD 1
14636_ACEOF
14637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014638 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14639echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014640 ;;
14641 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014642 { echo "$as_me:$LINENO: result: no" >&5
14643echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014644 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014645esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014646
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648
Michael W. Hudson54241132001-12-07 15:38:26 +000014649
14650
14651
14652
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014654# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014655{ echo "$as_me:$LINENO: checking SO" >&5
14656echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657if test -z "$SO"
14658then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014659 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014660 hp*|HP*)
14661 case `uname -m` in
14662 ia64) SO=.so;;
14663 *) SO=.sl;;
14664 esac
14665 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014666 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014667 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014668 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014669else
14670 # this might also be a termcap variable, see #610332
14671 echo
14672 echo '====================================================================='
14673 echo '+ +'
14674 echo '+ WARNING: You have set SO in your environment. +'
14675 echo '+ Do you really mean to change the extension for shared libraries? +'
14676 echo '+ Continuing in 10 seconds to let you to ponder. +'
14677 echo '+ +'
14678 echo '====================================================================='
14679 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014681{ echo "$as_me:$LINENO: result: $SO" >&5
14682echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014683
Ronald Oussoren79f90492009-01-02 10:44:46 +000014684
Neal Norwitz58e28882006-05-19 07:00:58 +000014685cat >>confdefs.h <<_ACEOF
14686#define SHLIB_EXT "$SO"
14687_ACEOF
14688
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014690# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014691# (Shared libraries in this instance are shared modules to be loaded into
14692# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014693{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14694echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014695if test -z "$LDSHARED"
14696then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014697 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014698 AIX*)
14699 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014700 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014701 ;;
14702 BeOS*)
14703 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014704 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014705 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014706 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014707 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014709 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014710 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014711 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014712 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014713 hp*|HP*)
14714 if test "$GCC" = "yes"
14715 then LDSHARED='$(CC) -shared'
14716 else LDSHARED='ld -b';
14717 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014718 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014719 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014720 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14721 if test "$enable_framework" ; then
14722 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014723 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14724 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014725 else
14726 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014727 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014728 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014729 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014730 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14731 if test "$enable_framework" ; then
14732 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014733 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14734 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014735 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014736 # No framework, use the Python app as bundle-loader
14737 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014738 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014739 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 Darwin/*)
14741 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14742 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014743
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014744 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014745 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014746 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014747 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014748 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14750 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014751 else
14752 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14753 if test "$enable_framework" ; then
14754 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014755 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14756 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014757 else
14758 # No framework, use the Python app as bundle-loader
14759 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14760 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14761 fi
14762 fi
14763 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014764 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014765 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014766 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014768 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014769 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014770 else
14771 LDSHARED="ld -Bshareable ${LDFLAGS}"
14772 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014773 OpenBSD*)
14774 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14775 then
14776 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14777 else
14778 case `uname -r` in
14779 [01].* | 2.[0-7] | 2.[0-7].*)
14780 LDSHARED="ld -Bshareable ${LDFLAGS}"
14781 ;;
14782 *)
14783 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14784 ;;
14785 esac
14786 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014787 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014788 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014789 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014790 then LDSHARED='$(CC) -shared'
14791 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014792 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014793 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014794 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014795 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796 *) LDSHARED="ld";;
14797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014798fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014799{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14800echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014801BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014802# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014803# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014804{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14805echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806if test -z "$CCSHARED"
14807then
Guido van Rossum07397971997-04-29 21:49:50 +000014808 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014809 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014810 then CCSHARED="-fPIC";
14811 elif test `uname -p` = sparc;
14812 then CCSHARED="-xcode=pic32";
14813 else CCSHARED="-Kpic";
14814 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014815 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014816 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014817 else CCSHARED="+z";
14818 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014819 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014820 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014821 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014822 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014823 if test "$GCC" = "yes"
14824 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014825 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014826 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014827 SCO_SV*)
14828 if test "$GCC" = "yes"
14829 then CCSHARED="-fPIC"
14830 else CCSHARED="-Kpic -belf"
14831 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014832 IRIX*/6*) case $CC in
14833 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014834 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014835 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014837 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014838fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014839{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14840echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014841# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014842# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14844echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014845if test -z "$LINKFORSHARED"
14846then
Guido van Rossum07397971997-04-29 21:49:50 +000014847 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014848 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014849 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014850 LINKFORSHARED="-Wl,-E -Wl,+s";;
14851# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014852 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014853 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014854 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014855 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014856 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14857 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014858 # not used by the core itself but which needs to be in the core so
14859 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014860 # -prebind is no longer used, because it actually seems to give a
14861 # slowdown in stead of a speedup, maybe due to the large number of
14862 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014863
14864 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014865 if test "$enable_framework"
14866 then
Jack Jansenda49e192005-01-07 13:08:22 +000014867 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014868 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014869 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014870 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014871 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014872 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014873 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014874 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14875 then
14876 LINKFORSHARED="-Wl,--export-dynamic"
14877 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014878 SunOS/5*) case $CC in
14879 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014880 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014881 then
14882 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014883 fi;;
14884 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014885 CYGWIN*)
14886 if test $enable_shared = "no"
14887 then
14888 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14889 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014890 QNX*)
14891 # -Wl,-E causes the symbols to be added to the dynamic
14892 # symbol table so that they can be found when a module
14893 # is loaded. -N 2048K causes the stack size to be set
14894 # to 2048 kilobytes so that the stack doesn't overflow
14895 # when running test_compile.py.
14896 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014897 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014899{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14900echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014901
Michael W. Hudson54241132001-12-07 15:38:26 +000014902
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014903
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014904{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14905echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014906if test ! "$LIBRARY" = "$LDLIBRARY"
14907then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014908 case $ac_sys_system in
14909 CYGWIN*)
14910 # Cygwin needs CCSHARED when building extension DLLs
14911 # but not when building the interpreter DLL.
14912 CFLAGSFORSHARED='';;
14913 *)
14914 CFLAGSFORSHARED='$(CCSHARED)'
14915 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014917{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14918echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014919
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014920# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14921# library (with --enable-shared).
14922# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014923# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14924# if it is not required, since it creates a dependency of the shared library
14925# to LIBS. This, in turn, means that applications linking the shared libpython
14926# don't need to link LIBS explicitly. The default should be only changed
14927# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014929{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14930echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014932 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014933 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014934esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14936echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937
14938
Guido van Rossum627b2d71993-12-24 10:39:16 +000014939# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014941{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14942echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014943if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014945else
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014947LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014949/* confdefs.h. */
14950_ACEOF
14951cat confdefs.h >>conftest.$ac_ext
14952cat >>conftest.$ac_ext <<_ACEOF
14953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Martin v. Löwiseba40652007-08-30 20:10:57 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014961char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
14970rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971if { (ac_try="$ac_link"
14972case "(($ac_try" in
14973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14974 *) ac_try_echo=$ac_try;;
14975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 (exit $ac_status); } && {
14984 test -z "$ac_c_werror_flag" ||
14985 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014986 } && test -s conftest$ac_exeext &&
14987 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014991sed 's/^/| /' conftest.$ac_ext >&5
14992
Martin v. Löwiseba40652007-08-30 20:10:57 +000014993 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995
14996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014998LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014999fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015000{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15001echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15002if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 cat >>confdefs.h <<_ACEOF
15004#define HAVE_LIBDL 1
15005_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015006
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015007 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015008
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015009fi
15010 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015012{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15013echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015014if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015018LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015020/* confdefs.h. */
15021_ACEOF
15022cat confdefs.h >>conftest.$ac_ext
15023cat >>conftest.$ac_ext <<_ACEOF
15024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026/* Override any GCC internal prototype to avoid an error.
15027 Use char because int might match the return type of a GCC
15028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015029#ifdef __cplusplus
15030extern "C"
15031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015032char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015033int
15034main ()
15035{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
15041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042if { (ac_try="$ac_link"
15043case "(($ac_try" in
15044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15045 *) ac_try_echo=$ac_try;;
15046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015050 grep -v '^ *+' conftest.er1 >conftest.err
15051 rm -f conftest.er1
15052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 (exit $ac_status); } && {
15055 test -z "$ac_c_werror_flag" ||
15056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015057 } && test -s conftest$ac_exeext &&
15058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015062sed 's/^/| /' conftest.$ac_ext >&5
15063
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015066
15067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015069LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015071{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15072echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15073if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 cat >>confdefs.h <<_ACEOF
15075#define HAVE_LIBDLD 1
15076_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015077
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015078 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080fi
15081 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015082
Ronald Oussoren79f90492009-01-02 10:44:46 +000015083# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015084if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015085 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15086echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015087if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015089else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015090 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015092/* confdefs.h. */
15093_ACEOF
15094cat confdefs.h >>conftest.$ac_ext
15095cat >>conftest.$ac_ext <<_ACEOF
15096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Martin v. Löwiseba40652007-08-30 20:10:57 +000015098/* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015101#ifdef __cplusplus
15102extern "C"
15103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015104char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015105int
15106main ()
15107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ;
15110 return 0;
15111}
15112_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113for ac_lib in '' pthread rt posix4; do
15114 if test -z "$ac_lib"; then
15115 ac_res="none required"
15116 else
15117 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015118 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015119 fi
15120 rm -f conftest.$ac_objext conftest$ac_exeext
15121if { (ac_try="$ac_link"
15122case "(($ac_try" in
15123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15124 *) ac_try_echo=$ac_try;;
15125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015128 ac_status=$?
15129 grep -v '^ *+' conftest.er1 >conftest.err
15130 rm -f conftest.er1
15131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 (exit $ac_status); } && {
15134 test -z "$ac_c_werror_flag" ||
15135 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015136 } && test -s conftest$ac_exeext &&
15137 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015140 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015141sed 's/^/| /' conftest.$ac_ext >&5
15142
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143
Brett Cannon19fab762007-06-02 03:02:29 +000015144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145
15146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15147 conftest$ac_exeext
15148 if test "${ac_cv_search_sem_init+set}" = set; then
15149 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015151done
15152if test "${ac_cv_search_sem_init+set}" = set; then
15153 :
15154else
15155 ac_cv_search_sem_init=no
15156fi
15157rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015158LIBS=$ac_func_search_save_LIBS
15159fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015160{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15161echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015162ac_res=$ac_cv_search_sem_init
15163if test "$ac_res" != no; then
15164 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015166fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015167 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015168 # posix4 on Solaris 2.6
15169 # pthread (first!) on Linux
15170fi
15171
Martin v. Löwis19d17342003-06-14 21:03:05 +000015172# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015173{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15174echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015175if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015176 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015177else
15178 ac_check_lib_save_LIBS=$LIBS
15179LIBS="-lintl $LIBS"
15180cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015181/* confdefs.h. */
15182_ACEOF
15183cat confdefs.h >>conftest.$ac_ext
15184cat >>conftest.$ac_ext <<_ACEOF
15185/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015186
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187/* Override any GCC internal prototype to avoid an error.
15188 Use char because int might match the return type of a GCC
15189 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015190#ifdef __cplusplus
15191extern "C"
15192#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015194int
15195main ()
15196{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015198 ;
15199 return 0;
15200}
15201_ACEOF
15202rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203if { (ac_try="$ac_link"
15204case "(($ac_try" in
15205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15206 *) ac_try_echo=$ac_try;;
15207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015218 } && test -s conftest$ac_exeext &&
15219 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015220 ac_cv_lib_intl_textdomain=yes
15221else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227
15228rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015230LIBS=$ac_check_lib_save_LIBS
15231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015232{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15233echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15234if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015235
15236cat >>confdefs.h <<\_ACEOF
15237#define WITH_LIBINTL 1
15238_ACEOF
15239
15240fi
15241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242
15243# checks for system dependent C++ extensions support
15244case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015245 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15246echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015248/* confdefs.h. */
15249_ACEOF
15250cat confdefs.h >>conftest.$ac_ext
15251cat >>conftest.$ac_ext <<_ACEOF
15252/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015253#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254int
15255main ()
15256{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ;
15259 return 0;
15260}
15261_ACEOF
15262rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263if { (ac_try="$ac_link"
15264case "(($ac_try" in
15265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15266 *) ac_try_echo=$ac_try;;
15267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015271 grep -v '^ *+' conftest.er1 >conftest.err
15272 rm -f conftest.er1
15273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 (exit $ac_status); } && {
15276 test -z "$ac_c_werror_flag" ||
15277 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015278 } && test -s conftest$ac_exeext &&
15279 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015280
Martin v. Löwis11437992002-04-12 09:54:03 +000015281cat >>confdefs.h <<\_ACEOF
15282#define AIX_GENUINE_CPLUSPLUS 1
15283_ACEOF
15284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285 { echo "$as_me:$LINENO: result: yes" >&5
15286echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015289sed 's/^/| /' conftest.$ac_ext >&5
15290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 { echo "$as_me:$LINENO: result: no" >&5
15292echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294
15295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015296 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015297 *) ;;
15298esac
15299
Guido van Rossum70c7f481998-03-26 18:44:10 +000015300# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015302{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15303echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015304if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015305 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015306else
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015308LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015310/* confdefs.h. */
15311_ACEOF
15312cat confdefs.h >>conftest.$ac_ext
15313cat >>conftest.$ac_ext <<_ACEOF
15314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316/* Override any GCC internal prototype to avoid an error.
15317 Use char because int might match the return type of a GCC
15318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015319#ifdef __cplusplus
15320extern "C"
15321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015322char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015323int
15324main ()
15325{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015327 ;
15328 return 0;
15329}
15330_ACEOF
15331rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332if { (ac_try="$ac_link"
15333case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015340 grep -v '^ *+' conftest.er1 >conftest.err
15341 rm -f conftest.er1
15342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344 (exit $ac_status); } && {
15345 test -z "$ac_c_werror_flag" ||
15346 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015347 } && test -s conftest$ac_exeext &&
15348 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015352sed 's/^/| /' conftest.$ac_ext >&5
15353
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356
15357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015359LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015361{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15362echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15363if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015366 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015367{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15368echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015369if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015371else
Martin v. Löwis11437992002-04-12 09:54:03 +000015372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015373LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015374cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015375/* confdefs.h. */
15376_ACEOF
15377cat confdefs.h >>conftest.$ac_ext
15378cat >>conftest.$ac_ext <<_ACEOF
15379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015380
Martin v. Löwiseba40652007-08-30 20:10:57 +000015381/* Override any GCC internal prototype to avoid an error.
15382 Use char because int might match the return type of a GCC
15383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015384#ifdef __cplusplus
15385extern "C"
15386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015387char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015388int
15389main ()
15390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 ;
15393 return 0;
15394}
15395_ACEOF
15396rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397if { (ac_try="$ac_link"
15398case "(($ac_try" in
15399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15400 *) ac_try_echo=$ac_try;;
15401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 grep -v '^ *+' conftest.er1 >conftest.err
15406 rm -f conftest.er1
15407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015409 (exit $ac_status); } && {
15410 test -z "$ac_c_werror_flag" ||
15411 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015412 } && test -s conftest$ac_exeext &&
15413 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015414 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015417sed 's/^/| /' conftest.$ac_ext >&5
15418
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421
15422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015423 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015424LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015426{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15427echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15428if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015429 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015430fi
15431 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015432
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015433case "$ac_sys_system" in
15434BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15436echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015437if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015439else
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015441LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015443/* confdefs.h. */
15444_ACEOF
15445cat confdefs.h >>conftest.$ac_ext
15446cat >>conftest.$ac_ext <<_ACEOF
15447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015448
Martin v. Löwiseba40652007-08-30 20:10:57 +000015449/* Override any GCC internal prototype to avoid an error.
15450 Use char because int might match the return type of a GCC
15451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015452#ifdef __cplusplus
15453extern "C"
15454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015455char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015456int
15457main ()
15458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 ;
15461 return 0;
15462}
15463_ACEOF
15464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465if { (ac_try="$ac_link"
15466case "(($ac_try" in
15467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15468 *) ac_try_echo=$ac_try;;
15469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015473 grep -v '^ *+' conftest.er1 >conftest.err
15474 rm -f conftest.er1
15475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 (exit $ac_status); } && {
15478 test -z "$ac_c_werror_flag" ||
15479 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015480 } && test -s conftest$ac_exeext &&
15481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015485sed 's/^/| /' conftest.$ac_ext >&5
15486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489
15490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015492LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015493fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15495echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15496if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015497 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015498fi
15499 # BeOS
15500;;
15501esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015502
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015503{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15504echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015507if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015508 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015509{ echo "$as_me:$LINENO: result: $withval" >&5
15510echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015511LIBS="$withval $LIBS"
15512
15513else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015514 { echo "$as_me:$LINENO: result: no" >&5
15515echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516fi
15517
Guido van Rossum7f43da71994-08-01 12:15:30 +000015518
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015519# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15521echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015522
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015524if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525 withval=$with_system_ffi;
15526fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015527
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015529{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15530echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015531
Benjamin Peterson867475c2009-04-29 20:36:25 +000015532# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015533{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15534echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015535
15536# Check whether --with-dbmliborder was given.
15537if test "${with_dbmliborder+set}" = set; then
15538 withval=$with_dbmliborder;
15539if test x$with_dbmliborder = xyes
15540then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015541{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15542echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015543 { (exit 1); exit 1; }; }
15544else
15545 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15546 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15547 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015548 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15549echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015550 { (exit 1); exit 1; }; }
15551 fi
15552 done
15553fi
15554fi
15555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015556{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15557echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015558
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015559# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015560
15561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015562{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15563echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015566if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015567 withval=$with_signal_module;
15568fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015569
15570
15571if test -z "$with_signal_module"
15572then with_signal_module="yes"
15573fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015574{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15575echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576
15577if test "${with_signal_module}" = "yes"; then
15578 USE_SIGNAL_MODULE=""
15579 SIGNAL_OBJS=""
15580else
15581 USE_SIGNAL_MODULE="#"
15582 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15583fi
15584
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015585# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015586
Barry Warsawc0d24d82000-06-29 16:12:00 +000015587USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015589{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15590echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592
Martin v. Löwiseba40652007-08-30 20:10:57 +000015593# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015595 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015596{ echo "$as_me:$LINENO: result: $withval" >&5
15597echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015598LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015599if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015600 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015601fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603 { echo "$as_me:$LINENO: result: no" >&5
15604echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015605fi
15606
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608# Templates for things AC_DEFINEd more than once.
15609# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015610
15611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613
15614
15615
15616
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015617{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15618echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015621if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 withval=$with_threads;
15623fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015624
15625
Barry Warsawc0d24d82000-06-29 16:12:00 +000015626# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015629if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630 withval=$with_thread; with_threads=$with_thread
15631fi
15632
Barry Warsawc0d24d82000-06-29 16:12:00 +000015633
15634if test -z "$with_threads"
15635then with_threads="yes"
15636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015637{ echo "$as_me:$LINENO: result: $with_threads" >&5
15638echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015639
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015640
Barry Warsawc0d24d82000-06-29 16:12:00 +000015641if test "$with_threads" = "no"
15642then
15643 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644elif test "$ac_cv_pthread_is_default" = yes
15645then
Martin v. Löwis11437992002-04-12 09:54:03 +000015646 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015647#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015649
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015652#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654
15655 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015657elif test "$ac_cv_kpthread" = "yes"
15658then
15659 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015660 if test "$ac_cv_cxx_thread" = "yes"; then
15661 CXX="$CXX -Kpthread"
15662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015664#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015667 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015668 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015669elif test "$ac_cv_kthread" = "yes"
15670then
15671 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015672 if test "$ac_cv_cxx_thread" = "yes"; then
15673 CXX="$CXX -Kthread"
15674 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015675 cat >>confdefs.h <<\_ACEOF
15676#define WITH_THREAD 1
15677_ACEOF
15678
15679 posix_threads=yes
15680 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681elif test "$ac_cv_pthread" = "yes"
15682then
15683 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015684 if test "$ac_cv_cxx_thread" = "yes"; then
15685 CXX="$CXX -pthread"
15686 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015687 cat >>confdefs.h <<\_ACEOF
15688#define WITH_THREAD 1
15689_ACEOF
15690
15691 posix_threads=yes
15692 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015693else
15694 if test ! -z "$with_threads" -a -d "$with_threads"
15695 then LDFLAGS="$LDFLAGS -L$with_threads"
15696 fi
15697 if test ! -z "$withval" -a -d "$withval"
15698 then LDFLAGS="$LDFLAGS -L$withval"
15699 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015700
15701 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015702 # define _POSIX_THREADS in unistd.h. Some apparently don't
15703 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015704 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15705echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015707/* confdefs.h. */
15708_ACEOF
15709cat confdefs.h >>conftest.$ac_ext
15710cat >>conftest.$ac_ext <<_ACEOF
15711/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015712
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015714#ifdef _POSIX_THREADS
15715yes
15716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
15718_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015719if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015720 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015721 unistd_defines_pthreads=yes
15722else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723 unistd_defines_pthreads=no
15724fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000015725rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015727 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15728echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015731#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015733
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015735 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15736echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015737if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015740{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15741echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15745echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015752$ac_includes_default
15753#include <cthreads.h>
15754_ACEOF
15755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756if { (ac_try="$ac_compile"
15757case "(($ac_try" in
15758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15759 *) ac_try_echo=$ac_try;;
15760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015764 grep -v '^ *+' conftest.er1 >conftest.err
15765 rm -f conftest.er1
15766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015768 (exit $ac_status); } && {
15769 test -z "$ac_c_werror_flag" ||
15770 test ! -s conftest.err
15771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_header_compiler=yes
15773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015775sed 's/^/| /' conftest.$ac_ext >&5
15776
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779
15780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15782echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
15784# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015785{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15786echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015788/* confdefs.h. */
15789_ACEOF
15790cat confdefs.h >>conftest.$ac_ext
15791cat >>conftest.$ac_ext <<_ACEOF
15792/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015793#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795if { (ac_try="$ac_cpp conftest.$ac_ext"
15796case "(($ac_try" in
15797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15798 *) ac_try_echo=$ac_try;;
15799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015803 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 rm -f conftest.er1
15805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015807 (exit $ac_status); } >/dev/null && {
15808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15809 test ! -s conftest.err
15810 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_header_preproc=yes
15812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015814sed 's/^/| /' conftest.$ac_ext >&5
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818
Martin v. Löwis11437992002-04-12 09:54:03 +000015819rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15821echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
15823# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15825 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015826 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15827echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15828 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15829echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015830 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015831 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015832 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15834echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15836echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15838echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15839 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15840echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15841 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15842echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15843 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15844echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015846## -------------------------------------- ##
15847## Report this to http://bugs.python.org/ ##
15848## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015849_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015850 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15854echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015855if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015857else
15858 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15861echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862
15863fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015864if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015865 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015870#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873
15874cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015877
15878 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015879 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015880else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015883 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15884echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015885if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015887fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015888{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15889echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015892{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15893echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015895/* confdefs.h. */
15896_ACEOF
15897cat confdefs.h >>conftest.$ac_ext
15898cat >>conftest.$ac_ext <<_ACEOF
15899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015900$ac_includes_default
15901#include <mach/cthreads.h>
15902_ACEOF
15903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904if { (ac_try="$ac_compile"
15905case "(($ac_try" in
15906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15907 *) ac_try_echo=$ac_try;;
15908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015912 grep -v '^ *+' conftest.er1 >conftest.err
15913 rm -f conftest.er1
15914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015916 (exit $ac_status); } && {
15917 test -z "$ac_c_werror_flag" ||
15918 test ! -s conftest.err
15919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_header_compiler=yes
15921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015923sed 's/^/| /' conftest.$ac_ext >&5
15924
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015927
15928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015929{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15930echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
15932# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015933{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15934echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015941#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943if { (ac_try="$ac_cpp conftest.$ac_ext"
15944case "(($ac_try" in
15945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15946 *) ac_try_echo=$ac_try;;
15947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015951 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 rm -f conftest.er1
15953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955 (exit $ac_status); } >/dev/null && {
15956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15957 test ! -s conftest.err
15958 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_header_preproc=yes
15960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15969echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15973 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015974 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15975echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15976 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15977echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015979 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15987 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15988echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15989 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15990echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15991 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15992echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015994## -------------------------------------- ##
15995## Report this to http://bugs.python.org/ ##
15996## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015997_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015999 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16002echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016005else
16006 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016008{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16009echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010
16011fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016012if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016015_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016018#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016020
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016026 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016027else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16030echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016031
Martin v. Löwiseba40652007-08-30 20:10:57 +000016032# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016033if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016034 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16035echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016036 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016037#define WITH_THREAD 1
16038_ACEOF
16039
16040
16041cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016042#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016043_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016044
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016045 LIBS="-lpth $LIBS"
16046 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016048 { echo "$as_me:$LINENO: result: no" >&5
16049echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016050
16051 # Just looking for pthread_create in libpthread is not enough:
16052 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16053 # So we really have to include pthread.h, and then link.
16054 _libs=$LIBS
16055 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016056 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16057echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016059/* confdefs.h. */
16060_ACEOF
16061cat confdefs.h >>conftest.$ac_ext
16062cat >>conftest.$ac_ext <<_ACEOF
16063/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016064#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016065
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016066void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016067int
16068main ()
16069{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016070
16071pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077if { (ac_try="$ac_link"
16078case "(($ac_try" in
16079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16080 *) ac_try_echo=$ac_try;;
16081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 grep -v '^ *+' conftest.er1 >conftest.err
16086 rm -f conftest.er1
16087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 (exit $ac_status); } && {
16090 test -z "$ac_c_werror_flag" ||
16091 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016092 } && test -s conftest$ac_exeext &&
16093 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016094
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016095 { echo "$as_me:$LINENO: result: yes" >&5
16096echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016098#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016100
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016101 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016102 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016105sed 's/^/| /' conftest.$ac_ext >&5
16106
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016108 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16110echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016111if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016112 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016113else
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016120/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16121 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16122#define pthread_detach innocuous_pthread_detach
16123
Guido van Rossumad678af1998-10-02 14:42:15 +000016124/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016125 which can conflict with char pthread_detach (); below.
16126 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016127 <limits.h> exists even on freestanding compilers. */
16128
16129#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016130# include <limits.h>
16131#else
16132# include <assert.h>
16133#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016134
16135#undef pthread_detach
16136
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137/* Override any GCC internal prototype to avoid an error.
16138 Use char because int might match the return type of a GCC
16139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016140#ifdef __cplusplus
16141extern "C"
16142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016143char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016144/* The GNU C library defines this for functions which it implements
16145 to always fail with ENOSYS. Some functions are actually named
16146 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016147#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016148choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016149#endif
16150
Skip Montanaro6dead952003-09-25 14:50:04 +000016151int
16152main ()
16153{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 ;
16156 return 0;
16157}
16158_ACEOF
16159rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160if { (ac_try="$ac_link"
16161case "(($ac_try" in
16162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16163 *) ac_try_echo=$ac_try;;
16164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 grep -v '^ *+' conftest.er1 >conftest.err
16169 rm -f conftest.er1
16170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 (exit $ac_status); } && {
16173 test -z "$ac_c_werror_flag" ||
16174 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016175 } && test -s conftest$ac_exeext &&
16176 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016177 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016180sed 's/^/| /' conftest.$ac_ext >&5
16181
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184
16185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016187fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16189echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16190if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016191 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016192#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016193_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016194
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016195 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016196 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016197else
Guido van Rossumad678af1998-10-02 14:42:15 +000016198
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016199 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016200 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16201echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016202if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016204fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016205{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16206echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016207else
16208 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016209{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16210echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016212/* confdefs.h. */
16213_ACEOF
16214cat confdefs.h >>conftest.$ac_ext
16215cat >>conftest.$ac_ext <<_ACEOF
16216/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016217$ac_includes_default
16218#include <atheos/threads.h>
16219_ACEOF
16220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221if { (ac_try="$ac_compile"
16222case "(($ac_try" in
16223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16224 *) ac_try_echo=$ac_try;;
16225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016229 grep -v '^ *+' conftest.er1 >conftest.err
16230 rm -f conftest.er1
16231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233 (exit $ac_status); } && {
16234 test -z "$ac_c_werror_flag" ||
16235 test ! -s conftest.err
16236 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016237 ac_header_compiler=yes
16238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016240sed 's/^/| /' conftest.$ac_ext >&5
16241
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244
16245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016246{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16247echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016248
16249# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016250{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16251echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016253/* confdefs.h. */
16254_ACEOF
16255cat confdefs.h >>conftest.$ac_ext
16256cat >>conftest.$ac_ext <<_ACEOF
16257/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016258#include <atheos/threads.h>
16259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260if { (ac_try="$ac_cpp conftest.$ac_ext"
16261case "(($ac_try" in
16262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16263 *) ac_try_echo=$ac_try;;
16264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016267 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016269 rm -f conftest.er1
16270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 (exit $ac_status); } >/dev/null && {
16273 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16274 test ! -s conftest.err
16275 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016276 ac_header_preproc=yes
16277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016279sed 's/^/| /' conftest.$ac_ext >&5
16280
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281 ac_header_preproc=no
16282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016283
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016284rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016285{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16286echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016287
16288# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16290 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016291 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16292echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16293 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16294echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16299echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16300 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16301echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16303echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16304 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16305echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16306 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16307echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16308 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16309echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016310 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016311## -------------------------------------- ##
16312## Report this to http://bugs.python.org/ ##
16313## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016314_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016316 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016318{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16319echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016320if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016322else
16323 ac_cv_header_atheos_threads_h=$ac_header_preproc
16324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16326echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016327
16328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016330 cat >>confdefs.h <<\_ACEOF
16331#define WITH_THREAD 1
16332_ACEOF
16333
16334
16335cat >>confdefs.h <<\_ACEOF
16336#define ATHEOS_THREADS 1
16337_ACEOF
16338
16339 THREADOBJ="Python/thread.o"
16340else
16341
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016343 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16344echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016345if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016348{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16349echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016350else
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016352{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16353echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016354cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016355/* confdefs.h. */
16356_ACEOF
16357cat confdefs.h >>conftest.$ac_ext
16358cat >>conftest.$ac_ext <<_ACEOF
16359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016360$ac_includes_default
16361#include <kernel/OS.h>
16362_ACEOF
16363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364if { (ac_try="$ac_compile"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
16379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_header_compiler=yes
16381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016383sed 's/^/| /' conftest.$ac_ext >&5
16384
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016387
16388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016389{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16390echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016391
16392# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016393{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16394echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016395cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016396/* confdefs.h. */
16397_ACEOF
16398cat confdefs.h >>conftest.$ac_ext
16399cat >>conftest.$ac_ext <<_ACEOF
16400/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016401#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403if { (ac_try="$ac_cpp conftest.$ac_ext"
16404case "(($ac_try" in
16405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16406 *) ac_try_echo=$ac_try;;
16407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016411 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016412 rm -f conftest.er1
16413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415 (exit $ac_status); } >/dev/null && {
16416 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16417 test ! -s conftest.err
16418 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_header_preproc=yes
16420else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016422sed 's/^/| /' conftest.$ac_ext >&5
16423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426
Martin v. Löwis11437992002-04-12 09:54:03 +000016427rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16429echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016430
Martin v. Löwis11437992002-04-12 09:54:03 +000016431# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16433 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016434 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16435echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16436 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16437echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016438 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016439 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016440 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016441 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16442echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16443 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16444echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16446echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16447 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16448echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16449 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16450echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16451 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16452echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016453 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016454## -------------------------------------- ##
16455## Report this to http://bugs.python.org/ ##
16456## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016457_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016459 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016460esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016461{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16462echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016463if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016465else
16466 ac_cv_header_kernel_OS_h=$ac_header_preproc
16467fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016468{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16469echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
16471fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016472if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >>confdefs.h <<\_ACEOF
16474#define WITH_THREAD 1
16475_ACEOF
16476
16477
16478cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016479#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016480_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016481
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016482 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016483else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016485 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16486echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016487if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016488 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016489else
Martin v. Löwis11437992002-04-12 09:54:03 +000016490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016491LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016493/* confdefs.h. */
16494_ACEOF
16495cat confdefs.h >>conftest.$ac_ext
16496cat >>conftest.$ac_ext <<_ACEOF
16497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016498
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499/* Override any GCC internal prototype to avoid an error.
16500 Use char because int might match the return type of a GCC
16501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016502#ifdef __cplusplus
16503extern "C"
16504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016506int
16507main ()
16508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016510 ;
16511 return 0;
16512}
16513_ACEOF
16514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515if { (ac_try="$ac_link"
16516case "(($ac_try" in
16517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16518 *) ac_try_echo=$ac_try;;
16519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016523 grep -v '^ *+' conftest.er1 >conftest.err
16524 rm -f conftest.er1
16525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 (exit $ac_status); } && {
16528 test -z "$ac_c_werror_flag" ||
16529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016530 } && test -s conftest$ac_exeext &&
16531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016535sed 's/^/| /' conftest.$ac_ext >&5
16536
Martin v. Löwiseba40652007-08-30 20:10:57 +000016537 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539
16540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016542LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016544{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16545echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16546if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016549_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016550
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016551 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016552 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016553 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016554else
Greg Steinadf63d62000-07-05 10:38:09 +000016555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016556 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16557echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016558if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016560else
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016562LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016564/* confdefs.h. */
16565_ACEOF
16566cat confdefs.h >>conftest.$ac_ext
16567cat >>conftest.$ac_ext <<_ACEOF
16568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570/* Override any GCC internal prototype to avoid an error.
16571 Use char because int might match the return type of a GCC
16572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016573#ifdef __cplusplus
16574extern "C"
16575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016576char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016577int
16578main ()
16579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_link"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016601 } && test -s conftest$ac_exeext &&
16602 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
16611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016614fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016615{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16616echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16617if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016618 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016619#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016622 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016623 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016624 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016625else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016627 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16628echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016629if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016631else
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016633LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016635/* confdefs.h. */
16636_ACEOF
16637cat confdefs.h >>conftest.$ac_ext
16638cat >>conftest.$ac_ext <<_ACEOF
16639/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016640
Martin v. Löwiseba40652007-08-30 20:10:57 +000016641/* Override any GCC internal prototype to avoid an error.
16642 Use char because int might match the return type of a GCC
16643 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016644#ifdef __cplusplus
16645extern "C"
16646#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016647char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016648int
16649main ()
16650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016652 ;
16653 return 0;
16654}
16655_ACEOF
16656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657if { (ac_try="$ac_link"
16658case "(($ac_try" in
16659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16660 *) ac_try_echo=$ac_try;;
16661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016665 grep -v '^ *+' conftest.er1 >conftest.err
16666 rm -f conftest.er1
16667 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669 (exit $ac_status); } && {
16670 test -z "$ac_c_werror_flag" ||
16671 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016672 } && test -s conftest$ac_exeext &&
16673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016674 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016675else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016677sed 's/^/| /' conftest.$ac_ext >&5
16678
Martin v. Löwiseba40652007-08-30 20:10:57 +000016679 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016681
16682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016685fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016686{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16687echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16688if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016691_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016694 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016695 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016696else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016698 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16699echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016700if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016702else
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016704LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016705cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016706/* confdefs.h. */
16707_ACEOF
16708cat confdefs.h >>conftest.$ac_ext
16709cat >>conftest.$ac_ext <<_ACEOF
16710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016711
Martin v. Löwiseba40652007-08-30 20:10:57 +000016712/* Override any GCC internal prototype to avoid an error.
16713 Use char because int might match the return type of a GCC
16714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016715#ifdef __cplusplus
16716extern "C"
16717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016718char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016719int
16720main ()
16721{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016723 ;
16724 return 0;
16725}
16726_ACEOF
16727rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728if { (ac_try="$ac_link"
16729case "(($ac_try" in
16730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16731 *) ac_try_echo=$ac_try;;
16732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016736 grep -v '^ *+' conftest.er1 >conftest.err
16737 rm -f conftest.er1
16738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740 (exit $ac_status); } && {
16741 test -z "$ac_c_werror_flag" ||
16742 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743 } && test -s conftest$ac_exeext &&
16744 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016745 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016748sed 's/^/| /' conftest.$ac_ext >&5
16749
Martin v. Löwiseba40652007-08-30 20:10:57 +000016750 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016752
16753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016755LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016757{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16758echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16759if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016761#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016763
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016764 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016765 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016766 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016767else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016768
Martin v. Löwis130fb172001-07-19 11:00:41 +000016769 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016770fi
16771
Guido van Rossum627b2d71993-12-24 10:39:16 +000016772
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016773fi
16774
Guido van Rossum0be3e491997-05-22 20:33:33 +000016775fi
16776
Guido van Rossum49545951997-12-02 19:28:29 +000016777fi
16778
Guido van Rossumb93a8621998-05-07 13:27:32 +000016779fi
16780
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016781
Michael W. Hudson54241132001-12-07 15:38:26 +000016782fi
16783
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016784
16785fi
16786
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016788
16789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016791fi
16792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793fi
16794
16795
16796fi
16797
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016798
Michael W. Hudson54241132001-12-07 15:38:26 +000016799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16801echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016802if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804else
Martin v. Löwis11437992002-04-12 09:54:03 +000016805 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016806LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016807cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016808/* confdefs.h. */
16809_ACEOF
16810cat confdefs.h >>conftest.$ac_ext
16811cat >>conftest.$ac_ext <<_ACEOF
16812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814/* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016817#ifdef __cplusplus
16818extern "C"
16819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016820char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016821int
16822main ()
16823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 ;
16826 return 0;
16827}
16828_ACEOF
16829rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830if { (ac_try="$ac_link"
16831case "(($ac_try" in
16832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16833 *) ac_try_echo=$ac_try;;
16834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016838 grep -v '^ *+' conftest.er1 >conftest.err
16839 rm -f conftest.er1
16840 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016842 (exit $ac_status); } && {
16843 test -z "$ac_c_werror_flag" ||
16844 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016845 } && test -s conftest$ac_exeext &&
16846 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016847 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016850sed 's/^/| /' conftest.$ac_ext >&5
16851
Martin v. Löwiseba40652007-08-30 20:10:57 +000016852 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016854
16855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016857LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016859{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16860echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16861if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016863#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016864_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016865
Martin v. Löwis130fb172001-07-19 11:00:41 +000016866 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016867 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016868 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016869fi
16870
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016871
Neal Norwitza978ab02002-11-02 16:58:05 +000016872 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016873 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16874echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016875if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016876 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016877else
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016879LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016886
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887/* Override any GCC internal prototype to avoid an error.
16888 Use char because int might match the return type of a GCC
16889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016890#ifdef __cplusplus
16891extern "C"
16892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016893char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016894int
16895main ()
16896{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903if { (ac_try="$ac_link"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016911 grep -v '^ *+' conftest.er1 >conftest.err
16912 rm -f conftest.er1
16913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915 (exit $ac_status); } && {
16916 test -z "$ac_c_werror_flag" ||
16917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016918 } && test -s conftest$ac_exeext &&
16919 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016923sed 's/^/| /' conftest.$ac_ext >&5
16924
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016927
16928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016931fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016932{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16933echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16934if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016936#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016938
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016939 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016940 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016941 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016942fi
16943
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016944 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016945
Martin v. Löwis130fb172001-07-19 11:00:41 +000016946 if test "$USE_THREAD_MODULE" != "#"
16947 then
16948 # If the above checks didn't disable threads, (at least) OSF1
16949 # needs this '-threads' argument during linking.
16950 case $ac_sys_system in
16951 OSF1) LDLAST=-threads;;
16952 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016953 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016954fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016955
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016956if test "$posix_threads" = "yes"; then
16957 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016958
16959cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016960#define _POSIX_THREADS 1
16961_ACEOF
16962
16963 fi
16964
16965 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16966 case $ac_sys_system/$ac_sys_release in
16967 SunOS/5.6)
16968cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016969#define HAVE_PTHREAD_DESTRUCTOR 1
16970_ACEOF
16971
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016972 ;;
16973 SunOS/5.8)
16974cat >>confdefs.h <<\_ACEOF
16975#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16976_ACEOF
16977
16978 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016979 AIX/5)
16980cat >>confdefs.h <<\_ACEOF
16981#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16982_ACEOF
16983
16984 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016985 esac
16986
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016987 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16988echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016989 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016991else
16992 if test "$cross_compiling" = yes; then
16993 ac_cv_pthread_system_supported=no
16994else
16995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016996/* confdefs.h. */
16997_ACEOF
16998cat confdefs.h >>conftest.$ac_ext
16999cat >>conftest.$ac_ext <<_ACEOF
17000/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001#include <pthread.h>
17002 void *foo(void *parm) {
17003 return NULL;
17004 }
17005 main() {
17006 pthread_attr_t attr;
17007 pthread_t id;
17008 if (pthread_attr_init(&attr)) exit(-1);
17009 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17010 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17011 exit(0);
17012 }
17013_ACEOF
17014rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015if { (ac_try="$ac_link"
17016case "(($ac_try" in
17017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17018 *) ac_try_echo=$ac_try;;
17019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 { (case "(($ac_try" in
17026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17027 *) ac_try_echo=$ac_try;;
17028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017033 (exit $ac_status); }; }; then
17034 ac_cv_pthread_system_supported=yes
17035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017036 echo "$as_me: program exited with status $ac_status" >&5
17037echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017038sed 's/^/| /' conftest.$ac_ext >&5
17039
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017040( exit $ac_status )
17041ac_cv_pthread_system_supported=no
17042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017043rm -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 +000017044fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017045
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046
17047
Guido van Rossum627b2d71993-12-24 10:39:16 +000017048fi
17049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017050 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17051echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017052 if test "$ac_cv_pthread_system_supported" = "yes"; then
17053
17054cat >>confdefs.h <<\_ACEOF
17055#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17056_ACEOF
17057
17058 fi
17059
17060for ac_func in pthread_sigmask
17061do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017062as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17063{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17064echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017066 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017067else
17068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017069/* confdefs.h. */
17070_ACEOF
17071cat confdefs.h >>conftest.$ac_ext
17072cat >>conftest.$ac_ext <<_ACEOF
17073/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017074/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17075 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17076#define $ac_func innocuous_$ac_func
17077
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017078/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017079 which can conflict with char $ac_func (); below.
17080 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017081 <limits.h> exists even on freestanding compilers. */
17082
17083#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017084# include <limits.h>
17085#else
17086# include <assert.h>
17087#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017088
17089#undef $ac_func
17090
Martin v. Löwiseba40652007-08-30 20:10:57 +000017091/* Override any GCC internal prototype to avoid an error.
17092 Use char because int might match the return type of a GCC
17093 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017094#ifdef __cplusplus
17095extern "C"
17096#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017097char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017098/* The GNU C library defines this for functions which it implements
17099 to always fail with ENOSYS. Some functions are actually named
17100 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017101#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017102choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103#endif
17104
Skip Montanaro6dead952003-09-25 14:50:04 +000017105int
17106main ()
17107{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017109 ;
17110 return 0;
17111}
17112_ACEOF
17113rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114if { (ac_try="$ac_link"
17115case "(($ac_try" in
17116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17117 *) ac_try_echo=$ac_try;;
17118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122 grep -v '^ *+' conftest.er1 >conftest.err
17123 rm -f conftest.er1
17124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 (exit $ac_status); } && {
17127 test -z "$ac_c_werror_flag" ||
17128 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017129 } && test -s conftest$ac_exeext &&
17130 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131 eval "$as_ac_var=yes"
17132else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017134sed 's/^/| /' conftest.$ac_ext >&5
17135
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017138
17139rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017141fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142ac_res=`eval echo '${'$as_ac_var'}'`
17143 { echo "$as_me:$LINENO: result: $ac_res" >&5
17144echo "${ECHO_T}$ac_res" >&6; }
17145if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017147#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017148_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017149 case $ac_sys_system in
17150 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017151
Jason Tishlerfac083d2003-07-22 15:20:49 +000017152cat >>confdefs.h <<\_ACEOF
17153#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17154_ACEOF
17155
17156 ;;
17157 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017158fi
17159done
17160
17161fi
17162
17163
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017164# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017165
17166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017167{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17168echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017169# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017170if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017173 { echo "$as_me:$LINENO: result: no" >&5
17174echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017175 ipv6=no
17176 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017177 *) { echo "$as_me:$LINENO: result: yes" >&5
17178echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017180#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017181_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182
17183 ipv6=yes
17184 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017186else
Martin v. Löwis11437992002-04-12 09:54:03 +000017187
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017188 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017189 { echo "$as_me:$LINENO: result: no" >&5
17190echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191 ipv6=no
17192
17193else
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 /* AF_INET6 available check */
17201#include <sys/types.h>
17202#include <sys/socket.h>
17203main()
17204{
17205 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17206 exit(1);
17207 else
17208 exit(0);
17209}
17210
Martin v. Löwis11437992002-04-12 09:54:03 +000017211_ACEOF
17212rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213if { (ac_try="$ac_link"
17214case "(($ac_try" in
17215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17216 *) ac_try_echo=$ac_try;;
17217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017220 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223 { (case "(($ac_try" in
17224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17225 *) ac_try_echo=$ac_try;;
17226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017232 { echo "$as_me:$LINENO: result: yes" >&5
17233echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017234 ipv6=yes
17235else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236 echo "$as_me: program exited with status $ac_status" >&5
17237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017238sed 's/^/| /' conftest.$ac_ext >&5
17239
Martin v. Löwis11437992002-04-12 09:54:03 +000017240( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017241{ echo "$as_me:$LINENO: result: no" >&5
17242echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017243 ipv6=no
17244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017245rm -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 +000017246fi
17247
Martin v. Löwiseba40652007-08-30 20:10:57 +000017248
17249
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017250if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017251 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17252echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017254/* confdefs.h. */
17255_ACEOF
17256cat confdefs.h >>conftest.$ac_ext
17257cat >>conftest.$ac_ext <<_ACEOF
17258/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017259#include <sys/types.h>
17260#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017261int
17262main ()
17263{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017264struct sockaddr_in6 x;
17265x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017266 ;
17267 return 0;
17268}
17269_ACEOF
17270rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271if { (ac_try="$ac_compile"
17272case "(($ac_try" in
17273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17274 *) ac_try_echo=$ac_try;;
17275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017279 grep -v '^ *+' conftest.er1 >conftest.err
17280 rm -f conftest.er1
17281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017283 (exit $ac_status); } && {
17284 test -z "$ac_c_werror_flag" ||
17285 test ! -s conftest.err
17286 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017287 { echo "$as_me:$LINENO: result: yes" >&5
17288echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017289 ipv6=yes
17290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017292sed 's/^/| /' conftest.$ac_ext >&5
17293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294 { echo "$as_me:$LINENO: result: no" >&5
17295echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017296 ipv6=no
17297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017298
17299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017300fi
17301
17302if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017303 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017304#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017305_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017306
17307fi
17308
Martin v. Löwiseba40652007-08-30 20:10:57 +000017309fi
17310
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017311
17312ipv6type=unknown
17313ipv6lib=none
17314ipv6trylibc=no
17315
17316if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017317 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17318echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017319 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17320 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017321 case $i in
17322 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017324/* confdefs.h. */
17325_ACEOF
17326cat confdefs.h >>conftest.$ac_ext
17327cat >>conftest.$ac_ext <<_ACEOF
17328/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017329
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017330#include <netinet/in.h>
17331#ifdef IPV6_INRIA_VERSION
17332yes
17333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017334_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017336 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017337 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017339rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017340
17341 ;;
17342 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017344/* confdefs.h. */
17345_ACEOF
17346cat confdefs.h >>conftest.$ac_ext
17347cat >>conftest.$ac_ext <<_ACEOF
17348/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017349
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017350#include <netinet/in.h>
17351#ifdef __KAME__
17352yes
17353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017354_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017356 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357 ipv6type=$i;
17358 ipv6lib=inet6
17359 ipv6libdir=/usr/local/v6/lib
17360 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017361fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017362rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017363
17364 ;;
17365 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017367/* confdefs.h. */
17368_ACEOF
17369cat confdefs.h >>conftest.$ac_ext
17370cat >>conftest.$ac_ext <<_ACEOF
17371/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017372
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017373#include <features.h>
17374#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17375yes
17376#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017377_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017379 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017380 ipv6type=$i;
17381 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017382fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017383rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017384
17385 ;;
17386 linux-inet6)
17387 if test -d /usr/inet6; then
17388 ipv6type=$i
17389 ipv6lib=inet6
17390 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017391 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 fi
17393 ;;
17394 solaris)
17395 if test -f /etc/netconfig; then
17396 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17397 ipv6type=$i
17398 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399 fi
17400 fi
17401 ;;
17402 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017404/* confdefs.h. */
17405_ACEOF
17406cat confdefs.h >>conftest.$ac_ext
17407cat >>conftest.$ac_ext <<_ACEOF
17408/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017409
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017410#include <sys/param.h>
17411#ifdef _TOSHIBA_INET6
17412yes
17413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017414_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017416 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417 ipv6type=$i;
17418 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017419 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017420fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017421rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017422
17423 ;;
17424 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017432#include </usr/local/v6/include/sys/v6config.h>
17433#ifdef __V6D__
17434yes
17435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017438 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439 ipv6type=$i;
17440 ipv6lib=v6;
17441 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017442 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017443fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017444rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017445
17446 ;;
17447 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017449/* confdefs.h. */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017454
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017455#include <sys/param.h>
17456#ifdef _ZETA_MINAMI_INET6
17457yes
17458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017459_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462 ipv6type=$i;
17463 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017464 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017465fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000017466rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017467
17468 ;;
17469 esac
17470 if test "$ipv6type" != "unknown"; then
17471 break
17472 fi
17473 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017474 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17475echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017476fi
17477
17478if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17479 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17480 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17481 echo "using lib$ipv6lib"
17482 else
17483 if test $ipv6trylibc = "yes"; then
17484 echo "using libc"
17485 else
17486 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17487 echo "You need to fetch lib$ipv6lib.a from appropriate"
17488 echo 'ipv6 kit and compile beforehand.'
17489 exit 1
17490 fi
17491 fi
17492fi
17493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017494{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17495echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017496cat >conftest.$ac_ext <<_ACEOF
17497/* confdefs.h. */
17498_ACEOF
17499cat confdefs.h >>conftest.$ac_ext
17500cat >>conftest.$ac_ext <<_ACEOF
17501/* end confdefs.h. */
17502#include <Carbon/Carbon.h>
17503int
17504main ()
17505{
17506FSIORefNum fRef = 0
17507 ;
17508 return 0;
17509}
17510_ACEOF
17511rm -f conftest.$ac_objext
17512if { (ac_try="$ac_compile"
17513case "(($ac_try" in
17514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17515 *) ac_try_echo=$ac_try;;
17516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017518 (eval "$ac_compile") 2>conftest.er1
17519 ac_status=$?
17520 grep -v '^ *+' conftest.er1 >conftest.err
17521 rm -f conftest.er1
17522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017524 (exit $ac_status); } && {
17525 test -z "$ac_c_werror_flag" ||
17526 test ! -s conftest.err
17527 } && test -s conftest.$ac_objext; then
17528
17529cat >>confdefs.h <<\_ACEOF
17530#define HAVE_OSX105_SDK 1
17531_ACEOF
17532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 { echo "$as_me:$LINENO: result: yes" >&5
17534echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017536 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017537sed 's/^/| /' conftest.$ac_ext >&5
17538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017539 { echo "$as_me:$LINENO: result: no" >&5
17540echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017541
17542fi
17543
17544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17545
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017546# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017547{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17548echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017549
Martin v. Löwiseba40652007-08-30 20:10:57 +000017550# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017551if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017552 withval=$with_doc_strings;
17553fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017554
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017555
17556if test -z "$with_doc_strings"
17557then with_doc_strings="yes"
17558fi
17559if test "$with_doc_strings" != "no"
17560then
17561
17562cat >>confdefs.h <<\_ACEOF
17563#define WITH_DOC_STRINGS 1
17564_ACEOF
17565
17566fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017567{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17568echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017569
Neil Schemenauera35c6882001-02-27 04:45:05 +000017570# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017571{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17572echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017573
Martin v. Löwiseba40652007-08-30 20:10:57 +000017574# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017575if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017577if test "$withval" != no
17578then
17579
17580cat >>confdefs.h <<\_ACEOF
17581#define WITH_TSC 1
17582_ACEOF
17583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017584 { echo "$as_me:$LINENO: result: yes" >&5
17585echo "${ECHO_T}yes" >&6; }
17586else { echo "$as_me:$LINENO: result: no" >&5
17587echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017588fi
17589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017590 { echo "$as_me:$LINENO: result: no" >&5
17591echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017592fi
17593
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017594
17595# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017596{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17597echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
Martin v. Löwiseba40652007-08-30 20:10:57 +000017599# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017600if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 withval=$with_pymalloc;
17602fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017603
Neil Schemenauera35c6882001-02-27 04:45:05 +000017604
Neil Schemenauer16c22972002-03-22 15:34:49 +000017605if test -z "$with_pymalloc"
17606then with_pymalloc="yes"
17607fi
17608if test "$with_pymalloc" != "no"
17609then
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
17611cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017612#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017613_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017614
17615fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017616{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17617echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017618
Barry Warsawef82cd72000-06-30 16:21:01 +000017619# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017620{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17621echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017622
Martin v. Löwiseba40652007-08-30 20:10:57 +000017623# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017624if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017626if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017627then
17628
17629cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017630#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
17632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017633 { echo "$as_me:$LINENO: result: yes" >&5
17634echo "${ECHO_T}yes" >&6; }
17635else { echo "$as_me:$LINENO: result: no" >&5
17636echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017637fi
17638else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017639 { echo "$as_me:$LINENO: result: no" >&5
17640echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017641fi
17642
Barry Warsawef82cd72000-06-30 16:21:01 +000017643
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017644# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017645
Guido van Rossum98935bf2001-09-05 19:13:16 +000017646DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017647
Guido van Rossume97ee181999-12-20 21:27:22 +000017648# the dlopen() function means we might want to use dynload_shlib.o. some
17649# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017650
Thomas Wouters3a584202000-08-05 23:28:51 +000017651for ac_func in dlopen
17652do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017653as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17654{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17655echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017656if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017658else
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017660/* confdefs.h. */
17661_ACEOF
17662cat confdefs.h >>conftest.$ac_ext
17663cat >>conftest.$ac_ext <<_ACEOF
17664/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017665/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17666 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17667#define $ac_func innocuous_$ac_func
17668
Guido van Rossume97ee181999-12-20 21:27:22 +000017669/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017670 which can conflict with char $ac_func (); below.
17671 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017672 <limits.h> exists even on freestanding compilers. */
17673
17674#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017675# include <limits.h>
17676#else
17677# include <assert.h>
17678#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017679
17680#undef $ac_func
17681
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682/* Override any GCC internal prototype to avoid an error.
17683 Use char because int might match the return type of a GCC
17684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017685#ifdef __cplusplus
17686extern "C"
17687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017688char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017689/* The GNU C library defines this for functions which it implements
17690 to always fail with ENOSYS. Some functions are actually named
17691 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017692#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017693choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017694#endif
17695
Skip Montanaro6dead952003-09-25 14:50:04 +000017696int
17697main ()
17698{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017700 ;
17701 return 0;
17702}
17703_ACEOF
17704rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705if { (ac_try="$ac_link"
17706case "(($ac_try" in
17707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17708 *) ac_try_echo=$ac_try;;
17709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017713 grep -v '^ *+' conftest.er1 >conftest.err
17714 rm -f conftest.er1
17715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717 (exit $ac_status); } && {
17718 test -z "$ac_c_werror_flag" ||
17719 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017720 } && test -s conftest$ac_exeext &&
17721 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Martin v. Löwiseba40652007-08-30 20:10:57 +000017727 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017729
17730rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733ac_res=`eval echo '${'$as_ac_var'}'`
17734 { echo "$as_me:$LINENO: result: $ac_res" >&5
17735echo "${ECHO_T}$ac_res" >&6; }
17736if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017739_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017740
Guido van Rossume97ee181999-12-20 21:27:22 +000017741fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017742done
Guido van Rossume97ee181999-12-20 21:27:22 +000017743
Michael W. Hudson54241132001-12-07 15:38:26 +000017744
Guido van Rossume97ee181999-12-20 21:27:22 +000017745# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17746# loading of modules.
17747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017748{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17749echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017750if test -z "$DYNLOADFILE"
17751then
17752 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017753 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17754 if test "$ac_cv_func_dlopen" = yes
17755 then DYNLOADFILE="dynload_shlib.o"
17756 else DYNLOADFILE="dynload_aix.o"
17757 fi
17758 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017759 BeOS*) DYNLOADFILE="dynload_beos.o";;
17760 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017761 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17762 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017763 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017764 *)
17765 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17766 # out any dynamic loading
17767 if test "$ac_cv_func_dlopen" = yes
17768 then DYNLOADFILE="dynload_shlib.o"
17769 else DYNLOADFILE="dynload_stub.o"
17770 fi
17771 ;;
17772 esac
17773fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017774{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17775echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017776if test "$DYNLOADFILE" != "dynload_stub.o"
17777then
Martin v. Löwis11437992002-04-12 09:54:03 +000017778
17779cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017780#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017781_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017782
17783fi
17784
Neil Schemenauer4e425612001-06-19 15:44:15 +000017785# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17786
Michael W. Hudson54241132001-12-07 15:38:26 +000017787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017788{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17789echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017790if test -z "$MACHDEP_OBJS"
17791then
Jack Jansene578a632001-08-15 01:27:14 +000017792 MACHDEP_OBJS=$extra_machdep_objs
17793else
17794 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017796{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17797echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017798
Guido van Rossum627b2d71993-12-24 10:39:16 +000017799# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
Martin v. Löwisd6320502004-08-12 13:45:08 +000017871
Martin v. Löwisc3001752005-01-23 09:27:24 +000017872
17873
Neal Norwitz05a45592006-03-20 06:30:08 +000017874
17875
Martin v. Löwis382abef2007-02-19 10:55:19 +000017876
17877
Christian Heimes36281872007-11-30 21:11:28 +000017878
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017879
17880
Jesse Noller355b1262009-04-02 00:03:28 +000017881
17882
17883
17884
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017885for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17886 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017887 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017888 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017889 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017890 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017891 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017892 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17893 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017894 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017895 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017896 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017897 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017898do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017899as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17900{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17901echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017902if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017903 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017904else
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017911/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17912 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17913#define $ac_func innocuous_$ac_func
17914
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017915/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017916 which can conflict with char $ac_func (); below.
17917 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017918 <limits.h> exists even on freestanding compilers. */
17919
17920#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017921# include <limits.h>
17922#else
17923# include <assert.h>
17924#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017925
17926#undef $ac_func
17927
Martin v. Löwiseba40652007-08-30 20:10:57 +000017928/* Override any GCC internal prototype to avoid an error.
17929 Use char because int might match the return type of a GCC
17930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017931#ifdef __cplusplus
17932extern "C"
17933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017934char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017935/* The GNU C library defines this for functions which it implements
17936 to always fail with ENOSYS. Some functions are actually named
17937 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017938#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017939choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017940#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017941
Skip Montanaro6dead952003-09-25 14:50:04 +000017942int
17943main ()
17944{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017945return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 ;
17947 return 0;
17948}
17949_ACEOF
17950rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017951if { (ac_try="$ac_link"
17952case "(($ac_try" in
17953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17954 *) ac_try_echo=$ac_try;;
17955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017957 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017959 grep -v '^ *+' conftest.er1 >conftest.err
17960 rm -f conftest.er1
17961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017963 (exit $ac_status); } && {
17964 test -z "$ac_c_werror_flag" ||
17965 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017966 } && test -s conftest$ac_exeext &&
17967 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017971sed 's/^/| /' conftest.$ac_ext >&5
17972
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017975
17976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017977 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017978fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017979ac_res=`eval echo '${'$as_ac_var'}'`
17980 { echo "$as_me:$LINENO: result: $ac_res" >&5
17981echo "${ECHO_T}$ac_res" >&6; }
17982if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017984#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017985_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017986
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017987fi
17988done
17989
Michael W. Hudson54241132001-12-07 15:38:26 +000017990
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017991# For some functions, having a definition is not sufficient, since
17992# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017993{ echo "$as_me:$LINENO: checking for chroot" >&5
17994echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017996/* confdefs.h. */
17997_ACEOF
17998cat confdefs.h >>conftest.$ac_ext
17999cat >>conftest.$ac_ext <<_ACEOF
18000/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018001#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018002int
18003main ()
18004{
18005void *x=chroot
18006 ;
18007 return 0;
18008}
18009_ACEOF
18010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011if { (ac_try="$ac_compile"
18012case "(($ac_try" in
18013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18014 *) ac_try_echo=$ac_try;;
18015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018019 grep -v '^ *+' conftest.er1 >conftest.err
18020 rm -f conftest.er1
18021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018023 (exit $ac_status); } && {
18024 test -z "$ac_c_werror_flag" ||
18025 test ! -s conftest.err
18026 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018027
18028cat >>confdefs.h <<\_ACEOF
18029#define HAVE_CHROOT 1
18030_ACEOF
18031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018032 { echo "$as_me:$LINENO: result: yes" >&5
18033echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018034else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018036sed 's/^/| /' conftest.$ac_ext >&5
18037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018038 { echo "$as_me:$LINENO: result: no" >&5
18039echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018040
18041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018042
18043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018044{ echo "$as_me:$LINENO: checking for link" >&5
18045echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018047/* confdefs.h. */
18048_ACEOF
18049cat confdefs.h >>conftest.$ac_ext
18050cat >>conftest.$ac_ext <<_ACEOF
18051/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018052#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018053int
18054main ()
18055{
18056void *x=link
18057 ;
18058 return 0;
18059}
18060_ACEOF
18061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018062if { (ac_try="$ac_compile"
18063case "(($ac_try" in
18064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18065 *) ac_try_echo=$ac_try;;
18066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018070 grep -v '^ *+' conftest.er1 >conftest.err
18071 rm -f conftest.er1
18072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018074 (exit $ac_status); } && {
18075 test -z "$ac_c_werror_flag" ||
18076 test ! -s conftest.err
18077 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018078
18079cat >>confdefs.h <<\_ACEOF
18080#define HAVE_LINK 1
18081_ACEOF
18082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018083 { echo "$as_me:$LINENO: result: yes" >&5
18084echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018087sed 's/^/| /' conftest.$ac_ext >&5
18088
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018089 { echo "$as_me:$LINENO: result: no" >&5
18090echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018091
18092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093
18094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018095{ echo "$as_me:$LINENO: checking for symlink" >&5
18096echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018098/* confdefs.h. */
18099_ACEOF
18100cat confdefs.h >>conftest.$ac_ext
18101cat >>conftest.$ac_ext <<_ACEOF
18102/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018103#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018104int
18105main ()
18106{
18107void *x=symlink
18108 ;
18109 return 0;
18110}
18111_ACEOF
18112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018113if { (ac_try="$ac_compile"
18114case "(($ac_try" in
18115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18116 *) ac_try_echo=$ac_try;;
18117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018121 grep -v '^ *+' conftest.er1 >conftest.err
18122 rm -f conftest.er1
18123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018125 (exit $ac_status); } && {
18126 test -z "$ac_c_werror_flag" ||
18127 test ! -s conftest.err
18128 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018129
18130cat >>confdefs.h <<\_ACEOF
18131#define HAVE_SYMLINK 1
18132_ACEOF
18133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018134 { echo "$as_me:$LINENO: result: yes" >&5
18135echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018136else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018137 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018138sed 's/^/| /' conftest.$ac_ext >&5
18139
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018140 { echo "$as_me:$LINENO: result: no" >&5
18141echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018142
18143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018144
18145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018146{ echo "$as_me:$LINENO: checking for fchdir" >&5
18147echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018149/* confdefs.h. */
18150_ACEOF
18151cat confdefs.h >>conftest.$ac_ext
18152cat >>conftest.$ac_ext <<_ACEOF
18153/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018154#include <unistd.h>
18155int
18156main ()
18157{
18158void *x=fchdir
18159 ;
18160 return 0;
18161}
18162_ACEOF
18163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018164if { (ac_try="$ac_compile"
18165case "(($ac_try" in
18166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18167 *) ac_try_echo=$ac_try;;
18168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172 grep -v '^ *+' conftest.er1 >conftest.err
18173 rm -f conftest.er1
18174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018176 (exit $ac_status); } && {
18177 test -z "$ac_c_werror_flag" ||
18178 test ! -s conftest.err
18179 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018180
18181cat >>confdefs.h <<\_ACEOF
18182#define HAVE_FCHDIR 1
18183_ACEOF
18184
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018185 { echo "$as_me:$LINENO: result: yes" >&5
18186echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018189sed 's/^/| /' conftest.$ac_ext >&5
18190
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018191 { echo "$as_me:$LINENO: result: no" >&5
18192echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018193
18194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018195
18196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018197{ echo "$as_me:$LINENO: checking for fsync" >&5
18198echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018200/* confdefs.h. */
18201_ACEOF
18202cat confdefs.h >>conftest.$ac_ext
18203cat >>conftest.$ac_ext <<_ACEOF
18204/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018205#include <unistd.h>
18206int
18207main ()
18208{
18209void *x=fsync
18210 ;
18211 return 0;
18212}
18213_ACEOF
18214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215if { (ac_try="$ac_compile"
18216case "(($ac_try" in
18217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18218 *) ac_try_echo=$ac_try;;
18219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018223 grep -v '^ *+' conftest.er1 >conftest.err
18224 rm -f conftest.er1
18225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018227 (exit $ac_status); } && {
18228 test -z "$ac_c_werror_flag" ||
18229 test ! -s conftest.err
18230 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018231
18232cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018233#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018234_ACEOF
18235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018236 { echo "$as_me:$LINENO: result: yes" >&5
18237echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018240sed 's/^/| /' conftest.$ac_ext >&5
18241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018242 { echo "$as_me:$LINENO: result: no" >&5
18243echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018244
18245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018246
18247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018248{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18249echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018251/* confdefs.h. */
18252_ACEOF
18253cat confdefs.h >>conftest.$ac_ext
18254cat >>conftest.$ac_ext <<_ACEOF
18255/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018256#include <unistd.h>
18257int
18258main ()
18259{
18260void *x=fdatasync
18261 ;
18262 return 0;
18263}
18264_ACEOF
18265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266if { (ac_try="$ac_compile"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018274 grep -v '^ *+' conftest.er1 >conftest.err
18275 rm -f conftest.er1
18276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 (exit $ac_status); } && {
18279 test -z "$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018282
18283cat >>confdefs.h <<\_ACEOF
18284#define HAVE_FDATASYNC 1
18285_ACEOF
18286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018287 { echo "$as_me:$LINENO: result: yes" >&5
18288echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018289else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018291sed 's/^/| /' conftest.$ac_ext >&5
18292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018293 { echo "$as_me:$LINENO: result: no" >&5
18294echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018295
18296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018297
18298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018299{ echo "$as_me:$LINENO: checking for epoll" >&5
18300echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018301cat >conftest.$ac_ext <<_ACEOF
18302/* confdefs.h. */
18303_ACEOF
18304cat confdefs.h >>conftest.$ac_ext
18305cat >>conftest.$ac_ext <<_ACEOF
18306/* end confdefs.h. */
18307#include <sys/epoll.h>
18308int
18309main ()
18310{
18311void *x=epoll_create
18312 ;
18313 return 0;
18314}
18315_ACEOF
18316rm -f conftest.$ac_objext
18317if { (ac_try="$ac_compile"
18318case "(($ac_try" in
18319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18320 *) ac_try_echo=$ac_try;;
18321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018323 (eval "$ac_compile") 2>conftest.er1
18324 ac_status=$?
18325 grep -v '^ *+' conftest.er1 >conftest.err
18326 rm -f conftest.er1
18327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018329 (exit $ac_status); } && {
18330 test -z "$ac_c_werror_flag" ||
18331 test ! -s conftest.err
18332 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018333
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018334cat >>confdefs.h <<\_ACEOF
18335#define HAVE_EPOLL 1
18336_ACEOF
18337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018338 { echo "$as_me:$LINENO: result: yes" >&5
18339echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018340else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018341 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018342sed 's/^/| /' conftest.$ac_ext >&5
18343
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018344 { echo "$as_me:$LINENO: result: no" >&5
18345echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018346
18347fi
18348
18349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018350{ echo "$as_me:$LINENO: checking for kqueue" >&5
18351echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018352cat >conftest.$ac_ext <<_ACEOF
18353/* confdefs.h. */
18354_ACEOF
18355cat confdefs.h >>conftest.$ac_ext
18356cat >>conftest.$ac_ext <<_ACEOF
18357/* end confdefs.h. */
18358
18359#include <sys/types.h>
18360#include <sys/event.h>
18361
18362int
18363main ()
18364{
18365int x=kqueue()
18366 ;
18367 return 0;
18368}
18369_ACEOF
18370rm -f conftest.$ac_objext
18371if { (ac_try="$ac_compile"
18372case "(($ac_try" in
18373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18374 *) ac_try_echo=$ac_try;;
18375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018377 (eval "$ac_compile") 2>conftest.er1
18378 ac_status=$?
18379 grep -v '^ *+' conftest.er1 >conftest.err
18380 rm -f conftest.er1
18381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018383 (exit $ac_status); } && {
18384 test -z "$ac_c_werror_flag" ||
18385 test ! -s conftest.err
18386 } && test -s conftest.$ac_objext; then
18387
18388cat >>confdefs.h <<\_ACEOF
18389#define HAVE_KQUEUE 1
18390_ACEOF
18391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018392 { echo "$as_me:$LINENO: result: yes" >&5
18393echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018395 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018396sed 's/^/| /' conftest.$ac_ext >&5
18397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018398 { echo "$as_me:$LINENO: result: no" >&5
18399echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018400
18401fi
18402
18403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018404# On some systems (eg. FreeBSD 5), we would find a definition of the
18405# functions ctermid_r, setgroups in the library, but no prototype
18406# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18407# address to avoid compiler warnings and potential miscompilations
18408# because of the missing prototypes.
18409
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018410{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18411echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018413/* confdefs.h. */
18414_ACEOF
18415cat confdefs.h >>conftest.$ac_ext
18416cat >>conftest.$ac_ext <<_ACEOF
18417/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018418
18419#include "confdefs.h"
18420#include <stdio.h>
18421
Martin v. Löwisd5843682002-11-21 20:41:28 +000018422int
18423main ()
18424{
18425void* p = ctermid_r
18426 ;
18427 return 0;
18428}
18429_ACEOF
18430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018431if { (ac_try="$ac_compile"
18432case "(($ac_try" in
18433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18434 *) ac_try_echo=$ac_try;;
18435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018439 grep -v '^ *+' conftest.er1 >conftest.err
18440 rm -f conftest.er1
18441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018443 (exit $ac_status); } && {
18444 test -z "$ac_c_werror_flag" ||
18445 test ! -s conftest.err
18446 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018447
18448cat >>confdefs.h <<\_ACEOF
18449#define HAVE_CTERMID_R 1
18450_ACEOF
18451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018452 { echo "$as_me:$LINENO: result: yes" >&5
18453echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018456sed 's/^/| /' conftest.$ac_ext >&5
18457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018458 { echo "$as_me:$LINENO: result: no" >&5
18459echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018460
18461fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018462
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018465{ echo "$as_me:$LINENO: checking for flock" >&5
18466echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018467cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018468/* confdefs.h. */
18469_ACEOF
18470cat confdefs.h >>conftest.$ac_ext
18471cat >>conftest.$ac_ext <<_ACEOF
18472/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018473
18474#include "confdefs.h"
18475#include <sys/file.h>
18476
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018477int
18478main ()
18479{
18480void* p = flock
18481 ;
18482 return 0;
18483}
18484_ACEOF
18485rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018486if { (ac_try="$ac_compile"
18487case "(($ac_try" in
18488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18489 *) ac_try_echo=$ac_try;;
18490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018498 (exit $ac_status); } && {
18499 test -z "$ac_c_werror_flag" ||
18500 test ! -s conftest.err
18501 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018502
18503cat >>confdefs.h <<\_ACEOF
18504#define HAVE_FLOCK 1
18505_ACEOF
18506
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018507 { echo "$as_me:$LINENO: result: yes" >&5
18508echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018511sed 's/^/| /' conftest.$ac_ext >&5
18512
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018513 { echo "$as_me:$LINENO: result: no" >&5
18514echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018515
18516fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018517
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18519
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018520{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18521echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018523/* confdefs.h. */
18524_ACEOF
18525cat confdefs.h >>conftest.$ac_ext
18526cat >>conftest.$ac_ext <<_ACEOF
18527/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018528
18529#include "confdefs.h"
18530#include <unistd.h>
18531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018532int
18533main ()
18534{
18535void* p = getpagesize
18536 ;
18537 return 0;
18538}
18539_ACEOF
18540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018541if { (ac_try="$ac_compile"
18542case "(($ac_try" in
18543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18544 *) ac_try_echo=$ac_try;;
18545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018549 grep -v '^ *+' conftest.er1 >conftest.err
18550 rm -f conftest.er1
18551 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018553 (exit $ac_status); } && {
18554 test -z "$ac_c_werror_flag" ||
18555 test ! -s conftest.err
18556 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018557
18558cat >>confdefs.h <<\_ACEOF
18559#define HAVE_GETPAGESIZE 1
18560_ACEOF
18561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018562 { echo "$as_me:$LINENO: result: yes" >&5
18563echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018566sed 's/^/| /' conftest.$ac_ext >&5
18567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568 { echo "$as_me:$LINENO: result: no" >&5
18569echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018570
18571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572
18573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018575for ac_prog in true
18576do
18577 # Extract the first word of "$ac_prog", so it can be a program name with args.
18578set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018579{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18580echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018581if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018583else
18584 if test -n "$TRUE"; then
18585 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18586else
18587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18588for as_dir in $PATH
18589do
18590 IFS=$as_save_IFS
18591 test -z "$as_dir" && as_dir=.
18592 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593 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 +000018594 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018595 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018596 break 2
18597 fi
18598done
18599done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018601
18602fi
18603fi
18604TRUE=$ac_cv_prog_TRUE
18605if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018606 { echo "$as_me:$LINENO: result: $TRUE" >&5
18607echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018608else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018609 { echo "$as_me:$LINENO: result: no" >&5
18610echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018611fi
18612
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018614 test -n "$TRUE" && break
18615done
18616test -n "$TRUE" || TRUE="/bin/true"
18617
18618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18620echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018621if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018623else
18624 ac_check_lib_save_LIBS=$LIBS
18625LIBS="-lc $LIBS"
18626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018627/* confdefs.h. */
18628_ACEOF
18629cat confdefs.h >>conftest.$ac_ext
18630cat >>conftest.$ac_ext <<_ACEOF
18631/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018632
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633/* Override any GCC internal prototype to avoid an error.
18634 Use char because int might match the return type of a GCC
18635 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018636#ifdef __cplusplus
18637extern "C"
18638#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018639char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018640int
18641main ()
18642{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018644 ;
18645 return 0;
18646}
18647_ACEOF
18648rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649if { (ac_try="$ac_link"
18650case "(($ac_try" in
18651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18652 *) ac_try_echo=$ac_try;;
18653esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018657 grep -v '^ *+' conftest.er1 >conftest.err
18658 rm -f conftest.er1
18659 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018661 (exit $ac_status); } && {
18662 test -z "$ac_c_werror_flag" ||
18663 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018664 } && test -s conftest$ac_exeext &&
18665 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018666 ac_cv_lib_c_inet_aton=yes
18667else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018669sed 's/^/| /' conftest.$ac_ext >&5
18670
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018673
18674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018676LIBS=$ac_check_lib_save_LIBS
18677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018678{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18679echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18680if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018681 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018682else
18683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018684{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18685echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018686if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018688else
18689 ac_check_lib_save_LIBS=$LIBS
18690LIBS="-lresolv $LIBS"
18691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018697
Martin v. Löwiseba40652007-08-30 20:10:57 +000018698/* Override any GCC internal prototype to avoid an error.
18699 Use char because int might match the return type of a GCC
18700 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018701#ifdef __cplusplus
18702extern "C"
18703#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018704char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018705int
18706main ()
18707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018708return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018709 ;
18710 return 0;
18711}
18712_ACEOF
18713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714if { (ac_try="$ac_link"
18715case "(($ac_try" in
18716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18717 *) ac_try_echo=$ac_try;;
18718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018722 grep -v '^ *+' conftest.er1 >conftest.err
18723 rm -f conftest.er1
18724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018726 (exit $ac_status); } && {
18727 test -z "$ac_c_werror_flag" ||
18728 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018729 } && test -s conftest$ac_exeext &&
18730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018731 ac_cv_lib_resolv_inet_aton=yes
18732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018734sed 's/^/| /' conftest.$ac_ext >&5
18735
Martin v. Löwiseba40652007-08-30 20:10:57 +000018736 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018738
18739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018741LIBS=$ac_check_lib_save_LIBS
18742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018743{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18744echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18745if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018746 cat >>confdefs.h <<_ACEOF
18747#define HAVE_LIBRESOLV 1
18748_ACEOF
18749
18750 LIBS="-lresolv $LIBS"
18751
18752fi
18753
18754
18755fi
18756
18757
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018758# On Tru64, chflags seems to be present, but calling it will
18759# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018760{ echo "$as_me:$LINENO: checking for chflags" >&5
18761echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018762if test "${ac_cv_have_chflags+set}" = set; then
18763 echo $ECHO_N "(cached) $ECHO_C" >&6
18764else
18765 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018766 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018767else
18768 cat >conftest.$ac_ext <<_ACEOF
18769/* confdefs.h. */
18770_ACEOF
18771cat confdefs.h >>conftest.$ac_ext
18772cat >>conftest.$ac_ext <<_ACEOF
18773/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018774[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018775#include <sys/stat.h>
18776#include <unistd.h>
18777int main(int argc, char*argv[])
18778{
18779 if(chflags(argv[0], 0) != 0)
18780 return 1;
18781 return 0;
18782}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018783]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018784_ACEOF
18785rm -f conftest$ac_exeext
18786if { (ac_try="$ac_link"
18787case "(($ac_try" in
18788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18789 *) ac_try_echo=$ac_try;;
18790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018792 (eval "$ac_link") 2>&5
18793 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018795 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18796 { (case "(($ac_try" in
18797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18798 *) ac_try_echo=$ac_try;;
18799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018801 (eval "$ac_try") 2>&5
18802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018804 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018805 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018806else
18807 echo "$as_me: program exited with status $ac_status" >&5
18808echo "$as_me: failed program was:" >&5
18809sed 's/^/| /' conftest.$ac_ext >&5
18810
18811( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018812ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018813fi
18814rm -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 +000018815fi
18816
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018817
18818
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018819fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018820{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18821echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018822if test "$ac_cv_have_chflags" = cross ; then
18823 { echo "$as_me:$LINENO: checking for chflags" >&5
18824echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18825if test "${ac_cv_func_chflags+set}" = set; then
18826 echo $ECHO_N "(cached) $ECHO_C" >&6
18827else
18828 cat >conftest.$ac_ext <<_ACEOF
18829/* confdefs.h. */
18830_ACEOF
18831cat confdefs.h >>conftest.$ac_ext
18832cat >>conftest.$ac_ext <<_ACEOF
18833/* end confdefs.h. */
18834/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18835 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18836#define chflags innocuous_chflags
18837
18838/* System header to define __stub macros and hopefully few prototypes,
18839 which can conflict with char chflags (); below.
18840 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18841 <limits.h> exists even on freestanding compilers. */
18842
18843#ifdef __STDC__
18844# include <limits.h>
18845#else
18846# include <assert.h>
18847#endif
18848
18849#undef chflags
18850
18851/* Override any GCC internal prototype to avoid an error.
18852 Use char because int might match the return type of a GCC
18853 builtin and then its argument prototype would still apply. */
18854#ifdef __cplusplus
18855extern "C"
18856#endif
18857char chflags ();
18858/* The GNU C library defines this for functions which it implements
18859 to always fail with ENOSYS. Some functions are actually named
18860 something starting with __ and the normal name is an alias. */
18861#if defined __stub_chflags || defined __stub___chflags
18862choke me
18863#endif
18864
18865int
18866main ()
18867{
18868return chflags ();
18869 ;
18870 return 0;
18871}
18872_ACEOF
18873rm -f conftest.$ac_objext conftest$ac_exeext
18874if { (ac_try="$ac_link"
18875case "(($ac_try" in
18876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18877 *) ac_try_echo=$ac_try;;
18878esac
18879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18880 (eval "$ac_link") 2>conftest.er1
18881 ac_status=$?
18882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
18885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18886 (exit $ac_status); } && {
18887 test -z "$ac_c_werror_flag" ||
18888 test ! -s conftest.err
18889 } && test -s conftest$ac_exeext &&
18890 $as_test_x conftest$ac_exeext; then
18891 ac_cv_func_chflags=yes
18892else
18893 echo "$as_me: failed program was:" >&5
18894sed 's/^/| /' conftest.$ac_ext >&5
18895
18896 ac_cv_func_chflags=no
18897fi
18898
18899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18900 conftest$ac_exeext conftest.$ac_ext
18901fi
18902{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18903echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18904if test $ac_cv_func_chflags = yes; then
18905 ac_cv_have_chflags="yes"
18906else
18907 ac_cv_have_chflags="no"
18908fi
18909
18910fi
18911if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018912
18913cat >>confdefs.h <<\_ACEOF
18914#define HAVE_CHFLAGS 1
18915_ACEOF
18916
18917fi
18918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018919{ echo "$as_me:$LINENO: checking for lchflags" >&5
18920echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018921if test "${ac_cv_have_lchflags+set}" = set; then
18922 echo $ECHO_N "(cached) $ECHO_C" >&6
18923else
18924 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000018925 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018926else
18927 cat >conftest.$ac_ext <<_ACEOF
18928/* confdefs.h. */
18929_ACEOF
18930cat confdefs.h >>conftest.$ac_ext
18931cat >>conftest.$ac_ext <<_ACEOF
18932/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000018933[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018934#include <sys/stat.h>
18935#include <unistd.h>
18936int main(int argc, char*argv[])
18937{
18938 if(lchflags(argv[0], 0) != 0)
18939 return 1;
18940 return 0;
18941}
Gregory P. Smith49437c22009-11-02 01:38:35 +000018942]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018943_ACEOF
18944rm -f conftest$ac_exeext
18945if { (ac_try="$ac_link"
18946case "(($ac_try" in
18947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18948 *) ac_try_echo=$ac_try;;
18949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018951 (eval "$ac_link") 2>&5
18952 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018954 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18955 { (case "(($ac_try" in
18956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18957 *) ac_try_echo=$ac_try;;
18958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018960 (eval "$ac_try") 2>&5
18961 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018963 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018964 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018965else
18966 echo "$as_me: program exited with status $ac_status" >&5
18967echo "$as_me: failed program was:" >&5
18968sed 's/^/| /' conftest.$ac_ext >&5
18969
18970( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018971ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18974fi
18975
18976
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018977
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018978fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018979{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18980echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000018981if test "$ac_cv_have_lchflags" = cross ; then
18982 { echo "$as_me:$LINENO: checking for lchflags" >&5
18983echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18984if test "${ac_cv_func_lchflags+set}" = set; then
18985 echo $ECHO_N "(cached) $ECHO_C" >&6
18986else
18987 cat >conftest.$ac_ext <<_ACEOF
18988/* confdefs.h. */
18989_ACEOF
18990cat confdefs.h >>conftest.$ac_ext
18991cat >>conftest.$ac_ext <<_ACEOF
18992/* end confdefs.h. */
18993/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18995#define lchflags innocuous_lchflags
18996
18997/* System header to define __stub macros and hopefully few prototypes,
18998 which can conflict with char lchflags (); below.
18999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19000 <limits.h> exists even on freestanding compilers. */
19001
19002#ifdef __STDC__
19003# include <limits.h>
19004#else
19005# include <assert.h>
19006#endif
19007
19008#undef lchflags
19009
19010/* Override any GCC internal prototype to avoid an error.
19011 Use char because int might match the return type of a GCC
19012 builtin and then its argument prototype would still apply. */
19013#ifdef __cplusplus
19014extern "C"
19015#endif
19016char lchflags ();
19017/* The GNU C library defines this for functions which it implements
19018 to always fail with ENOSYS. Some functions are actually named
19019 something starting with __ and the normal name is an alias. */
19020#if defined __stub_lchflags || defined __stub___lchflags
19021choke me
19022#endif
19023
19024int
19025main ()
19026{
19027return lchflags ();
19028 ;
19029 return 0;
19030}
19031_ACEOF
19032rm -f conftest.$ac_objext conftest$ac_exeext
19033if { (ac_try="$ac_link"
19034case "(($ac_try" in
19035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19036 *) ac_try_echo=$ac_try;;
19037esac
19038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19039 (eval "$ac_link") 2>conftest.er1
19040 ac_status=$?
19041 grep -v '^ *+' conftest.er1 >conftest.err
19042 rm -f conftest.er1
19043 cat conftest.err >&5
19044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19045 (exit $ac_status); } && {
19046 test -z "$ac_c_werror_flag" ||
19047 test ! -s conftest.err
19048 } && test -s conftest$ac_exeext &&
19049 $as_test_x conftest$ac_exeext; then
19050 ac_cv_func_lchflags=yes
19051else
19052 echo "$as_me: failed program was:" >&5
19053sed 's/^/| /' conftest.$ac_ext >&5
19054
19055 ac_cv_func_lchflags=no
19056fi
19057
19058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19059 conftest$ac_exeext conftest.$ac_ext
19060fi
19061{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19062echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19063if test $ac_cv_func_lchflags = yes; then
19064 ac_cv_have_lchflags="yes"
19065else
19066 ac_cv_have_lchflags="no"
19067fi
19068
19069fi
19070if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019071
19072cat >>confdefs.h <<\_ACEOF
19073#define HAVE_LCHFLAGS 1
19074_ACEOF
19075
19076fi
19077
Ronald Oussorenf8752642006-07-06 10:13:35 +000019078case $ac_sys_system/$ac_sys_release in
19079Darwin/*)
19080 _CUR_CFLAGS="${CFLAGS}"
19081 _CUR_LDFLAGS="${LDFLAGS}"
19082 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19083 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19084 ;;
19085esac
19086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019087{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19088echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019089if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019090 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019091else
19092 ac_check_lib_save_LIBS=$LIBS
19093LIBS="-lz $LIBS"
19094cat >conftest.$ac_ext <<_ACEOF
19095/* confdefs.h. */
19096_ACEOF
19097cat confdefs.h >>conftest.$ac_ext
19098cat >>conftest.$ac_ext <<_ACEOF
19099/* end confdefs.h. */
19100
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101/* Override any GCC internal prototype to avoid an error.
19102 Use char because int might match the return type of a GCC
19103 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019104#ifdef __cplusplus
19105extern "C"
19106#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019107char inflateCopy ();
19108int
19109main ()
19110{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019111return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019112 ;
19113 return 0;
19114}
19115_ACEOF
19116rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019117if { (ac_try="$ac_link"
19118case "(($ac_try" in
19119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19120 *) ac_try_echo=$ac_try;;
19121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019124 ac_status=$?
19125 grep -v '^ *+' conftest.er1 >conftest.err
19126 rm -f conftest.er1
19127 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129 (exit $ac_status); } && {
19130 test -z "$ac_c_werror_flag" ||
19131 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132 } && test -s conftest$ac_exeext &&
19133 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019134 ac_cv_lib_z_inflateCopy=yes
19135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019136 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019137sed 's/^/| /' conftest.$ac_ext >&5
19138
Martin v. Löwiseba40652007-08-30 20:10:57 +000019139 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141
19142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019143 conftest$ac_exeext conftest.$ac_ext
19144LIBS=$ac_check_lib_save_LIBS
19145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019146{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19147echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19148if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019149
19150cat >>confdefs.h <<\_ACEOF
19151#define HAVE_ZLIB_COPY 1
19152_ACEOF
19153
19154fi
19155
19156
Ronald Oussorenf8752642006-07-06 10:13:35 +000019157case $ac_sys_system/$ac_sys_release in
19158Darwin/*)
19159 CFLAGS="${_CUR_CFLAGS}"
19160 LDFLAGS="${_CUR_LDFLAGS}"
19161 ;;
19162esac
19163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019164{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19165echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019167/* confdefs.h. */
19168_ACEOF
19169cat confdefs.h >>conftest.$ac_ext
19170cat >>conftest.$ac_ext <<_ACEOF
19171/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019172
19173#include "confdefs.h"
19174#include <netdb.h>
19175
Martin v. Löwise9416172003-05-03 10:12:45 +000019176int
19177main ()
19178{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019179void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019180 ;
19181 return 0;
19182}
19183_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019185if { (ac_try="$ac_link"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019193 grep -v '^ *+' conftest.er1 >conftest.err
19194 rm -f conftest.er1
19195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019197 (exit $ac_status); } && {
19198 test -z "$ac_c_werror_flag" ||
19199 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019200 } && test -s conftest$ac_exeext &&
19201 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019202
19203cat >>confdefs.h <<\_ACEOF
19204#define HAVE_HSTRERROR 1
19205_ACEOF
19206
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019207 { echo "$as_me:$LINENO: result: yes" >&5
19208echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019211sed 's/^/| /' conftest.$ac_ext >&5
19212
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019213 { echo "$as_me:$LINENO: result: no" >&5
19214echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019215
19216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019217
19218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019220
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019221{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19222echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019224/* confdefs.h. */
19225_ACEOF
19226cat confdefs.h >>conftest.$ac_ext
19227cat >>conftest.$ac_ext <<_ACEOF
19228/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019229
19230#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019231#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019232#include <sys/socket.h>
19233#include <netinet/in.h>
19234#include <arpa/inet.h>
19235
Martin v. Löwise9416172003-05-03 10:12:45 +000019236int
19237main ()
19238{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019239void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019240 ;
19241 return 0;
19242}
19243_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019244rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019245if { (ac_try="$ac_link"
19246case "(($ac_try" in
19247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248 *) ac_try_echo=$ac_try;;
19249esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019251 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019253 grep -v '^ *+' conftest.er1 >conftest.err
19254 rm -f conftest.er1
19255 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257 (exit $ac_status); } && {
19258 test -z "$ac_c_werror_flag" ||
19259 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019260 } && test -s conftest$ac_exeext &&
19261 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019262
19263cat >>confdefs.h <<\_ACEOF
19264#define HAVE_INET_ATON 1
19265_ACEOF
19266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019267 { echo "$as_me:$LINENO: result: yes" >&5
19268echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019271sed 's/^/| /' conftest.$ac_ext >&5
19272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019273 { echo "$as_me:$LINENO: result: no" >&5
19274echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019275
19276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277
19278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019281{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19282echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019284/* confdefs.h. */
19285_ACEOF
19286cat confdefs.h >>conftest.$ac_ext
19287cat >>conftest.$ac_ext <<_ACEOF
19288/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019289
19290#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019291#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019292#include <sys/socket.h>
19293#include <netinet/in.h>
19294#include <arpa/inet.h>
19295
Martin v. Löwise9416172003-05-03 10:12:45 +000019296int
19297main ()
19298{
19299void* p = inet_pton
19300 ;
19301 return 0;
19302}
19303_ACEOF
19304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019305if { (ac_try="$ac_compile"
19306case "(($ac_try" in
19307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19308 *) ac_try_echo=$ac_try;;
19309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019311 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019313 grep -v '^ *+' conftest.er1 >conftest.err
19314 rm -f conftest.er1
19315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019317 (exit $ac_status); } && {
19318 test -z "$ac_c_werror_flag" ||
19319 test ! -s conftest.err
19320 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019321
19322cat >>confdefs.h <<\_ACEOF
19323#define HAVE_INET_PTON 1
19324_ACEOF
19325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019326 { echo "$as_me:$LINENO: result: yes" >&5
19327echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019328else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019329 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019330sed 's/^/| /' conftest.$ac_ext >&5
19331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019332 { echo "$as_me:$LINENO: result: no" >&5
19333echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019334
19335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019336
19337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019338
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019339# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019340{ echo "$as_me:$LINENO: checking for setgroups" >&5
19341echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019343/* confdefs.h. */
19344_ACEOF
19345cat confdefs.h >>conftest.$ac_ext
19346cat >>conftest.$ac_ext <<_ACEOF
19347/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019348
19349#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019350#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019351#ifdef HAVE_GRP_H
19352#include <grp.h>
19353#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019354
Martin v. Löwisd5843682002-11-21 20:41:28 +000019355int
19356main ()
19357{
19358void* p = setgroups
19359 ;
19360 return 0;
19361}
19362_ACEOF
19363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364if { (ac_try="$ac_compile"
19365case "(($ac_try" in
19366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19367 *) ac_try_echo=$ac_try;;
19368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019372 grep -v '^ *+' conftest.er1 >conftest.err
19373 rm -f conftest.er1
19374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019376 (exit $ac_status); } && {
19377 test -z "$ac_c_werror_flag" ||
19378 test ! -s conftest.err
19379 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019380
19381cat >>confdefs.h <<\_ACEOF
19382#define HAVE_SETGROUPS 1
19383_ACEOF
19384
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019385 { echo "$as_me:$LINENO: result: yes" >&5
19386echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019389sed 's/^/| /' conftest.$ac_ext >&5
19390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019391 { echo "$as_me:$LINENO: result: no" >&5
19392echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019393
19394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019395
19396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019397
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019398# check for openpty and forkpty
19399
Martin v. Löwis11437992002-04-12 09:54:03 +000019400
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019401for ac_func in openpty
19402do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019403as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19404{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19405echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019406if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019408else
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019410/* confdefs.h. */
19411_ACEOF
19412cat confdefs.h >>conftest.$ac_ext
19413cat >>conftest.$ac_ext <<_ACEOF
19414/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019415/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19416 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19417#define $ac_func innocuous_$ac_func
19418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019419/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019420 which can conflict with char $ac_func (); below.
19421 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019422 <limits.h> exists even on freestanding compilers. */
19423
19424#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019425# include <limits.h>
19426#else
19427# include <assert.h>
19428#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019429
19430#undef $ac_func
19431
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432/* Override any GCC internal prototype to avoid an error.
19433 Use char because int might match the return type of a GCC
19434 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019435#ifdef __cplusplus
19436extern "C"
19437#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019438char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019439/* The GNU C library defines this for functions which it implements
19440 to always fail with ENOSYS. Some functions are actually named
19441 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019442#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019443choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019444#endif
19445
Skip Montanaro6dead952003-09-25 14:50:04 +000019446int
19447main ()
19448{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 ;
19451 return 0;
19452}
19453_ACEOF
19454rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019455if { (ac_try="$ac_link"
19456case "(($ac_try" in
19457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19458 *) ac_try_echo=$ac_try;;
19459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019461 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019463 grep -v '^ *+' conftest.er1 >conftest.err
19464 rm -f conftest.er1
19465 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019467 (exit $ac_status); } && {
19468 test -z "$ac_c_werror_flag" ||
19469 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019470 } && test -s conftest$ac_exeext &&
19471 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019472 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019475sed 's/^/| /' conftest.$ac_ext >&5
19476
Martin v. Löwiseba40652007-08-30 20:10:57 +000019477 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019479
19480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019481 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019482fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019483ac_res=`eval echo '${'$as_ac_var'}'`
19484 { echo "$as_me:$LINENO: result: $ac_res" >&5
19485echo "${ECHO_T}$ac_res" >&6; }
19486if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019488#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019489_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019492 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19493echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019494if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019495 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019496else
Martin v. Löwis11437992002-04-12 09:54:03 +000019497 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019498LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019505
Martin v. Löwiseba40652007-08-30 20:10:57 +000019506/* Override any GCC internal prototype to avoid an error.
19507 Use char because int might match the return type of a GCC
19508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019509#ifdef __cplusplus
19510extern "C"
19511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019512char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019513int
19514main ()
19515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 ;
19518 return 0;
19519}
19520_ACEOF
19521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522if { (ac_try="$ac_link"
19523case "(($ac_try" in
19524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19525 *) ac_try_echo=$ac_try;;
19526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019530 grep -v '^ *+' conftest.er1 >conftest.err
19531 rm -f conftest.er1
19532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534 (exit $ac_status); } && {
19535 test -z "$ac_c_werror_flag" ||
19536 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019537 } && test -s conftest$ac_exeext &&
19538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019540else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019542sed 's/^/| /' conftest.$ac_ext >&5
19543
Martin v. Löwiseba40652007-08-30 20:10:57 +000019544 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546
19547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019549LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019550fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019551{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19552echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19553if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019555#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019556_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019557 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019559 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19560echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019561if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019563else
19564 ac_check_lib_save_LIBS=$LIBS
19565LIBS="-lbsd $LIBS"
19566cat >conftest.$ac_ext <<_ACEOF
19567/* confdefs.h. */
19568_ACEOF
19569cat confdefs.h >>conftest.$ac_ext
19570cat >>conftest.$ac_ext <<_ACEOF
19571/* end confdefs.h. */
19572
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573/* Override any GCC internal prototype to avoid an error.
19574 Use char because int might match the return type of a GCC
19575 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019576#ifdef __cplusplus
19577extern "C"
19578#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019579char openpty ();
19580int
19581main ()
19582{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019584 ;
19585 return 0;
19586}
19587_ACEOF
19588rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589if { (ac_try="$ac_link"
19590case "(($ac_try" in
19591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19592 *) ac_try_echo=$ac_try;;
19593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019595 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019596 ac_status=$?
19597 grep -v '^ *+' conftest.er1 >conftest.err
19598 rm -f conftest.er1
19599 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019601 (exit $ac_status); } && {
19602 test -z "$ac_c_werror_flag" ||
19603 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019604 } && test -s conftest$ac_exeext &&
19605 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019606 ac_cv_lib_bsd_openpty=yes
19607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019608 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019609sed 's/^/| /' conftest.$ac_ext >&5
19610
Martin v. Löwiseba40652007-08-30 20:10:57 +000019611 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613
19614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019615 conftest$ac_exeext conftest.$ac_ext
19616LIBS=$ac_check_lib_save_LIBS
19617fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019618{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19619echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19620if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019621 cat >>confdefs.h <<\_ACEOF
19622#define HAVE_OPENPTY 1
19623_ACEOF
19624 LIBS="$LIBS -lbsd"
19625fi
19626
19627
19628fi
19629
Fred Drake8cef4cf2000-06-28 16:40:38 +000019630
19631fi
19632done
19633
Martin v. Löwis11437992002-04-12 09:54:03 +000019634
Fred Drake8cef4cf2000-06-28 16:40:38 +000019635for ac_func in forkpty
19636do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019637as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19638{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19639echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019640if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019641 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019642else
Martin v. Löwis11437992002-04-12 09:54:03 +000019643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019644/* confdefs.h. */
19645_ACEOF
19646cat confdefs.h >>conftest.$ac_ext
19647cat >>conftest.$ac_ext <<_ACEOF
19648/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019649/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19650 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19651#define $ac_func innocuous_$ac_func
19652
Fred Drake8cef4cf2000-06-28 16:40:38 +000019653/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019654 which can conflict with char $ac_func (); below.
19655 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019656 <limits.h> exists even on freestanding compilers. */
19657
19658#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019659# include <limits.h>
19660#else
19661# include <assert.h>
19662#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019663
19664#undef $ac_func
19665
Martin v. Löwiseba40652007-08-30 20:10:57 +000019666/* Override any GCC internal prototype to avoid an error.
19667 Use char because int might match the return type of a GCC
19668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019669#ifdef __cplusplus
19670extern "C"
19671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019672char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019673/* The GNU C library defines this for functions which it implements
19674 to always fail with ENOSYS. Some functions are actually named
19675 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019676#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019677choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019678#endif
19679
Skip Montanaro6dead952003-09-25 14:50:04 +000019680int
19681main ()
19682{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019683return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019684 ;
19685 return 0;
19686}
19687_ACEOF
19688rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019689if { (ac_try="$ac_link"
19690case "(($ac_try" in
19691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19692 *) ac_try_echo=$ac_try;;
19693esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019697 grep -v '^ *+' conftest.er1 >conftest.err
19698 rm -f conftest.er1
19699 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701 (exit $ac_status); } && {
19702 test -z "$ac_c_werror_flag" ||
19703 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019704 } && test -s conftest$ac_exeext &&
19705 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019706 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019709sed 's/^/| /' conftest.$ac_ext >&5
19710
Martin v. Löwiseba40652007-08-30 20:10:57 +000019711 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019713
19714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019715 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019716fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019717ac_res=`eval echo '${'$as_ac_var'}'`
19718 { echo "$as_me:$LINENO: result: $ac_res" >&5
19719echo "${ECHO_T}$ac_res" >&6; }
19720if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019721 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019722#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019723_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019724
Fred Drake8cef4cf2000-06-28 16:40:38 +000019725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019726 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19727echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019728if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019729 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019730else
Martin v. Löwis11437992002-04-12 09:54:03 +000019731 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019732LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019734/* confdefs.h. */
19735_ACEOF
19736cat confdefs.h >>conftest.$ac_ext
19737cat >>conftest.$ac_ext <<_ACEOF
19738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019739
Martin v. Löwiseba40652007-08-30 20:10:57 +000019740/* Override any GCC internal prototype to avoid an error.
19741 Use char because int might match the return type of a GCC
19742 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019743#ifdef __cplusplus
19744extern "C"
19745#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019746char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019747int
19748main ()
19749{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019750return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019751 ;
19752 return 0;
19753}
19754_ACEOF
19755rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019756if { (ac_try="$ac_link"
19757case "(($ac_try" in
19758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19759 *) ac_try_echo=$ac_try;;
19760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019764 grep -v '^ *+' conftest.er1 >conftest.err
19765 rm -f conftest.er1
19766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768 (exit $ac_status); } && {
19769 test -z "$ac_c_werror_flag" ||
19770 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019771 } && test -s conftest$ac_exeext &&
19772 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019773 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019774else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019776sed 's/^/| /' conftest.$ac_ext >&5
19777
Martin v. Löwiseba40652007-08-30 20:10:57 +000019778 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780
19781rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019783LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019785{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19786echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19787if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019789#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019790_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019791 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019793 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19794echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019795if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019796 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019797else
19798 ac_check_lib_save_LIBS=$LIBS
19799LIBS="-lbsd $LIBS"
19800cat >conftest.$ac_ext <<_ACEOF
19801/* confdefs.h. */
19802_ACEOF
19803cat confdefs.h >>conftest.$ac_ext
19804cat >>conftest.$ac_ext <<_ACEOF
19805/* end confdefs.h. */
19806
Martin v. Löwiseba40652007-08-30 20:10:57 +000019807/* Override any GCC internal prototype to avoid an error.
19808 Use char because int might match the return type of a GCC
19809 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019810#ifdef __cplusplus
19811extern "C"
19812#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019813char forkpty ();
19814int
19815main ()
19816{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019818 ;
19819 return 0;
19820}
19821_ACEOF
19822rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823if { (ac_try="$ac_link"
19824case "(($ac_try" in
19825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19826 *) ac_try_echo=$ac_try;;
19827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019829 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019830 ac_status=$?
19831 grep -v '^ *+' conftest.er1 >conftest.err
19832 rm -f conftest.er1
19833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835 (exit $ac_status); } && {
19836 test -z "$ac_c_werror_flag" ||
19837 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019838 } && test -s conftest$ac_exeext &&
19839 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019840 ac_cv_lib_bsd_forkpty=yes
19841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019842 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019843sed 's/^/| /' conftest.$ac_ext >&5
19844
Martin v. Löwiseba40652007-08-30 20:10:57 +000019845 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847
19848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019849 conftest$ac_exeext conftest.$ac_ext
19850LIBS=$ac_check_lib_save_LIBS
19851fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019852{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19853echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19854if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019855 cat >>confdefs.h <<\_ACEOF
19856#define HAVE_FORKPTY 1
19857_ACEOF
19858 LIBS="$LIBS -lbsd"
19859fi
19860
19861
19862fi
19863
Fred Drake8cef4cf2000-06-28 16:40:38 +000019864
19865fi
19866done
19867
Jack Jansendd19cf82001-12-06 22:36:17 +000019868
Brett Cannonaa5778d2008-03-18 04:09:00 +000019869# Stuff for expat.
19870
19871for ac_func in memmove
19872do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019873as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19874{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19875echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019876if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019877 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019878else
19879 cat >conftest.$ac_ext <<_ACEOF
19880/* confdefs.h. */
19881_ACEOF
19882cat confdefs.h >>conftest.$ac_ext
19883cat >>conftest.$ac_ext <<_ACEOF
19884/* end confdefs.h. */
19885/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19886 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19887#define $ac_func innocuous_$ac_func
19888
19889/* System header to define __stub macros and hopefully few prototypes,
19890 which can conflict with char $ac_func (); below.
19891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19892 <limits.h> exists even on freestanding compilers. */
19893
19894#ifdef __STDC__
19895# include <limits.h>
19896#else
19897# include <assert.h>
19898#endif
19899
19900#undef $ac_func
19901
19902/* Override any GCC internal prototype to avoid an error.
19903 Use char because int might match the return type of a GCC
19904 builtin and then its argument prototype would still apply. */
19905#ifdef __cplusplus
19906extern "C"
19907#endif
19908char $ac_func ();
19909/* The GNU C library defines this for functions which it implements
19910 to always fail with ENOSYS. Some functions are actually named
19911 something starting with __ and the normal name is an alias. */
19912#if defined __stub_$ac_func || defined __stub___$ac_func
19913choke me
19914#endif
19915
19916int
19917main ()
19918{
19919return $ac_func ();
19920 ;
19921 return 0;
19922}
19923_ACEOF
19924rm -f conftest.$ac_objext conftest$ac_exeext
19925if { (ac_try="$ac_link"
19926case "(($ac_try" in
19927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19928 *) ac_try_echo=$ac_try;;
19929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019931 (eval "$ac_link") 2>conftest.er1
19932 ac_status=$?
19933 grep -v '^ *+' conftest.er1 >conftest.err
19934 rm -f conftest.er1
19935 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019937 (exit $ac_status); } && {
19938 test -z "$ac_c_werror_flag" ||
19939 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019940 } && test -s conftest$ac_exeext &&
19941 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019942 eval "$as_ac_var=yes"
19943else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019944 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019945sed 's/^/| /' conftest.$ac_ext >&5
19946
19947 eval "$as_ac_var=no"
19948fi
19949
19950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19951 conftest$ac_exeext conftest.$ac_ext
19952fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019953ac_res=`eval echo '${'$as_ac_var'}'`
19954 { echo "$as_me:$LINENO: result: $ac_res" >&5
19955echo "${ECHO_T}$ac_res" >&6; }
19956if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019957 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019958#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019959_ACEOF
19960
19961fi
19962done
19963
19964
Michael W. Hudson54241132001-12-07 15:38:26 +000019965# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019966
19967
19968
19969
19970
19971
Fred Drake8cef4cf2000-06-28 16:40:38 +000019972for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19973do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19975{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019977if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019979else
Martin v. Löwis11437992002-04-12 09:54:03 +000019980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019981/* confdefs.h. */
19982_ACEOF
19983cat confdefs.h >>conftest.$ac_ext
19984cat >>conftest.$ac_ext <<_ACEOF
19985/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019986/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19987 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19988#define $ac_func innocuous_$ac_func
19989
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019990/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019991 which can conflict with char $ac_func (); below.
19992 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019993 <limits.h> exists even on freestanding compilers. */
19994
19995#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019996# include <limits.h>
19997#else
19998# include <assert.h>
19999#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020000
20001#undef $ac_func
20002
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003/* Override any GCC internal prototype to avoid an error.
20004 Use char because int might match the return type of a GCC
20005 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020006#ifdef __cplusplus
20007extern "C"
20008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020009char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020010/* The GNU C library defines this for functions which it implements
20011 to always fail with ENOSYS. Some functions are actually named
20012 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020013#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020014choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020015#endif
20016
Skip Montanaro6dead952003-09-25 14:50:04 +000020017int
20018main ()
20019{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020020return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020021 ;
20022 return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020026if { (ac_try="$ac_link"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020034 grep -v '^ *+' conftest.er1 >conftest.err
20035 rm -f conftest.er1
20036 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038 (exit $ac_status); } && {
20039 test -z "$ac_c_werror_flag" ||
20040 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020041 } && test -s conftest$ac_exeext &&
20042 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020043 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020046sed 's/^/| /' conftest.$ac_ext >&5
20047
Martin v. Löwiseba40652007-08-30 20:10:57 +000020048 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020050
20051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020052 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020053fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020054ac_res=`eval echo '${'$as_ac_var'}'`
20055 { echo "$as_me:$LINENO: result: $ac_res" >&5
20056echo "${ECHO_T}$ac_res" >&6; }
20057if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020059#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020060_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020061
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020062fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020063done
20064
Michael W. Hudson54241132001-12-07 15:38:26 +000020065
Martin v. Löwis11437992002-04-12 09:54:03 +000020066
20067
20068
Brett Cannonaa5778d2008-03-18 04:09:00 +000020069for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020070do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020071as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20072{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20073echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020074if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020076else
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020078/* confdefs.h. */
20079_ACEOF
20080cat confdefs.h >>conftest.$ac_ext
20081cat >>conftest.$ac_ext <<_ACEOF
20082/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020083/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20084 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20085#define $ac_func innocuous_$ac_func
20086
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020088 which can conflict with char $ac_func (); below.
20089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020090 <limits.h> exists even on freestanding compilers. */
20091
20092#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020093# include <limits.h>
20094#else
20095# include <assert.h>
20096#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020097
20098#undef $ac_func
20099
Martin v. Löwiseba40652007-08-30 20:10:57 +000020100/* Override any GCC internal prototype to avoid an error.
20101 Use char because int might match the return type of a GCC
20102 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020103#ifdef __cplusplus
20104extern "C"
20105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020106char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020107/* The GNU C library defines this for functions which it implements
20108 to always fail with ENOSYS. Some functions are actually named
20109 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020110#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020111choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020112#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020113
Skip Montanaro6dead952003-09-25 14:50:04 +000020114int
20115main ()
20116{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020117return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 ;
20119 return 0;
20120}
20121_ACEOF
20122rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123if { (ac_try="$ac_link"
20124case "(($ac_try" in
20125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20126 *) ac_try_echo=$ac_try;;
20127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020129 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020131 grep -v '^ *+' conftest.er1 >conftest.err
20132 rm -f conftest.er1
20133 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020135 (exit $ac_status); } && {
20136 test -z "$ac_c_werror_flag" ||
20137 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020138 } && test -s conftest$ac_exeext &&
20139 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020140 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020143sed 's/^/| /' conftest.$ac_ext >&5
20144
Martin v. Löwiseba40652007-08-30 20:10:57 +000020145 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147
20148rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020151ac_res=`eval echo '${'$as_ac_var'}'`
20152 { echo "$as_me:$LINENO: result: $ac_res" >&5
20153echo "${ECHO_T}$ac_res" >&6; }
20154if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020157_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020158
Martin v. Löwis1142de32002-03-29 16:28:31 +000020159else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020161 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20163 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020164esac
20165
Martin v. Löwis1142de32002-03-29 16:28:31 +000020166fi
20167done
20168
20169
Martin v. Löwis11437992002-04-12 09:54:03 +000020170
Martin v. Löwis1142de32002-03-29 16:28:31 +000020171for ac_func in getpgrp
20172do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020173as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20174{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20175echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020177 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020178else
Martin v. Löwis11437992002-04-12 09:54:03 +000020179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020180/* confdefs.h. */
20181_ACEOF
20182cat confdefs.h >>conftest.$ac_ext
20183cat >>conftest.$ac_ext <<_ACEOF
20184/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020185/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20187#define $ac_func innocuous_$ac_func
20188
Martin v. Löwis1142de32002-03-29 16:28:31 +000020189/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020190 which can conflict with char $ac_func (); below.
20191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020192 <limits.h> exists even on freestanding compilers. */
20193
20194#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020195# include <limits.h>
20196#else
20197# include <assert.h>
20198#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020199
20200#undef $ac_func
20201
Martin v. Löwiseba40652007-08-30 20:10:57 +000020202/* Override any GCC internal prototype to avoid an error.
20203 Use char because int might match the return type of a GCC
20204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020205#ifdef __cplusplus
20206extern "C"
20207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020208char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020209/* The GNU C library defines this for functions which it implements
20210 to always fail with ENOSYS. Some functions are actually named
20211 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020213choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020214#endif
20215
Skip Montanaro6dead952003-09-25 14:50:04 +000020216int
20217main ()
20218{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020219return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020220 ;
20221 return 0;
20222}
20223_ACEOF
20224rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020225if { (ac_try="$ac_link"
20226case "(($ac_try" in
20227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20228 *) ac_try_echo=$ac_try;;
20229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020233 grep -v '^ *+' conftest.er1 >conftest.err
20234 rm -f conftest.er1
20235 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237 (exit $ac_status); } && {
20238 test -z "$ac_c_werror_flag" ||
20239 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020240 } && test -s conftest$ac_exeext &&
20241 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020243else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020245sed 's/^/| /' conftest.$ac_ext >&5
20246
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020249
20250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020251 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020253ac_res=`eval echo '${'$as_ac_var'}'`
20254 { echo "$as_me:$LINENO: result: $ac_res" >&5
20255echo "${ECHO_T}$ac_res" >&6; }
20256if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020257 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020258#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020259_ACEOF
20260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020261/* confdefs.h. */
20262_ACEOF
20263cat confdefs.h >>conftest.$ac_ext
20264cat >>conftest.$ac_ext <<_ACEOF
20265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020266#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020267int
20268main ()
20269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020270getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020271 ;
20272 return 0;
20273}
20274_ACEOF
20275rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276if { (ac_try="$ac_compile"
20277case "(($ac_try" in
20278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20279 *) ac_try_echo=$ac_try;;
20280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020284 grep -v '^ *+' conftest.er1 >conftest.err
20285 rm -f conftest.er1
20286 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020288 (exit $ac_status); } && {
20289 test -z "$ac_c_werror_flag" ||
20290 test ! -s conftest.err
20291 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020292
20293cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020294#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020295_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020296
Martin v. Löwis11437992002-04-12 09:54:03 +000020297
Guido van Rossumf78abae1997-01-21 22:02:36 +000020298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020300sed 's/^/| /' conftest.$ac_ext >&5
20301
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302
Guido van Rossum627b2d71993-12-24 10:39:16 +000020303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020304
20305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020306
Guido van Rossum627b2d71993-12-24 10:39:16 +000020307fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020308done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020309
Jack Jansen150753c2003-03-29 22:07:47 +000020310
20311for ac_func in setpgrp
20312do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020313as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20314{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20315echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020316if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020318else
Martin v. Löwis11437992002-04-12 09:54:03 +000020319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020320/* confdefs.h. */
20321_ACEOF
20322cat confdefs.h >>conftest.$ac_ext
20323cat >>conftest.$ac_ext <<_ACEOF
20324/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020325/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20326 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20327#define $ac_func innocuous_$ac_func
20328
Jack Jansen150753c2003-03-29 22:07:47 +000020329/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020330 which can conflict with char $ac_func (); below.
20331 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020332 <limits.h> exists even on freestanding compilers. */
20333
20334#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020335# include <limits.h>
20336#else
20337# include <assert.h>
20338#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020339
20340#undef $ac_func
20341
Martin v. Löwiseba40652007-08-30 20:10:57 +000020342/* Override any GCC internal prototype to avoid an error.
20343 Use char because int might match the return type of a GCC
20344 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020345#ifdef __cplusplus
20346extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020347#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020348char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020349/* The GNU C library defines this for functions which it implements
20350 to always fail with ENOSYS. Some functions are actually named
20351 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020353choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020354#endif
20355
Skip Montanaro6dead952003-09-25 14:50:04 +000020356int
20357main ()
20358{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020359return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 ;
20361 return 0;
20362}
20363_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020364rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020365if { (ac_try="$ac_link"
20366case "(($ac_try" in
20367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20368 *) ac_try_echo=$ac_try;;
20369esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020371 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020373 grep -v '^ *+' conftest.er1 >conftest.err
20374 rm -f conftest.er1
20375 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377 (exit $ac_status); } && {
20378 test -z "$ac_c_werror_flag" ||
20379 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020380 } && test -s conftest$ac_exeext &&
20381 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020382 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020383else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020385sed 's/^/| /' conftest.$ac_ext >&5
20386
Martin v. Löwiseba40652007-08-30 20:10:57 +000020387 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020389
20390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020391 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020392fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020393ac_res=`eval echo '${'$as_ac_var'}'`
20394 { echo "$as_me:$LINENO: result: $ac_res" >&5
20395echo "${ECHO_T}$ac_res" >&6; }
20396if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020397 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020398#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020399_ACEOF
20400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020401/* confdefs.h. */
20402_ACEOF
20403cat confdefs.h >>conftest.$ac_ext
20404cat >>conftest.$ac_ext <<_ACEOF
20405/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020406#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020407int
20408main ()
20409{
20410setpgrp(0,0);
20411 ;
20412 return 0;
20413}
20414_ACEOF
20415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020416if { (ac_try="$ac_compile"
20417case "(($ac_try" in
20418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20419 *) ac_try_echo=$ac_try;;
20420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020422 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020424 grep -v '^ *+' conftest.er1 >conftest.err
20425 rm -f conftest.er1
20426 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428 (exit $ac_status); } && {
20429 test -z "$ac_c_werror_flag" ||
20430 test ! -s conftest.err
20431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020432
20433cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020434#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020435_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020436
Jack Jansen150753c2003-03-29 22:07:47 +000020437
20438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020440sed 's/^/| /' conftest.$ac_ext >&5
20441
Martin v. Löwiseba40652007-08-30 20:10:57 +000020442
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020444
20445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020446
20447fi
20448done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020449
Martin v. Löwis11437992002-04-12 09:54:03 +000020450
Thomas Wouters3a584202000-08-05 23:28:51 +000020451for ac_func in gettimeofday
20452do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020453as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20454{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20455echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020457 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020458else
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020460/* confdefs.h. */
20461_ACEOF
20462cat confdefs.h >>conftest.$ac_ext
20463cat >>conftest.$ac_ext <<_ACEOF
20464/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020465/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20466 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20467#define $ac_func innocuous_$ac_func
20468
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020469/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020470 which can conflict with char $ac_func (); below.
20471 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020472 <limits.h> exists even on freestanding compilers. */
20473
20474#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020475# include <limits.h>
20476#else
20477# include <assert.h>
20478#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020479
20480#undef $ac_func
20481
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482/* Override any GCC internal prototype to avoid an error.
20483 Use char because int might match the return type of a GCC
20484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020485#ifdef __cplusplus
20486extern "C"
20487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020488char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020489/* The GNU C library defines this for functions which it implements
20490 to always fail with ENOSYS. Some functions are actually named
20491 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020493choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020494#endif
20495
Skip Montanaro6dead952003-09-25 14:50:04 +000020496int
20497main ()
20498{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020499return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020500 ;
20501 return 0;
20502}
20503_ACEOF
20504rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020505if { (ac_try="$ac_link"
20506case "(($ac_try" in
20507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20508 *) ac_try_echo=$ac_try;;
20509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020511 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020513 grep -v '^ *+' conftest.er1 >conftest.err
20514 rm -f conftest.er1
20515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020517 (exit $ac_status); } && {
20518 test -z "$ac_c_werror_flag" ||
20519 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020520 } && test -s conftest$ac_exeext &&
20521 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020525sed 's/^/| /' conftest.$ac_ext >&5
20526
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020529
20530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020531 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020532fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020533ac_res=`eval echo '${'$as_ac_var'}'`
20534 { echo "$as_me:$LINENO: result: $ac_res" >&5
20535echo "${ECHO_T}$ac_res" >&6; }
20536if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020538#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020539_ACEOF
20540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020541/* confdefs.h. */
20542_ACEOF
20543cat confdefs.h >>conftest.$ac_ext
20544cat >>conftest.$ac_ext <<_ACEOF
20545/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020546#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020547int
20548main ()
20549{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020550gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 ;
20552 return 0;
20553}
20554_ACEOF
20555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020556if { (ac_try="$ac_compile"
20557case "(($ac_try" in
20558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20559 *) ac_try_echo=$ac_try;;
20560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020564 grep -v '^ *+' conftest.er1 >conftest.err
20565 rm -f conftest.er1
20566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020568 (exit $ac_status); } && {
20569 test -z "$ac_c_werror_flag" ||
20570 test ! -s conftest.err
20571 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020572 :
20573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020575sed 's/^/| /' conftest.$ac_ext >&5
20576
Martin v. Löwis11437992002-04-12 09:54:03 +000020577
20578cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020579#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020580_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020581
Martin v. Löwis11437992002-04-12 09:54:03 +000020582
Guido van Rossum627b2d71993-12-24 10:39:16 +000020583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020584
20585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020587fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020588done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020589
Michael W. Hudson54241132001-12-07 15:38:26 +000020590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020591{ echo "$as_me:$LINENO: checking for major" >&5
20592echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020599
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020600#if defined(MAJOR_IN_MKDEV)
20601#include <sys/mkdev.h>
20602#elif defined(MAJOR_IN_SYSMACROS)
20603#include <sys/sysmacros.h>
20604#else
20605#include <sys/types.h>
20606#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020607
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020608int
20609main ()
20610{
20611
20612 makedev(major(0),minor(0));
20613
20614 ;
20615 return 0;
20616}
20617_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020618rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020619if { (ac_try="$ac_link"
20620case "(($ac_try" in
20621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20622 *) ac_try_echo=$ac_try;;
20623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020627 grep -v '^ *+' conftest.er1 >conftest.err
20628 rm -f conftest.er1
20629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020631 (exit $ac_status); } && {
20632 test -z "$ac_c_werror_flag" ||
20633 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020634 } && test -s conftest$ac_exeext &&
20635 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020636
20637
20638cat >>confdefs.h <<\_ACEOF
20639#define HAVE_DEVICE_MACROS 1
20640_ACEOF
20641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020642 { echo "$as_me:$LINENO: result: yes" >&5
20643echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020644
20645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020647sed 's/^/| /' conftest.$ac_ext >&5
20648
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020649
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020650 { echo "$as_me:$LINENO: result: no" >&5
20651echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020652
20653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654
20655rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020656 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020657
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020658# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020659# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020660{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20661echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020662cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020663/* confdefs.h. */
20664_ACEOF
20665cat confdefs.h >>conftest.$ac_ext
20666cat >>conftest.$ac_ext <<_ACEOF
20667/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020668
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020669#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020670#include <sys/socket.h>
20671#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020672#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020673
Martin v. Löwis11437992002-04-12 09:54:03 +000020674int
20675main ()
20676{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020677getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020678 ;
20679 return 0;
20680}
20681_ACEOF
20682rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020683if { (ac_try="$ac_link"
20684case "(($ac_try" in
20685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20686 *) ac_try_echo=$ac_try;;
20687esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020691 grep -v '^ *+' conftest.er1 >conftest.err
20692 rm -f conftest.er1
20693 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020695 (exit $ac_status); } && {
20696 test -z "$ac_c_werror_flag" ||
20697 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020698 } && test -s conftest$ac_exeext &&
20699 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020700 have_getaddrinfo=yes
20701else
20702 echo "$as_me: failed program was:" >&5
20703sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020704
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020705 have_getaddrinfo=no
20706fi
20707
20708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20709 conftest$ac_exeext conftest.$ac_ext
20710{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20711echo "${ECHO_T}$have_getaddrinfo" >&6; }
20712if test $have_getaddrinfo = yes
20713then
20714 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020715echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020716 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20717 echo $ECHO_N "(cached) $ECHO_C" >&6
20718else
20719 if test "$cross_compiling" = yes; then
20720 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020721else
Martin v. Löwis11437992002-04-12 09:54:03 +000020722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020723/* confdefs.h. */
20724_ACEOF
20725cat confdefs.h >>conftest.$ac_ext
20726cat >>conftest.$ac_ext <<_ACEOF
20727/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728
20729#include <sys/types.h>
20730#include <netdb.h>
20731#include <string.h>
20732#include <sys/socket.h>
20733#include <netinet/in.h>
20734
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020735int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020736{
20737 int passive, gaierr, inet4 = 0, inet6 = 0;
20738 struct addrinfo hints, *ai, *aitop;
20739 char straddr[INET6_ADDRSTRLEN], strport[16];
20740
20741 for (passive = 0; passive <= 1; passive++) {
20742 memset(&hints, 0, sizeof(hints));
20743 hints.ai_family = AF_UNSPEC;
20744 hints.ai_flags = passive ? AI_PASSIVE : 0;
20745 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020746 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020747 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20748 (void)gai_strerror(gaierr);
20749 goto bad;
20750 }
20751 for (ai = aitop; ai; ai = ai->ai_next) {
20752 if (ai->ai_addr == NULL ||
20753 ai->ai_addrlen == 0 ||
20754 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20755 straddr, sizeof(straddr), strport, sizeof(strport),
20756 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20757 goto bad;
20758 }
20759 switch (ai->ai_family) {
20760 case AF_INET:
20761 if (strcmp(strport, "54321") != 0) {
20762 goto bad;
20763 }
20764 if (passive) {
20765 if (strcmp(straddr, "0.0.0.0") != 0) {
20766 goto bad;
20767 }
20768 } else {
20769 if (strcmp(straddr, "127.0.0.1") != 0) {
20770 goto bad;
20771 }
20772 }
20773 inet4++;
20774 break;
20775 case AF_INET6:
20776 if (strcmp(strport, "54321") != 0) {
20777 goto bad;
20778 }
20779 if (passive) {
20780 if (strcmp(straddr, "::") != 0) {
20781 goto bad;
20782 }
20783 } else {
20784 if (strcmp(straddr, "::1") != 0) {
20785 goto bad;
20786 }
20787 }
20788 inet6++;
20789 break;
20790 case AF_UNSPEC:
20791 goto bad;
20792 break;
20793 default:
20794 /* another family support? */
20795 break;
20796 }
20797 }
20798 }
20799
20800 if (!(inet4 == 0 || inet4 == 2))
20801 goto bad;
20802 if (!(inet6 == 0 || inet6 == 2))
20803 goto bad;
20804
20805 if (aitop)
20806 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020807 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020808
20809 bad:
20810 if (aitop)
20811 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020812 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020813}
20814
Martin v. Löwis11437992002-04-12 09:54:03 +000020815_ACEOF
20816rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020817if { (ac_try="$ac_link"
20818case "(($ac_try" in
20819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20820 *) ac_try_echo=$ac_try;;
20821esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020823 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020824 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 { (case "(($ac_try" in
20828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20829 *) ac_try_echo=$ac_try;;
20830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020833 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020835 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020836 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020838 echo "$as_me: program exited with status $ac_status" >&5
20839echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020840sed 's/^/| /' conftest.$ac_ext >&5
20841
Martin v. Löwis11437992002-04-12 09:54:03 +000020842( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020843ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845rm -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 +000020846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847
20848
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020849fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020850
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020852
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020853if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20854then
20855 if test $ipv6 = yes
20856 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020857 echo 'Fatal: You must get working getaddrinfo() function.'
20858 echo ' or you can specify "--disable-ipv6"'.
20859 exit 1
20860 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020861else
Martin v. Löwis11437992002-04-12 09:54:03 +000020862
20863cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020864#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020865_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020866
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020868
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020869for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020870do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20872{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20873echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020874if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020875 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020876else
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020878/* confdefs.h. */
20879_ACEOF
20880cat confdefs.h >>conftest.$ac_ext
20881cat >>conftest.$ac_ext <<_ACEOF
20882/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020883/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20884 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20885#define $ac_func innocuous_$ac_func
20886
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020887/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020888 which can conflict with char $ac_func (); below.
20889 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020890 <limits.h> exists even on freestanding compilers. */
20891
20892#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020893# include <limits.h>
20894#else
20895# include <assert.h>
20896#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020897
20898#undef $ac_func
20899
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900/* Override any GCC internal prototype to avoid an error.
20901 Use char because int might match the return type of a GCC
20902 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020903#ifdef __cplusplus
20904extern "C"
20905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020906char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020907/* The GNU C library defines this for functions which it implements
20908 to always fail with ENOSYS. Some functions are actually named
20909 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020910#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020911choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020912#endif
20913
Skip Montanaro6dead952003-09-25 14:50:04 +000020914int
20915main ()
20916{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020917return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 ;
20919 return 0;
20920}
20921_ACEOF
20922rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923if { (ac_try="$ac_link"
20924case "(($ac_try" in
20925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20926 *) ac_try_echo=$ac_try;;
20927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020931 grep -v '^ *+' conftest.er1 >conftest.err
20932 rm -f conftest.er1
20933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020935 (exit $ac_status); } && {
20936 test -z "$ac_c_werror_flag" ||
20937 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020938 } && test -s conftest$ac_exeext &&
20939 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020940 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020941else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020943sed 's/^/| /' conftest.$ac_ext >&5
20944
Martin v. Löwiseba40652007-08-30 20:10:57 +000020945 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947
20948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020949 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020950fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020951ac_res=`eval echo '${'$as_ac_var'}'`
20952 { echo "$as_me:$LINENO: result: $ac_res" >&5
20953echo "${ECHO_T}$ac_res" >&6; }
20954if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020956#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020957_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020958
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020959fi
20960done
20961
Michael W. Hudson54241132001-12-07 15:38:26 +000020962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020963# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020964{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20965echo $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 +000020966if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020967 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020968else
Martin v. Löwis11437992002-04-12 09:54:03 +000020969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020975#include <sys/types.h>
20976#include <sys/time.h>
20977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020978
Martin v. Löwis11437992002-04-12 09:54:03 +000020979int
20980main ()
20981{
20982if ((struct tm *) 0)
20983return 0;
20984 ;
20985 return 0;
20986}
20987_ACEOF
20988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020989if { (ac_try="$ac_compile"
20990case "(($ac_try" in
20991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20992 *) ac_try_echo=$ac_try;;
20993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020997 grep -v '^ *+' conftest.er1 >conftest.err
20998 rm -f conftest.er1
20999 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001 (exit $ac_status); } && {
21002 test -z "$ac_c_werror_flag" ||
21003 test ! -s conftest.err
21004 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021005 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021008sed 's/^/| /' conftest.$ac_ext >&5
21009
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012
21013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021014fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021015{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21016echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021017if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021018
21019cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021020#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021022
21023fi
21024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021025{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21026echo $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 +000021027if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021028 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021029else
Martin v. Löwis11437992002-04-12 09:54:03 +000021030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021031/* confdefs.h. */
21032_ACEOF
21033cat confdefs.h >>conftest.$ac_ext
21034cat >>conftest.$ac_ext <<_ACEOF
21035/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021036#include <sys/types.h>
21037#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021038
Martin v. Löwis11437992002-04-12 09:54:03 +000021039int
21040main ()
21041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042struct tm tm;
21043 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021044 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021045 ;
21046 return 0;
21047}
21048_ACEOF
21049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021050if { (ac_try="$ac_compile"
21051case "(($ac_try" in
21052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21053 *) ac_try_echo=$ac_try;;
21054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021058 grep -v '^ *+' conftest.er1 >conftest.err
21059 rm -f conftest.er1
21060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021062 (exit $ac_status); } && {
21063 test -z "$ac_c_werror_flag" ||
21064 test ! -s conftest.err
21065 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021066 ac_cv_struct_tm=time.h
21067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021069sed 's/^/| /' conftest.$ac_ext >&5
21070
Martin v. Löwiseba40652007-08-30 20:10:57 +000021071 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073
21074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021076{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21077echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021078if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021079
21080cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021081#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021082_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021083
21084fi
21085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021086{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21087echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021088if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021090else
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021092/* confdefs.h. */
21093_ACEOF
21094cat confdefs.h >>conftest.$ac_ext
21095cat >>conftest.$ac_ext <<_ACEOF
21096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021097#include <sys/types.h>
21098#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021099
21100
Martin v. Löwis11437992002-04-12 09:54:03 +000021101int
21102main ()
21103{
21104static struct tm ac_aggr;
21105if (ac_aggr.tm_zone)
21106return 0;
21107 ;
21108 return 0;
21109}
21110_ACEOF
21111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021112if { (ac_try="$ac_compile"
21113case "(($ac_try" in
21114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21115 *) ac_try_echo=$ac_try;;
21116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021120 grep -v '^ *+' conftest.er1 >conftest.err
21121 rm -f conftest.er1
21122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124 (exit $ac_status); } && {
21125 test -z "$ac_c_werror_flag" ||
21126 test ! -s conftest.err
21127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021131sed 's/^/| /' conftest.$ac_ext >&5
21132
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021134/* confdefs.h. */
21135_ACEOF
21136cat confdefs.h >>conftest.$ac_ext
21137cat >>conftest.$ac_ext <<_ACEOF
21138/* end confdefs.h. */
21139#include <sys/types.h>
21140#include <$ac_cv_struct_tm>
21141
21142
21143int
21144main ()
21145{
21146static struct tm ac_aggr;
21147if (sizeof ac_aggr.tm_zone)
21148return 0;
21149 ;
21150 return 0;
21151}
21152_ACEOF
21153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021154if { (ac_try="$ac_compile"
21155case "(($ac_try" in
21156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21157 *) ac_try_echo=$ac_try;;
21158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021160 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021162 grep -v '^ *+' conftest.er1 >conftest.err
21163 rm -f conftest.er1
21164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021166 (exit $ac_status); } && {
21167 test -z "$ac_c_werror_flag" ||
21168 test ! -s conftest.err
21169 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021170 ac_cv_member_struct_tm_tm_zone=yes
21171else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021173sed 's/^/| /' conftest.$ac_ext >&5
21174
Martin v. Löwiseba40652007-08-30 20:10:57 +000021175 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177
21178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021180
21181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021182fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021183{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21184echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21185if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021186
21187cat >>confdefs.h <<_ACEOF
21188#define HAVE_STRUCT_TM_TM_ZONE 1
21189_ACEOF
21190
21191
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021192fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021193
Martin v. Löwis11437992002-04-12 09:54:03 +000021194if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21195
21196cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021197#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021198_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021199
21200else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021201 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21202echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021203if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021204 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205else
21206 cat >conftest.$ac_ext <<_ACEOF
21207/* confdefs.h. */
21208_ACEOF
21209cat confdefs.h >>conftest.$ac_ext
21210cat >>conftest.$ac_ext <<_ACEOF
21211/* end confdefs.h. */
21212#include <time.h>
21213
21214int
21215main ()
21216{
21217#ifndef tzname
21218 (void) tzname;
21219#endif
21220
21221 ;
21222 return 0;
21223}
21224_ACEOF
21225rm -f conftest.$ac_objext
21226if { (ac_try="$ac_compile"
21227case "(($ac_try" in
21228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21229 *) ac_try_echo=$ac_try;;
21230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021232 (eval "$ac_compile") 2>conftest.er1
21233 ac_status=$?
21234 grep -v '^ *+' conftest.er1 >conftest.err
21235 rm -f conftest.er1
21236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238 (exit $ac_status); } && {
21239 test -z "$ac_c_werror_flag" ||
21240 test ! -s conftest.err
21241 } && test -s conftest.$ac_objext; then
21242 ac_cv_have_decl_tzname=yes
21243else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021244 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245sed 's/^/| /' conftest.$ac_ext >&5
21246
21247 ac_cv_have_decl_tzname=no
21248fi
21249
21250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21251fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021252{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21253echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21254if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021255
21256cat >>confdefs.h <<_ACEOF
21257#define HAVE_DECL_TZNAME 1
21258_ACEOF
21259
21260
21261else
21262 cat >>confdefs.h <<_ACEOF
21263#define HAVE_DECL_TZNAME 0
21264_ACEOF
21265
21266
21267fi
21268
21269
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021270 { echo "$as_me:$LINENO: checking for tzname" >&5
21271echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021272if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021273 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021274else
Martin v. Löwis11437992002-04-12 09:54:03 +000021275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021281#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021282#if !HAVE_DECL_TZNAME
21283extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021285
Martin v. Löwis11437992002-04-12 09:54:03 +000021286int
21287main ()
21288{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021289return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021290 ;
21291 return 0;
21292}
21293_ACEOF
21294rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295if { (ac_try="$ac_link"
21296case "(($ac_try" in
21297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21298 *) ac_try_echo=$ac_try;;
21299esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021303 grep -v '^ *+' conftest.er1 >conftest.err
21304 rm -f conftest.er1
21305 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307 (exit $ac_status); } && {
21308 test -z "$ac_c_werror_flag" ||
21309 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021310 } && test -s conftest$ac_exeext &&
21311 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021312 ac_cv_var_tzname=yes
21313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021315sed 's/^/| /' conftest.$ac_ext >&5
21316
Martin v. Löwiseba40652007-08-30 20:10:57 +000021317 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021319
21320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021321 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021322fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21324echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021325 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021326
21327cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021328#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021329_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021331 fi
21332fi
21333
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021334{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21335echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021336if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021337 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021338else
21339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021340/* confdefs.h. */
21341_ACEOF
21342cat confdefs.h >>conftest.$ac_ext
21343cat >>conftest.$ac_ext <<_ACEOF
21344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021346int
21347main ()
21348{
21349static struct stat ac_aggr;
21350if (ac_aggr.st_rdev)
21351return 0;
21352 ;
21353 return 0;
21354}
21355_ACEOF
21356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021357if { (ac_try="$ac_compile"
21358case "(($ac_try" in
21359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21360 *) ac_try_echo=$ac_try;;
21361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021365 grep -v '^ *+' conftest.er1 >conftest.err
21366 rm -f conftest.er1
21367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369 (exit $ac_status); } && {
21370 test -z "$ac_c_werror_flag" ||
21371 test ! -s conftest.err
21372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021373 ac_cv_member_struct_stat_st_rdev=yes
21374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021376sed 's/^/| /' conftest.$ac_ext >&5
21377
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
21384$ac_includes_default
21385int
21386main ()
21387{
21388static struct stat ac_aggr;
21389if (sizeof ac_aggr.st_rdev)
21390return 0;
21391 ;
21392 return 0;
21393}
21394_ACEOF
21395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396if { (ac_try="$ac_compile"
21397case "(($ac_try" in
21398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21399 *) ac_try_echo=$ac_try;;
21400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021404 grep -v '^ *+' conftest.er1 >conftest.err
21405 rm -f conftest.er1
21406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 (exit $ac_status); } && {
21409 test -z "$ac_c_werror_flag" ||
21410 test ! -s conftest.err
21411 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021412 ac_cv_member_struct_stat_st_rdev=yes
21413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021415sed 's/^/| /' conftest.$ac_ext >&5
21416
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021419
21420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021422
21423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021425{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21426echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21427if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021428
21429cat >>confdefs.h <<_ACEOF
21430#define HAVE_STRUCT_STAT_ST_RDEV 1
21431_ACEOF
21432
21433
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021434fi
21435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021436{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21437echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021438if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021440else
Martin v. Löwis11437992002-04-12 09:54:03 +000021441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021442/* confdefs.h. */
21443_ACEOF
21444cat confdefs.h >>conftest.$ac_ext
21445cat >>conftest.$ac_ext <<_ACEOF
21446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021447$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021448int
21449main ()
21450{
21451static struct stat ac_aggr;
21452if (ac_aggr.st_blksize)
21453return 0;
21454 ;
21455 return 0;
21456}
21457_ACEOF
21458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021459if { (ac_try="$ac_compile"
21460case "(($ac_try" in
21461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21462 *) ac_try_echo=$ac_try;;
21463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021467 grep -v '^ *+' conftest.er1 >conftest.err
21468 rm -f conftest.er1
21469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021471 (exit $ac_status); } && {
21472 test -z "$ac_c_werror_flag" ||
21473 test ! -s conftest.err
21474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021475 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021478sed 's/^/| /' conftest.$ac_ext >&5
21479
Martin v. Löwiseba40652007-08-30 20:10:57 +000021480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021481/* confdefs.h. */
21482_ACEOF
21483cat confdefs.h >>conftest.$ac_ext
21484cat >>conftest.$ac_ext <<_ACEOF
21485/* end confdefs.h. */
21486$ac_includes_default
21487int
21488main ()
21489{
21490static struct stat ac_aggr;
21491if (sizeof ac_aggr.st_blksize)
21492return 0;
21493 ;
21494 return 0;
21495}
21496_ACEOF
21497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021498if { (ac_try="$ac_compile"
21499case "(($ac_try" in
21500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21501 *) ac_try_echo=$ac_try;;
21502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021506 grep -v '^ *+' conftest.er1 >conftest.err
21507 rm -f conftest.er1
21508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 (exit $ac_status); } && {
21511 test -z "$ac_c_werror_flag" ||
21512 test ! -s conftest.err
21513 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021514 ac_cv_member_struct_stat_st_blksize=yes
21515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021517sed 's/^/| /' conftest.$ac_ext >&5
21518
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021521
21522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021524
21525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021526fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021527{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21528echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21529if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021530
Martin v. Löwis11437992002-04-12 09:54:03 +000021531cat >>confdefs.h <<_ACEOF
21532#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21533_ACEOF
21534
21535
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021536fi
21537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021538{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21539echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021540if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021541 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021542else
21543 cat >conftest.$ac_ext <<_ACEOF
21544/* confdefs.h. */
21545_ACEOF
21546cat confdefs.h >>conftest.$ac_ext
21547cat >>conftest.$ac_ext <<_ACEOF
21548/* end confdefs.h. */
21549$ac_includes_default
21550int
21551main ()
21552{
21553static struct stat ac_aggr;
21554if (ac_aggr.st_flags)
21555return 0;
21556 ;
21557 return 0;
21558}
21559_ACEOF
21560rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021561if { (ac_try="$ac_compile"
21562case "(($ac_try" in
21563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21564 *) ac_try_echo=$ac_try;;
21565esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021567 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021568 ac_status=$?
21569 grep -v '^ *+' conftest.er1 >conftest.err
21570 rm -f conftest.er1
21571 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021573 (exit $ac_status); } && {
21574 test -z "$ac_c_werror_flag" ||
21575 test ! -s conftest.err
21576 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021577 ac_cv_member_struct_stat_st_flags=yes
21578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021579 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021580sed 's/^/| /' conftest.$ac_ext >&5
21581
Martin v. Löwiseba40652007-08-30 20:10:57 +000021582 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
21588$ac_includes_default
21589int
21590main ()
21591{
21592static struct stat ac_aggr;
21593if (sizeof ac_aggr.st_flags)
21594return 0;
21595 ;
21596 return 0;
21597}
21598_ACEOF
21599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600if { (ac_try="$ac_compile"
21601case "(($ac_try" in
21602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21603 *) ac_try_echo=$ac_try;;
21604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021606 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021607 ac_status=$?
21608 grep -v '^ *+' conftest.er1 >conftest.err
21609 rm -f conftest.er1
21610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 (exit $ac_status); } && {
21613 test -z "$ac_c_werror_flag" ||
21614 test ! -s conftest.err
21615 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021616 ac_cv_member_struct_stat_st_flags=yes
21617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021618 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021619sed 's/^/| /' conftest.$ac_ext >&5
21620
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623
21624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021626
21627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021628fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21630echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21631if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021632
21633cat >>confdefs.h <<_ACEOF
21634#define HAVE_STRUCT_STAT_ST_FLAGS 1
21635_ACEOF
21636
21637
21638fi
21639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021640{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21641echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021642if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021643 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021644else
21645 cat >conftest.$ac_ext <<_ACEOF
21646/* confdefs.h. */
21647_ACEOF
21648cat confdefs.h >>conftest.$ac_ext
21649cat >>conftest.$ac_ext <<_ACEOF
21650/* end confdefs.h. */
21651$ac_includes_default
21652int
21653main ()
21654{
21655static struct stat ac_aggr;
21656if (ac_aggr.st_gen)
21657return 0;
21658 ;
21659 return 0;
21660}
21661_ACEOF
21662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021663if { (ac_try="$ac_compile"
21664case "(($ac_try" in
21665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21666 *) ac_try_echo=$ac_try;;
21667esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021670 ac_status=$?
21671 grep -v '^ *+' conftest.er1 >conftest.err
21672 rm -f conftest.er1
21673 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675 (exit $ac_status); } && {
21676 test -z "$ac_c_werror_flag" ||
21677 test ! -s conftest.err
21678 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021679 ac_cv_member_struct_stat_st_gen=yes
21680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021681 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021682sed 's/^/| /' conftest.$ac_ext >&5
21683
Martin v. Löwiseba40652007-08-30 20:10:57 +000021684 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021685/* confdefs.h. */
21686_ACEOF
21687cat confdefs.h >>conftest.$ac_ext
21688cat >>conftest.$ac_ext <<_ACEOF
21689/* end confdefs.h. */
21690$ac_includes_default
21691int
21692main ()
21693{
21694static struct stat ac_aggr;
21695if (sizeof ac_aggr.st_gen)
21696return 0;
21697 ;
21698 return 0;
21699}
21700_ACEOF
21701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021702if { (ac_try="$ac_compile"
21703case "(($ac_try" in
21704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705 *) ac_try_echo=$ac_try;;
21706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021709 ac_status=$?
21710 grep -v '^ *+' conftest.er1 >conftest.err
21711 rm -f conftest.er1
21712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714 (exit $ac_status); } && {
21715 test -z "$ac_c_werror_flag" ||
21716 test ! -s conftest.err
21717 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021718 ac_cv_member_struct_stat_st_gen=yes
21719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021721sed 's/^/| /' conftest.$ac_ext >&5
21722
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021725
21726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021728
21729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021730fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021731{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21732echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21733if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021734
21735cat >>confdefs.h <<_ACEOF
21736#define HAVE_STRUCT_STAT_ST_GEN 1
21737_ACEOF
21738
21739
21740fi
21741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021742{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21743echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021744if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021745 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021746else
21747 cat >conftest.$ac_ext <<_ACEOF
21748/* confdefs.h. */
21749_ACEOF
21750cat confdefs.h >>conftest.$ac_ext
21751cat >>conftest.$ac_ext <<_ACEOF
21752/* end confdefs.h. */
21753$ac_includes_default
21754int
21755main ()
21756{
21757static struct stat ac_aggr;
21758if (ac_aggr.st_birthtime)
21759return 0;
21760 ;
21761 return 0;
21762}
21763_ACEOF
21764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021765if { (ac_try="$ac_compile"
21766case "(($ac_try" in
21767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21768 *) ac_try_echo=$ac_try;;
21769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021772 ac_status=$?
21773 grep -v '^ *+' conftest.er1 >conftest.err
21774 rm -f conftest.er1
21775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777 (exit $ac_status); } && {
21778 test -z "$ac_c_werror_flag" ||
21779 test ! -s conftest.err
21780 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021781 ac_cv_member_struct_stat_st_birthtime=yes
21782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021783 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021784sed 's/^/| /' conftest.$ac_ext >&5
21785
Martin v. Löwiseba40652007-08-30 20:10:57 +000021786 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021787/* confdefs.h. */
21788_ACEOF
21789cat confdefs.h >>conftest.$ac_ext
21790cat >>conftest.$ac_ext <<_ACEOF
21791/* end confdefs.h. */
21792$ac_includes_default
21793int
21794main ()
21795{
21796static struct stat ac_aggr;
21797if (sizeof ac_aggr.st_birthtime)
21798return 0;
21799 ;
21800 return 0;
21801}
21802_ACEOF
21803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021804if { (ac_try="$ac_compile"
21805case "(($ac_try" in
21806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21807 *) ac_try_echo=$ac_try;;
21808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021810 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021811 ac_status=$?
21812 grep -v '^ *+' conftest.er1 >conftest.err
21813 rm -f conftest.er1
21814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816 (exit $ac_status); } && {
21817 test -z "$ac_c_werror_flag" ||
21818 test ! -s conftest.err
21819 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021820 ac_cv_member_struct_stat_st_birthtime=yes
21821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021822 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021823sed 's/^/| /' conftest.$ac_ext >&5
21824
Martin v. Löwiseba40652007-08-30 20:10:57 +000021825 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021827
21828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830
21831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021832fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021833{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21834echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21835if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021836
21837cat >>confdefs.h <<_ACEOF
21838#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21839_ACEOF
21840
21841
21842fi
21843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021844{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21845echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021846if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021848else
Martin v. Löwis11437992002-04-12 09:54:03 +000021849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021850/* confdefs.h. */
21851_ACEOF
21852cat confdefs.h >>conftest.$ac_ext
21853cat >>conftest.$ac_ext <<_ACEOF
21854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021856int
21857main ()
21858{
21859static struct stat ac_aggr;
21860if (ac_aggr.st_blocks)
21861return 0;
21862 ;
21863 return 0;
21864}
21865_ACEOF
21866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867if { (ac_try="$ac_compile"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021875 grep -v '^ *+' conftest.er1 >conftest.err
21876 rm -f conftest.er1
21877 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879 (exit $ac_status); } && {
21880 test -z "$ac_c_werror_flag" ||
21881 test ! -s conftest.err
21882 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021883 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021886sed 's/^/| /' conftest.$ac_ext >&5
21887
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021889/* confdefs.h. */
21890_ACEOF
21891cat confdefs.h >>conftest.$ac_ext
21892cat >>conftest.$ac_ext <<_ACEOF
21893/* end confdefs.h. */
21894$ac_includes_default
21895int
21896main ()
21897{
21898static struct stat ac_aggr;
21899if (sizeof ac_aggr.st_blocks)
21900return 0;
21901 ;
21902 return 0;
21903}
21904_ACEOF
21905rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906if { (ac_try="$ac_compile"
21907case "(($ac_try" in
21908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21909 *) ac_try_echo=$ac_try;;
21910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021914 grep -v '^ *+' conftest.er1 >conftest.err
21915 rm -f conftest.er1
21916 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021918 (exit $ac_status); } && {
21919 test -z "$ac_c_werror_flag" ||
21920 test ! -s conftest.err
21921 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021922 ac_cv_member_struct_stat_st_blocks=yes
21923else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021925sed 's/^/| /' conftest.$ac_ext >&5
21926
Martin v. Löwiseba40652007-08-30 20:10:57 +000021927 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021929
21930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021931fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932
21933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021935{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21936echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21937if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021938
Martin v. Löwis11437992002-04-12 09:54:03 +000021939cat >>confdefs.h <<_ACEOF
21940#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21941_ACEOF
21942
21943
21944cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021945#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021946_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021947
21948else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021949 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021950 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021951 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21952 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021953esac
21954
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021955fi
21956
Michael W. Hudson54241132001-12-07 15:38:26 +000021957
Martin v. Löwis11437992002-04-12 09:54:03 +000021958
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021959{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21960echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021961if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021962 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021963else
Martin v. Löwis11437992002-04-12 09:54:03 +000021964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021965/* confdefs.h. */
21966_ACEOF
21967cat confdefs.h >>conftest.$ac_ext
21968cat >>conftest.$ac_ext <<_ACEOF
21969/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021970#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021971int
21972main ()
21973{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021974return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021975 ;
21976 return 0;
21977}
21978_ACEOF
21979rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021980if { (ac_try="$ac_compile"
21981case "(($ac_try" in
21982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21983 *) ac_try_echo=$ac_try;;
21984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021986 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021988 grep -v '^ *+' conftest.er1 >conftest.err
21989 rm -f conftest.er1
21990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992 (exit $ac_status); } && {
21993 test -z "$ac_c_werror_flag" ||
21994 test ! -s conftest.err
21995 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021996 ac_cv_header_time_altzone=yes
21997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021999sed 's/^/| /' conftest.$ac_ext >&5
22000
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022002fi
22003
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22005fi
22006
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022007{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22008echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022009if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022010
22011cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022012#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022013_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022014
22015fi
22016
Guido van Rossumda88dad1995-01-26 00:46:29 +000022017was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022018{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22019echo $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 +000022020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022021/* confdefs.h. */
22022_ACEOF
22023cat confdefs.h >>conftest.$ac_ext
22024cat >>conftest.$ac_ext <<_ACEOF
22025/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022026
22027#include <sys/types.h>
22028#include <sys/select.h>
22029#include <sys/time.h>
22030
Martin v. Löwis11437992002-04-12 09:54:03 +000022031int
22032main ()
22033{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022034;
Martin v. Löwis11437992002-04-12 09:54:03 +000022035 ;
22036 return 0;
22037}
22038_ACEOF
22039rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040if { (ac_try="$ac_compile"
22041case "(($ac_try" in
22042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22043 *) ac_try_echo=$ac_try;;
22044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022048 grep -v '^ *+' conftest.er1 >conftest.err
22049 rm -f conftest.er1
22050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022052 (exit $ac_status); } && {
22053 test -z "$ac_c_werror_flag" ||
22054 test ! -s conftest.err
22055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022056
22057
22058cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022059#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022060_ACEOF
22061
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022062 was_it_defined=yes
22063
Guido van Rossumf78abae1997-01-21 22:02:36 +000022064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022066sed 's/^/| /' conftest.$ac_ext >&5
22067
Brett Cannon19fab762007-06-02 03:02:29 +000022068
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069fi
22070
22071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022072{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22073echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022074
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022075{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22076echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022077if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022079else
Martin v. Löwis11437992002-04-12 09:54:03 +000022080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022081/* confdefs.h. */
22082_ACEOF
22083cat confdefs.h >>conftest.$ac_ext
22084cat >>conftest.$ac_ext <<_ACEOF
22085/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022086
22087# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022088int
22089main ()
22090{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022091struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022092 ;
22093 return 0;
22094}
22095_ACEOF
22096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022097if { (ac_try="$ac_compile"
22098case "(($ac_try" in
22099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22100 *) ac_try_echo=$ac_try;;
22101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022105 grep -v '^ *+' conftest.er1 >conftest.err
22106 rm -f conftest.er1
22107 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109 (exit $ac_status); } && {
22110 test -z "$ac_c_werror_flag" ||
22111 test ! -s conftest.err
22112 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022113 ac_cv_struct_addrinfo=yes
22114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022116sed 's/^/| /' conftest.$ac_ext >&5
22117
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022119fi
22120
Martin v. Löwiseba40652007-08-30 20:10:57 +000022121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22122fi
22123
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022124{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22125echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022126if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022127
22128cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022129#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022130_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022131
22132fi
22133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022134{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22135echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022136if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022137 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022138else
Martin v. Löwis11437992002-04-12 09:54:03 +000022139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022140/* confdefs.h. */
22141_ACEOF
22142cat confdefs.h >>conftest.$ac_ext
22143cat >>conftest.$ac_ext <<_ACEOF
22144/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022145
22146# include <sys/types.h>
22147# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022148int
22149main ()
22150{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022151struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 ;
22153 return 0;
22154}
22155_ACEOF
22156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157if { (ac_try="$ac_compile"
22158case "(($ac_try" in
22159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22160 *) ac_try_echo=$ac_try;;
22161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022165 grep -v '^ *+' conftest.er1 >conftest.err
22166 rm -f conftest.er1
22167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169 (exit $ac_status); } && {
22170 test -z "$ac_c_werror_flag" ||
22171 test ! -s conftest.err
22172 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022173 ac_cv_struct_sockaddr_storage=yes
22174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022176sed 's/^/| /' conftest.$ac_ext >&5
22177
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022179fi
22180
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22182fi
22183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022184{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22185echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022186if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022187
22188cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022189#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022190_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022191
22192fi
22193
Guido van Rossum627b2d71993-12-24 10:39:16 +000022194# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022195
Michael W. Hudson54241132001-12-07 15:38:26 +000022196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022197{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22198echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022199if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022200 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022201else
Martin v. Löwis11437992002-04-12 09:54:03 +000022202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022203/* confdefs.h. */
22204_ACEOF
22205cat confdefs.h >>conftest.$ac_ext
22206cat >>conftest.$ac_ext <<_ACEOF
22207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022209int
22210main ()
22211{
22212static int test_array [1 - 2 * !(((char) -1) < 0)];
22213test_array [0] = 0
22214
22215 ;
22216 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022217}
Martin v. Löwis11437992002-04-12 09:54:03 +000022218_ACEOF
22219rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220if { (ac_try="$ac_compile"
22221case "(($ac_try" in
22222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22223 *) ac_try_echo=$ac_try;;
22224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022226 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022227 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022228 grep -v '^ *+' conftest.er1 >conftest.err
22229 rm -f conftest.er1
22230 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022232 (exit $ac_status); } && {
22233 test -z "$ac_c_werror_flag" ||
22234 test ! -s conftest.err
22235 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022236 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022237else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022239sed 's/^/| /' conftest.$ac_ext >&5
22240
Martin v. Löwiseba40652007-08-30 20:10:57 +000022241 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022243
22244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022245fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022246{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22247echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022248if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022249 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022250#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022251_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022252
22253fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022254
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022255{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22256echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022257if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022259else
22260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022261/* confdefs.h. */
22262_ACEOF
22263cat confdefs.h >>conftest.$ac_ext
22264cat >>conftest.$ac_ext <<_ACEOF
22265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022266
Martin v. Löwis11437992002-04-12 09:54:03 +000022267int
22268main ()
22269{
22270/* FIXME: Include the comments suggested by Paul. */
22271#ifndef __cplusplus
22272 /* Ultrix mips cc rejects this. */
22273 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022276 char const *const *pcpcc;
22277 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022278 /* NEC SVR4.0.2 mips cc rejects this. */
22279 struct point {int x, y;};
22280 static struct point const zero = {0,0};
22281 /* AIX XL C 1.02.0.0 rejects this.
22282 It does not let you subtract one const X* pointer from another in
22283 an arm of an if-expression whose if-part is not a constant
22284 expression */
22285 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022287 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288 ++pcpcc;
22289 ppc = (char**) pcpcc;
22290 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022291 { /* SCO 3.2v4 cc rejects this. */
22292 char *t;
22293 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022294
Martin v. Löwis11437992002-04-12 09:54:03 +000022295 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 }
22298 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22299 int x[] = {25, 17};
22300 const int *foo = &x[0];
22301 ++foo;
22302 }
22303 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22304 typedef const int *iptr;
22305 iptr p = 0;
22306 ++p;
22307 }
22308 { /* AIX XL C 1.02.0.0 rejects this saying
22309 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22310 struct s { int j; const int *ap[3]; };
22311 struct s *b; b->j = 5;
22312 }
22313 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22314 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022318#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022319
Martin v. Löwis11437992002-04-12 09:54:03 +000022320 ;
22321 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022322}
Martin v. Löwis11437992002-04-12 09:54:03 +000022323_ACEOF
22324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325if { (ac_try="$ac_compile"
22326case "(($ac_try" in
22327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22328 *) ac_try_echo=$ac_try;;
22329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022333 grep -v '^ *+' conftest.er1 >conftest.err
22334 rm -f conftest.er1
22335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337 (exit $ac_status); } && {
22338 test -z "$ac_c_werror_flag" ||
22339 test ! -s conftest.err
22340 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022341 ac_cv_c_const=yes
22342else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022344sed 's/^/| /' conftest.$ac_ext >&5
22345
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348
22349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022350fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022351{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22352echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022353if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022354
22355cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022356#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022357_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022358
22359fi
22360
Michael W. Hudson54241132001-12-07 15:38:26 +000022361
Guido van Rossumda88dad1995-01-26 00:46:29 +000022362works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022363{ echo "$as_me:$LINENO: checking for working volatile" >&5
22364echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022366/* confdefs.h. */
22367_ACEOF
22368cat confdefs.h >>conftest.$ac_ext
22369cat >>conftest.$ac_ext <<_ACEOF
22370/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022371
Martin v. Löwis11437992002-04-12 09:54:03 +000022372int
22373main ()
22374{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022375volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022376 ;
22377 return 0;
22378}
22379_ACEOF
22380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381if { (ac_try="$ac_compile"
22382case "(($ac_try" in
22383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22384 *) ac_try_echo=$ac_try;;
22385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022389 grep -v '^ *+' conftest.er1 >conftest.err
22390 rm -f conftest.er1
22391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022393 (exit $ac_status); } && {
22394 test -z "$ac_c_werror_flag" ||
22395 test ! -s conftest.err
22396 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022397 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022400sed 's/^/| /' conftest.$ac_ext >&5
22401
Martin v. Löwis11437992002-04-12 09:54:03 +000022402
22403cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022404#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022405_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022406
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022407
Guido van Rossum627b2d71993-12-24 10:39:16 +000022408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022409
22410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022411{ echo "$as_me:$LINENO: result: $works" >&5
22412echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022413
Guido van Rossumda88dad1995-01-26 00:46:29 +000022414works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022415{ echo "$as_me:$LINENO: checking for working signed char" >&5
22416echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022417cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022418/* confdefs.h. */
22419_ACEOF
22420cat confdefs.h >>conftest.$ac_ext
22421cat >>conftest.$ac_ext <<_ACEOF
22422/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022423
Martin v. Löwis11437992002-04-12 09:54:03 +000022424int
22425main ()
22426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022428 ;
22429 return 0;
22430}
22431_ACEOF
22432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433if { (ac_try="$ac_compile"
22434case "(($ac_try" in
22435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22436 *) ac_try_echo=$ac_try;;
22437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022441 grep -v '^ *+' conftest.er1 >conftest.err
22442 rm -f conftest.er1
22443 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445 (exit $ac_status); } && {
22446 test -z "$ac_c_werror_flag" ||
22447 test ! -s conftest.err
22448 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022449 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022452sed 's/^/| /' conftest.$ac_ext >&5
22453
Martin v. Löwis11437992002-04-12 09:54:03 +000022454
22455cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022456#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022457_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022459
Guido van Rossum7f43da71994-08-01 12:15:30 +000022460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461
22462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022463{ echo "$as_me:$LINENO: result: $works" >&5
22464echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022465
Guido van Rossumda88dad1995-01-26 00:46:29 +000022466have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022467{ echo "$as_me:$LINENO: checking for prototypes" >&5
22468echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022470/* confdefs.h. */
22471_ACEOF
22472cat confdefs.h >>conftest.$ac_ext
22473cat >>conftest.$ac_ext <<_ACEOF
22474/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022475int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022476int
22477main ()
22478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022479return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022480 ;
22481 return 0;
22482}
22483_ACEOF
22484rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022485if { (ac_try="$ac_compile"
22486case "(($ac_try" in
22487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22488 *) ac_try_echo=$ac_try;;
22489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022493 grep -v '^ *+' conftest.er1 >conftest.err
22494 rm -f conftest.er1
22495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022497 (exit $ac_status); } && {
22498 test -z "$ac_c_werror_flag" ||
22499 test ! -s conftest.err
22500 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022501
22502
22503cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022504#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022505_ACEOF
22506
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022507 have_prototypes=yes
22508
Guido van Rossumf78abae1997-01-21 22:02:36 +000022509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022511sed 's/^/| /' conftest.$ac_ext >&5
22512
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513
Guido van Rossum7f43da71994-08-01 12:15:30 +000022514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022515
22516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022517{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22518echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022519
Guido van Rossumda88dad1995-01-26 00:46:29 +000022520works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022521{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22522echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022524/* confdefs.h. */
22525_ACEOF
22526cat confdefs.h >>conftest.$ac_ext
22527cat >>conftest.$ac_ext <<_ACEOF
22528/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022529
22530#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022531int foo(int x, ...) {
22532 va_list va;
22533 va_start(va, x);
22534 va_arg(va, int);
22535 va_arg(va, char *);
22536 va_arg(va, double);
22537 return 0;
22538}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022539
Martin v. Löwis11437992002-04-12 09:54:03 +000022540int
22541main ()
22542{
Guido van Rossum90eea071996-08-30 20:58:57 +000022543return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 ;
22545 return 0;
22546}
22547_ACEOF
22548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549if { (ac_try="$ac_compile"
22550case "(($ac_try" in
22551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22552 *) ac_try_echo=$ac_try;;
22553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022557 grep -v '^ *+' conftest.er1 >conftest.err
22558 rm -f conftest.er1
22559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022561 (exit $ac_status); } && {
22562 test -z "$ac_c_werror_flag" ||
22563 test ! -s conftest.err
22564 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022565
22566
22567cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022568#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022569_ACEOF
22570
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022571 works=yes
22572
Guido van Rossumf78abae1997-01-21 22:02:36 +000022573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022575sed 's/^/| /' conftest.$ac_ext >&5
22576
Martin v. Löwiseba40652007-08-30 20:10:57 +000022577
Guido van Rossum627b2d71993-12-24 10:39:16 +000022578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579
22580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022581{ echo "$as_me:$LINENO: result: $works" >&5
22582echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022583
Martin v. Löwisd6320502004-08-12 13:45:08 +000022584# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022585{ echo "$as_me:$LINENO: checking for socketpair" >&5
22586echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022587cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022588/* confdefs.h. */
22589_ACEOF
22590cat confdefs.h >>conftest.$ac_ext
22591cat >>conftest.$ac_ext <<_ACEOF
22592/* end confdefs.h. */
22593
22594#include <sys/types.h>
22595#include <sys/socket.h>
22596
22597int
22598main ()
22599{
22600void *x=socketpair
22601 ;
22602 return 0;
22603}
22604_ACEOF
22605rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606if { (ac_try="$ac_compile"
22607case "(($ac_try" in
22608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22609 *) ac_try_echo=$ac_try;;
22610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022614 grep -v '^ *+' conftest.er1 >conftest.err
22615 rm -f conftest.er1
22616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618 (exit $ac_status); } && {
22619 test -z "$ac_c_werror_flag" ||
22620 test ! -s conftest.err
22621 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022622
22623cat >>confdefs.h <<\_ACEOF
22624#define HAVE_SOCKETPAIR 1
22625_ACEOF
22626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022627 { echo "$as_me:$LINENO: result: yes" >&5
22628echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022630 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022631sed 's/^/| /' conftest.$ac_ext >&5
22632
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022633 { echo "$as_me:$LINENO: result: no" >&5
22634echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022635
22636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022637
22638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022639
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022640# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022641{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22642echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022644/* confdefs.h. */
22645_ACEOF
22646cat confdefs.h >>conftest.$ac_ext
22647cat >>conftest.$ac_ext <<_ACEOF
22648/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022649#include <sys/types.h>
22650#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022651int
22652main ()
22653{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022654struct sockaddr x;
22655x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022656 ;
22657 return 0;
22658}
22659_ACEOF
22660rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022661if { (ac_try="$ac_compile"
22662case "(($ac_try" in
22663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22664 *) ac_try_echo=$ac_try;;
22665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022667 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022669 grep -v '^ *+' conftest.er1 >conftest.err
22670 rm -f conftest.er1
22671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673 (exit $ac_status); } && {
22674 test -z "$ac_c_werror_flag" ||
22675 test ! -s conftest.err
22676 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022677 { echo "$as_me:$LINENO: result: yes" >&5
22678echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022679
22680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022681#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022682_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022683
22684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022686sed 's/^/| /' conftest.$ac_ext >&5
22687
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022688 { echo "$as_me:$LINENO: result: no" >&5
22689echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691
22692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022693
Guido van Rossumda88dad1995-01-26 00:46:29 +000022694va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022695{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22696echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022698/* confdefs.h. */
22699_ACEOF
22700cat confdefs.h >>conftest.$ac_ext
22701cat >>conftest.$ac_ext <<_ACEOF
22702/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022703
22704#ifdef HAVE_STDARG_PROTOTYPES
22705#include <stdarg.h>
22706#else
22707#include <varargs.h>
22708#endif
22709
Martin v. Löwis11437992002-04-12 09:54:03 +000022710int
22711main ()
22712{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022713va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022714 ;
22715 return 0;
22716}
22717_ACEOF
22718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022719if { (ac_try="$ac_compile"
22720case "(($ac_try" in
22721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22722 *) ac_try_echo=$ac_try;;
22723esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022727 grep -v '^ *+' conftest.er1 >conftest.err
22728 rm -f conftest.er1
22729 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022731 (exit $ac_status); } && {
22732 test -z "$ac_c_werror_flag" ||
22733 test ! -s conftest.err
22734 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022735 :
22736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022738sed 's/^/| /' conftest.$ac_ext >&5
22739
Martin v. Löwis11437992002-04-12 09:54:03 +000022740
22741
22742cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022743#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022744_ACEOF
22745
Guido van Rossumda88dad1995-01-26 00:46:29 +000022746 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022749
22750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022751{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22752echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022753
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022754# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022755
22756
22757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022758{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22759echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022760if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022762else
Martin v. Löwis11437992002-04-12 09:54:03 +000022763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022764/* confdefs.h. */
22765_ACEOF
22766cat confdefs.h >>conftest.$ac_ext
22767cat >>conftest.$ac_ext <<_ACEOF
22768/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022769/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22770 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22771#define gethostbyname_r innocuous_gethostbyname_r
22772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022773/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022774 which can conflict with char gethostbyname_r (); below.
22775 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022776 <limits.h> exists even on freestanding compilers. */
22777
22778#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022779# include <limits.h>
22780#else
22781# include <assert.h>
22782#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022783
22784#undef gethostbyname_r
22785
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786/* Override any GCC internal prototype to avoid an error.
22787 Use char because int might match the return type of a GCC
22788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022789#ifdef __cplusplus
22790extern "C"
22791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022792char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022793/* The GNU C library defines this for functions which it implements
22794 to always fail with ENOSYS. Some functions are actually named
22795 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022797choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022798#endif
22799
Skip Montanaro6dead952003-09-25 14:50:04 +000022800int
22801main ()
22802{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022804 ;
22805 return 0;
22806}
22807_ACEOF
22808rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022809if { (ac_try="$ac_link"
22810case "(($ac_try" in
22811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22812 *) ac_try_echo=$ac_try;;
22813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022815 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022817 grep -v '^ *+' conftest.er1 >conftest.err
22818 rm -f conftest.er1
22819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821 (exit $ac_status); } && {
22822 test -z "$ac_c_werror_flag" ||
22823 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022824 } && test -s conftest$ac_exeext &&
22825 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022826 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022829sed 's/^/| /' conftest.$ac_ext >&5
22830
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022833
22834rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022835 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022837{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22838echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22839if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022840
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022842#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022843_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022845 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22846echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022847 OLD_CFLAGS=$CFLAGS
22848 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022850/* confdefs.h. */
22851_ACEOF
22852cat confdefs.h >>conftest.$ac_ext
22853cat >>conftest.$ac_ext <<_ACEOF
22854/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022855
22856# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022857
Martin v. Löwis11437992002-04-12 09:54:03 +000022858int
22859main ()
22860{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022861
22862 char *name;
22863 struct hostent *he, *res;
22864 char buffer[2048];
22865 int buflen = 2048;
22866 int h_errnop;
22867
22868 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
22870 ;
22871 return 0;
22872}
22873_ACEOF
22874rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875if { (ac_try="$ac_compile"
22876case "(($ac_try" in
22877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22878 *) ac_try_echo=$ac_try;;
22879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022883 grep -v '^ *+' conftest.er1 >conftest.err
22884 rm -f conftest.er1
22885 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022887 (exit $ac_status); } && {
22888 test -z "$ac_c_werror_flag" ||
22889 test ! -s conftest.err
22890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
22892 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022893#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022894_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022895
Martin v. Löwis11437992002-04-12 09:54:03 +000022896
22897cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022898#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022899_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901 { echo "$as_me:$LINENO: result: yes" >&5
22902echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022906sed 's/^/| /' conftest.$ac_ext >&5
22907
Martin v. Löwis11437992002-04-12 09:54:03 +000022908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022909 { echo "$as_me:$LINENO: result: no" >&5
22910echo "${ECHO_T}no" >&6; }
22911 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22912echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022914/* confdefs.h. */
22915_ACEOF
22916cat confdefs.h >>conftest.$ac_ext
22917cat >>conftest.$ac_ext <<_ACEOF
22918/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022919
22920# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022921
Martin v. Löwis11437992002-04-12 09:54:03 +000022922int
22923main ()
22924{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022925
22926 char *name;
22927 struct hostent *he;
22928 char buffer[2048];
22929 int buflen = 2048;
22930 int h_errnop;
22931
22932 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022933
22934 ;
22935 return 0;
22936}
22937_ACEOF
22938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022939if { (ac_try="$ac_compile"
22940case "(($ac_try" in
22941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22942 *) ac_try_echo=$ac_try;;
22943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022947 grep -v '^ *+' conftest.er1 >conftest.err
22948 rm -f conftest.er1
22949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022951 (exit $ac_status); } && {
22952 test -z "$ac_c_werror_flag" ||
22953 test ! -s conftest.err
22954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022955
22956 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022957#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022958_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022959
Martin v. Löwis11437992002-04-12 09:54:03 +000022960
22961cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022962#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022963_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022964
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022965 { echo "$as_me:$LINENO: result: yes" >&5
22966echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022970sed 's/^/| /' conftest.$ac_ext >&5
22971
Martin v. Löwis11437992002-04-12 09:54:03 +000022972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022973 { echo "$as_me:$LINENO: result: no" >&5
22974echo "${ECHO_T}no" >&6; }
22975 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22976echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022983
22984# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022985
Martin v. Löwis11437992002-04-12 09:54:03 +000022986int
22987main ()
22988{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022989
22990 char *name;
22991 struct hostent *he;
22992 struct hostent_data data;
22993
22994 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022995
22996 ;
22997 return 0;
22998}
22999_ACEOF
23000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023001if { (ac_try="$ac_compile"
23002case "(($ac_try" in
23003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23004 *) ac_try_echo=$ac_try;;
23005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023009 grep -v '^ *+' conftest.er1 >conftest.err
23010 rm -f conftest.er1
23011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023013 (exit $ac_status); } && {
23014 test -z "$ac_c_werror_flag" ||
23015 test ! -s conftest.err
23016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023017
23018 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023019#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023020_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023021
Martin v. Löwis11437992002-04-12 09:54:03 +000023022
23023cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023024#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023025_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023027 { echo "$as_me:$LINENO: result: yes" >&5
23028echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023032sed 's/^/| /' conftest.$ac_ext >&5
23033
Martin v. Löwis11437992002-04-12 09:54:03 +000023034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023035 { echo "$as_me:$LINENO: result: no" >&5
23036echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023039
23040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023041
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043
23044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023045
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023047
23048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023049 CFLAGS=$OLD_CFLAGS
23050
23051else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023052
Martin v. Löwis11437992002-04-12 09:54:03 +000023053
23054for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023055do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023056as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23057{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23058echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023060 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023061else
Martin v. Löwis11437992002-04-12 09:54:03 +000023062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023063/* confdefs.h. */
23064_ACEOF
23065cat confdefs.h >>conftest.$ac_ext
23066cat >>conftest.$ac_ext <<_ACEOF
23067/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023068/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23069 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23070#define $ac_func innocuous_$ac_func
23071
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023072/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023073 which can conflict with char $ac_func (); below.
23074 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023075 <limits.h> exists even on freestanding compilers. */
23076
23077#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023078# include <limits.h>
23079#else
23080# include <assert.h>
23081#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023082
23083#undef $ac_func
23084
Martin v. Löwiseba40652007-08-30 20:10:57 +000023085/* Override any GCC internal prototype to avoid an error.
23086 Use char because int might match the return type of a GCC
23087 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023088#ifdef __cplusplus
23089extern "C"
23090#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023091char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023092/* The GNU C library defines this for functions which it implements
23093 to always fail with ENOSYS. Some functions are actually named
23094 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023095#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023096choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023097#endif
23098
Skip Montanaro6dead952003-09-25 14:50:04 +000023099int
23100main ()
23101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023102return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023103 ;
23104 return 0;
23105}
23106_ACEOF
23107rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108if { (ac_try="$ac_link"
23109case "(($ac_try" in
23110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23111 *) ac_try_echo=$ac_try;;
23112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023116 grep -v '^ *+' conftest.er1 >conftest.err
23117 rm -f conftest.er1
23118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023120 (exit $ac_status); } && {
23121 test -z "$ac_c_werror_flag" ||
23122 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023123 } && test -s conftest$ac_exeext &&
23124 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023125 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023128sed 's/^/| /' conftest.$ac_ext >&5
23129
Martin v. Löwiseba40652007-08-30 20:10:57 +000023130 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132
23133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023134 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023136ac_res=`eval echo '${'$as_ac_var'}'`
23137 { echo "$as_me:$LINENO: result: $ac_res" >&5
23138echo "${ECHO_T}$ac_res" >&6; }
23139if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023140 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023142_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023143
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023144fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023145done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023146
Michael W. Hudson54241132001-12-07 15:38:26 +000023147
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023148fi
23149
Michael W. Hudson54241132001-12-07 15:38:26 +000023150
23151
23152
23153
23154
23155
Guido van Rossum627b2d71993-12-24 10:39:16 +000023156# checks for system services
23157# (none yet)
23158
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023159# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023160{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23161echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023162if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023163 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023164else
Martin v. Löwis11437992002-04-12 09:54:03 +000023165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023166/* confdefs.h. */
23167_ACEOF
23168cat confdefs.h >>conftest.$ac_ext
23169cat >>conftest.$ac_ext <<_ACEOF
23170/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023171/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23172 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23173#define __fpu_control innocuous___fpu_control
23174
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023175/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023176 which can conflict with char __fpu_control (); below.
23177 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023178 <limits.h> exists even on freestanding compilers. */
23179
23180#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023181# include <limits.h>
23182#else
23183# include <assert.h>
23184#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023185
23186#undef __fpu_control
23187
Martin v. Löwiseba40652007-08-30 20:10:57 +000023188/* Override any GCC internal prototype to avoid an error.
23189 Use char because int might match the return type of a GCC
23190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023191#ifdef __cplusplus
23192extern "C"
23193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023194char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023195/* The GNU C library defines this for functions which it implements
23196 to always fail with ENOSYS. Some functions are actually named
23197 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023198#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023199choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023200#endif
23201
Skip Montanaro6dead952003-09-25 14:50:04 +000023202int
23203main ()
23204{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023205return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023206 ;
23207 return 0;
23208}
23209_ACEOF
23210rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023211if { (ac_try="$ac_link"
23212case "(($ac_try" in
23213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23214 *) ac_try_echo=$ac_try;;
23215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023217 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023219 grep -v '^ *+' conftest.er1 >conftest.err
23220 rm -f conftest.er1
23221 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223 (exit $ac_status); } && {
23224 test -z "$ac_c_werror_flag" ||
23225 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023226 } && test -s conftest$ac_exeext &&
23227 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023228 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023231sed 's/^/| /' conftest.$ac_ext >&5
23232
Martin v. Löwiseba40652007-08-30 20:10:57 +000023233 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235
23236rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023237 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023239{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23240echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23241if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023242 :
23243else
Martin v. Löwis11437992002-04-12 09:54:03 +000023244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023245{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23246echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023247if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023249else
Martin v. Löwis11437992002-04-12 09:54:03 +000023250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023251LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023253/* confdefs.h. */
23254_ACEOF
23255cat confdefs.h >>conftest.$ac_ext
23256cat >>conftest.$ac_ext <<_ACEOF
23257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023258
Martin v. Löwiseba40652007-08-30 20:10:57 +000023259/* Override any GCC internal prototype to avoid an error.
23260 Use char because int might match the return type of a GCC
23261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023262#ifdef __cplusplus
23263extern "C"
23264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023265char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023266int
23267main ()
23268{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023269return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023270 ;
23271 return 0;
23272}
23273_ACEOF
23274rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023275if { (ac_try="$ac_link"
23276case "(($ac_try" in
23277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23278 *) ac_try_echo=$ac_try;;
23279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023283 grep -v '^ *+' conftest.er1 >conftest.err
23284 rm -f conftest.er1
23285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023287 (exit $ac_status); } && {
23288 test -z "$ac_c_werror_flag" ||
23289 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023290 } && test -s conftest$ac_exeext &&
23291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023292 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023295sed 's/^/| /' conftest.$ac_ext >&5
23296
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023299
23300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023302LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023303fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023304{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23305echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23306if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023307 cat >>confdefs.h <<_ACEOF
23308#define HAVE_LIBIEEE 1
23309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023310
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023311 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023312
Guido van Rossum627b2d71993-12-24 10:39:16 +000023313fi
23314
Michael W. Hudson54241132001-12-07 15:38:26 +000023315
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023316fi
23317
Michael W. Hudson54241132001-12-07 15:38:26 +000023318
Guido van Rossum7f253911997-05-09 02:42:48 +000023319# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023320{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23321echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023322
Martin v. Löwiseba40652007-08-30 20:10:57 +000023323# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023324if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023326if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023327then
23328
23329cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023330#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023331_ACEOF
23332
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023333 { echo "$as_me:$LINENO: result: yes" >&5
23334echo "${ECHO_T}yes" >&6; }
23335else { echo "$as_me:$LINENO: result: no" >&5
23336echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023337fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023338else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023339 { echo "$as_me:$LINENO: result: no" >&5
23340echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023341fi
23342
Guido van Rossum7f253911997-05-09 02:42:48 +000023343
Guido van Rossum7f43da71994-08-01 12:15:30 +000023344# check for --with-libm=...
23345
Guido van Rossum563e7081996-09-10 18:20:48 +000023346case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023347Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023348BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023349*) LIBM=-lm
23350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023351{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23352echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
Martin v. Löwiseba40652007-08-30 20:10:57 +000023354# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023355if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023356 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023357if test "$withval" = no
23358then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023359 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23360echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023361elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023362then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023363 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23364echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23365else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23366echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023368fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023369else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023370 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23371echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023372fi
23373
Guido van Rossum7f43da71994-08-01 12:15:30 +000023374
23375# check for --with-libc=...
23376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023377{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23378echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023379
Martin v. Löwiseba40652007-08-30 20:10:57 +000023380# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023381if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023382 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023383if test "$withval" = no
23384then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023385 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23386echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023387elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023388then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023389 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23390echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23391else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23392echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023393 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023394fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023395else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023396 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23397echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398fi
23399
Guido van Rossum7f43da71994-08-01 12:15:30 +000023400
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023401# **************************************************
23402# * Check for various properties of floating point *
23403# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023404
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023405{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23406echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23407if test "${ac_cv_little_endian_double+set}" = set; then
23408 echo $ECHO_N "(cached) $ECHO_C" >&6
23409else
23410
23411if test "$cross_compiling" = yes; then
23412 ac_cv_little_endian_double=no
23413else
23414 cat >conftest.$ac_ext <<_ACEOF
23415/* confdefs.h. */
23416_ACEOF
23417cat confdefs.h >>conftest.$ac_ext
23418cat >>conftest.$ac_ext <<_ACEOF
23419/* end confdefs.h. */
23420
23421#include <string.h>
23422int main() {
23423 double x = 9006104071832581.0;
23424 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23425 return 0;
23426 else
23427 return 1;
23428}
23429
23430_ACEOF
23431rm -f conftest$ac_exeext
23432if { (ac_try="$ac_link"
23433case "(($ac_try" in
23434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23435 *) ac_try_echo=$ac_try;;
23436esac
23437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23438 (eval "$ac_link") 2>&5
23439 ac_status=$?
23440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23442 { (case "(($ac_try" in
23443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23444 *) ac_try_echo=$ac_try;;
23445esac
23446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23447 (eval "$ac_try") 2>&5
23448 ac_status=$?
23449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23450 (exit $ac_status); }; }; then
23451 ac_cv_little_endian_double=yes
23452else
23453 echo "$as_me: program exited with status $ac_status" >&5
23454echo "$as_me: failed program was:" >&5
23455sed 's/^/| /' conftest.$ac_ext >&5
23456
23457( exit $ac_status )
23458ac_cv_little_endian_double=no
23459fi
23460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23461fi
23462
23463
23464fi
23465
23466{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23467echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23468if test "$ac_cv_little_endian_double" = yes
23469then
23470
23471cat >>confdefs.h <<\_ACEOF
23472#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23473_ACEOF
23474
23475fi
23476
23477{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23478echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23479if test "${ac_cv_big_endian_double+set}" = set; then
23480 echo $ECHO_N "(cached) $ECHO_C" >&6
23481else
23482
23483if test "$cross_compiling" = yes; then
23484 ac_cv_big_endian_double=no
23485else
23486 cat >conftest.$ac_ext <<_ACEOF
23487/* confdefs.h. */
23488_ACEOF
23489cat confdefs.h >>conftest.$ac_ext
23490cat >>conftest.$ac_ext <<_ACEOF
23491/* end confdefs.h. */
23492
23493#include <string.h>
23494int main() {
23495 double x = 9006104071832581.0;
23496 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23497 return 0;
23498 else
23499 return 1;
23500}
23501
23502_ACEOF
23503rm -f conftest$ac_exeext
23504if { (ac_try="$ac_link"
23505case "(($ac_try" in
23506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23507 *) ac_try_echo=$ac_try;;
23508esac
23509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23510 (eval "$ac_link") 2>&5
23511 ac_status=$?
23512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23513 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23514 { (case "(($ac_try" in
23515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23516 *) ac_try_echo=$ac_try;;
23517esac
23518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23519 (eval "$ac_try") 2>&5
23520 ac_status=$?
23521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23522 (exit $ac_status); }; }; then
23523 ac_cv_big_endian_double=yes
23524else
23525 echo "$as_me: program exited with status $ac_status" >&5
23526echo "$as_me: failed program was:" >&5
23527sed 's/^/| /' conftest.$ac_ext >&5
23528
23529( exit $ac_status )
23530ac_cv_big_endian_double=no
23531fi
23532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23533fi
23534
23535
23536fi
23537
23538{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23539echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23540if test "$ac_cv_big_endian_double" = yes
23541then
23542
23543cat >>confdefs.h <<\_ACEOF
23544#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23545_ACEOF
23546
23547fi
23548
23549# Some ARM platforms use a mixed-endian representation for doubles.
23550# While Python doesn't currently have full support for these platforms
23551# (see e.g., issue 1762561), we can at least make sure that float <-> string
23552# conversions work.
23553{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23554echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23555if test "${ac_cv_mixed_endian_double+set}" = set; then
23556 echo $ECHO_N "(cached) $ECHO_C" >&6
23557else
23558
23559if test "$cross_compiling" = yes; then
23560 ac_cv_mixed_endian_double=no
23561else
23562 cat >conftest.$ac_ext <<_ACEOF
23563/* confdefs.h. */
23564_ACEOF
23565cat confdefs.h >>conftest.$ac_ext
23566cat >>conftest.$ac_ext <<_ACEOF
23567/* end confdefs.h. */
23568
23569#include <string.h>
23570int main() {
23571 double x = 9006104071832581.0;
23572 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23573 return 0;
23574 else
23575 return 1;
23576}
23577
23578_ACEOF
23579rm -f conftest$ac_exeext
23580if { (ac_try="$ac_link"
23581case "(($ac_try" in
23582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23583 *) ac_try_echo=$ac_try;;
23584esac
23585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23586 (eval "$ac_link") 2>&5
23587 ac_status=$?
23588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23590 { (case "(($ac_try" in
23591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23592 *) ac_try_echo=$ac_try;;
23593esac
23594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23595 (eval "$ac_try") 2>&5
23596 ac_status=$?
23597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23598 (exit $ac_status); }; }; then
23599 ac_cv_mixed_endian_double=yes
23600else
23601 echo "$as_me: program exited with status $ac_status" >&5
23602echo "$as_me: failed program was:" >&5
23603sed 's/^/| /' conftest.$ac_ext >&5
23604
23605( exit $ac_status )
23606ac_cv_mixed_endian_double=no
23607fi
23608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23609fi
23610
23611
23612fi
23613
23614{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23615echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
23616if test "$ac_cv_mixed_endian_double" = yes
23617then
23618
23619cat >>confdefs.h <<\_ACEOF
23620#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23621_ACEOF
23622
23623fi
23624
23625# The short float repr introduced in Python 3.1 requires the
23626# correctly-rounded string <-> double conversion functions from
23627# Python/dtoa.c, which in turn require that the FPU uses 53-bit
23628# rounding; this is a problem on x86, where the x87 FPU has a default
23629# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23630# using inline assembler to get and set the x87 FPU control word.
23631if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23632then
23633 # Check that it's okay to use gcc inline assembler to get and set
23634 # x87 control word. It should be, but you never know...
23635 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23636echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
23637 cat >conftest.$ac_ext <<_ACEOF
23638/* confdefs.h. */
23639_ACEOF
23640cat confdefs.h >>conftest.$ac_ext
23641cat >>conftest.$ac_ext <<_ACEOF
23642/* end confdefs.h. */
23643
23644int
23645main ()
23646{
23647
23648 unsigned short cw;
23649 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23650 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
23651
23652 ;
23653 return 0;
23654}
23655_ACEOF
23656rm -f conftest.$ac_objext
23657if { (ac_try="$ac_compile"
23658case "(($ac_try" in
23659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23660 *) ac_try_echo=$ac_try;;
23661esac
23662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23663 (eval "$ac_compile") 2>conftest.er1
23664 ac_status=$?
23665 grep -v '^ *+' conftest.er1 >conftest.err
23666 rm -f conftest.er1
23667 cat conftest.err >&5
23668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23669 (exit $ac_status); } && {
23670 test -z "$ac_c_werror_flag" ||
23671 test ! -s conftest.err
23672 } && test -s conftest.$ac_objext; then
23673 have_gcc_asm_for_x87=yes
23674else
23675 echo "$as_me: failed program was:" >&5
23676sed 's/^/| /' conftest.$ac_ext >&5
23677
23678 have_gcc_asm_for_x87=no
23679fi
23680
23681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23682 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23683echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
23684 if test "$have_gcc_asm_for_x87" = yes
23685 then
23686
23687cat >>confdefs.h <<\_ACEOF
23688#define HAVE_GCC_ASM_FOR_X87 1
23689_ACEOF
23690
23691 fi
23692fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023693
Mark Dickinson04b27232009-01-04 12:29:36 +000023694# Detect whether system arithmetic is subject to x87-style double
23695# rounding issues. The result of this test has little meaning on non
23696# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23697# mode is round-to-nearest and double rounding issues are present, and
23698# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023699{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23700echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000023701# $BASECFLAGS may affect the result
23702ac_save_cc="$CC"
23703CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000023704if test "$cross_compiling" = yes; then
23705 ac_cv_x87_double_rounding=no
23706else
23707 cat >conftest.$ac_ext <<_ACEOF
23708/* confdefs.h. */
23709_ACEOF
23710cat confdefs.h >>conftest.$ac_ext
23711cat >>conftest.$ac_ext <<_ACEOF
23712/* end confdefs.h. */
23713
23714#include <stdlib.h>
23715#include <math.h>
23716int main() {
23717 volatile double x, y, z;
23718 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23719 x = 0.99999999999999989; /* 1-2**-53 */
23720 y = 1./x;
23721 if (y != 1.)
23722 exit(0);
23723 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23724 x = 1e16;
23725 y = 2.99999;
23726 z = x + y;
23727 if (z != 1e16+4.)
23728 exit(0);
23729 /* both tests show evidence of double rounding */
23730 exit(1);
23731}
23732
23733_ACEOF
23734rm -f conftest$ac_exeext
23735if { (ac_try="$ac_link"
23736case "(($ac_try" in
23737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23738 *) ac_try_echo=$ac_try;;
23739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023741 (eval "$ac_link") 2>&5
23742 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023744 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23745 { (case "(($ac_try" in
23746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23747 *) ac_try_echo=$ac_try;;
23748esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023750 (eval "$ac_try") 2>&5
23751 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023753 (exit $ac_status); }; }; then
23754 ac_cv_x87_double_rounding=no
23755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023756 echo "$as_me: program exited with status $ac_status" >&5
23757echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023758sed 's/^/| /' conftest.$ac_ext >&5
23759
23760( exit $ac_status )
23761ac_cv_x87_double_rounding=yes
23762fi
23763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23764fi
23765
23766
Mark Dickinson99abd142009-10-24 13:44:16 +000023767CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023768{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23769echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023770if test "$ac_cv_x87_double_rounding" = yes
23771then
23772
23773cat >>confdefs.h <<\_ACEOF
23774#define X87_DOUBLE_ROUNDING 1
23775_ACEOF
23776
23777fi
23778
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023779# ************************************
23780# * Check for mathematical functions *
23781# ************************************
23782
23783LIBS_SAVE=$LIBS
23784LIBS="$LIBS $LIBM"
23785
Jesse Noller355b1262009-04-02 00:03:28 +000023786# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023787{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23788echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023789if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23790 echo $ECHO_N "(cached) $ECHO_C" >&6
23791else
23792 if test "$cross_compiling" = yes; then
23793 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023794else
23795 cat >conftest.$ac_ext <<_ACEOF
23796/* confdefs.h. */
23797_ACEOF
23798cat confdefs.h >>conftest.$ac_ext
23799cat >>conftest.$ac_ext <<_ACEOF
23800/* end confdefs.h. */
23801
23802#include <unistd.h>
23803#include <fcntl.h>
23804#include <stdio.h>
23805#include <semaphore.h>
23806#include <sys/stat.h>
23807
23808int main(void){
23809 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23810 int count;
23811 int res;
23812 if(a==SEM_FAILED){
23813 perror("sem_open");
23814 return 1;
23815
23816 }
23817 res = sem_getvalue(a, &count);
23818 sem_close(a);
23819 return res==-1 ? 1 : 0;
23820}
23821
Jesse Noller355b1262009-04-02 00:03:28 +000023822_ACEOF
23823rm -f conftest$ac_exeext
23824if { (ac_try="$ac_link"
23825case "(($ac_try" in
23826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23827 *) ac_try_echo=$ac_try;;
23828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023830 (eval "$ac_link") 2>&5
23831 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23834 { (case "(($ac_try" in
23835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836 *) ac_try_echo=$ac_try;;
23837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023839 (eval "$ac_try") 2>&5
23840 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023842 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023843 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023845 echo "$as_me: program exited with status $ac_status" >&5
23846echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023847sed 's/^/| /' conftest.$ac_ext >&5
23848
23849( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023850ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023851fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23853fi
23854
23855
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023856
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023857fi
23858
23859{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23860echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23861if test $ac_cv_broken_sem_getvalue = yes
23862then
23863
23864cat >>confdefs.h <<\_ACEOF
23865#define HAVE_BROKEN_SEM_GETVALUE 1
23866_ACEOF
23867
23868fi
23869
Mark Dickinson265d7382008-04-21 22:32:24 +000023870# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23871# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023872{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23873echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023874if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023875 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023876else
23877
23878if test "$cross_compiling" = yes; then
23879 ac_cv_tanh_preserves_zero_sign=no
23880else
23881 cat >conftest.$ac_ext <<_ACEOF
23882/* confdefs.h. */
23883_ACEOF
23884cat confdefs.h >>conftest.$ac_ext
23885cat >>conftest.$ac_ext <<_ACEOF
23886/* end confdefs.h. */
23887
23888#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023889#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023890int main() {
23891 /* return 0 if either negative zeros don't exist
23892 on this platform or if negative zeros exist
23893 and tanh(-0.) == -0. */
23894 if (atan2(0., -1.) == atan2(-0., -1.) ||
23895 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23896 else exit(1);
23897}
23898
23899_ACEOF
23900rm -f conftest$ac_exeext
23901if { (ac_try="$ac_link"
23902case "(($ac_try" in
23903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23904 *) ac_try_echo=$ac_try;;
23905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023907 (eval "$ac_link") 2>&5
23908 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23911 { (case "(($ac_try" in
23912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23913 *) ac_try_echo=$ac_try;;
23914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023916 (eval "$ac_try") 2>&5
23917 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023919 (exit $ac_status); }; }; then
23920 ac_cv_tanh_preserves_zero_sign=yes
23921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023922 echo "$as_me: program exited with status $ac_status" >&5
23923echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023924sed 's/^/| /' conftest.$ac_ext >&5
23925
23926( exit $ac_status )
23927ac_cv_tanh_preserves_zero_sign=no
23928fi
23929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23930fi
23931
23932
23933fi
23934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023935{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23936echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023937if test "$ac_cv_tanh_preserves_zero_sign" = yes
23938then
23939
23940cat >>confdefs.h <<\_ACEOF
23941#define TANH_PRESERVES_ZERO_SIGN 1
23942_ACEOF
23943
23944fi
23945
Martin v. Löwis11437992002-04-12 09:54:03 +000023946
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023947
Michael W. Hudson54241132001-12-07 15:38:26 +000023948
Christian Heimes0a8143f2007-12-18 23:22:54 +000023949
23950
23951
23952
23953
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023954
Mark Dickinson65898e02009-09-05 10:27:00 +000023955for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23956do
23957as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23958{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23959echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23960if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23961 echo $ECHO_N "(cached) $ECHO_C" >&6
23962else
23963 cat >conftest.$ac_ext <<_ACEOF
23964/* confdefs.h. */
23965_ACEOF
23966cat confdefs.h >>conftest.$ac_ext
23967cat >>conftest.$ac_ext <<_ACEOF
23968/* end confdefs.h. */
23969/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23970 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23971#define $ac_func innocuous_$ac_func
23972
23973/* System header to define __stub macros and hopefully few prototypes,
23974 which can conflict with char $ac_func (); below.
23975 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23976 <limits.h> exists even on freestanding compilers. */
23977
23978#ifdef __STDC__
23979# include <limits.h>
23980#else
23981# include <assert.h>
23982#endif
23983
23984#undef $ac_func
23985
23986/* Override any GCC internal prototype to avoid an error.
23987 Use char because int might match the return type of a GCC
23988 builtin and then its argument prototype would still apply. */
23989#ifdef __cplusplus
23990extern "C"
23991#endif
23992char $ac_func ();
23993/* The GNU C library defines this for functions which it implements
23994 to always fail with ENOSYS. Some functions are actually named
23995 something starting with __ and the normal name is an alias. */
23996#if defined __stub_$ac_func || defined __stub___$ac_func
23997choke me
23998#endif
23999
24000int
24001main ()
24002{
24003return $ac_func ();
24004 ;
24005 return 0;
24006}
24007_ACEOF
24008rm -f conftest.$ac_objext conftest$ac_exeext
24009if { (ac_try="$ac_link"
24010case "(($ac_try" in
24011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24012 *) ac_try_echo=$ac_try;;
24013esac
24014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24015 (eval "$ac_link") 2>conftest.er1
24016 ac_status=$?
24017 grep -v '^ *+' conftest.er1 >conftest.err
24018 rm -f conftest.er1
24019 cat conftest.err >&5
24020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24021 (exit $ac_status); } && {
24022 test -z "$ac_c_werror_flag" ||
24023 test ! -s conftest.err
24024 } && test -s conftest$ac_exeext &&
24025 $as_test_x conftest$ac_exeext; then
24026 eval "$as_ac_var=yes"
24027else
24028 echo "$as_me: failed program was:" >&5
24029sed 's/^/| /' conftest.$ac_ext >&5
24030
24031 eval "$as_ac_var=no"
24032fi
24033
24034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24035 conftest$ac_exeext conftest.$ac_ext
24036fi
24037ac_res=`eval echo '${'$as_ac_var'}'`
24038 { echo "$as_me:$LINENO: result: $ac_res" >&5
24039echo "${ECHO_T}$ac_res" >&6; }
24040if test `eval echo '${'$as_ac_var'}'` = yes; then
24041 cat >>confdefs.h <<_ACEOF
24042#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24043_ACEOF
24044
24045fi
24046done
24047
24048
24049
24050
24051
24052
24053for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024054do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024055as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24056{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24057echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024058if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024059 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024060else
24061 cat >conftest.$ac_ext <<_ACEOF
24062/* confdefs.h. */
24063_ACEOF
24064cat confdefs.h >>conftest.$ac_ext
24065cat >>conftest.$ac_ext <<_ACEOF
24066/* end confdefs.h. */
24067/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24068 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24069#define $ac_func innocuous_$ac_func
24070
24071/* System header to define __stub macros and hopefully few prototypes,
24072 which can conflict with char $ac_func (); below.
24073 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24074 <limits.h> exists even on freestanding compilers. */
24075
24076#ifdef __STDC__
24077# include <limits.h>
24078#else
24079# include <assert.h>
24080#endif
24081
24082#undef $ac_func
24083
24084/* Override any GCC internal prototype to avoid an error.
24085 Use char because int might match the return type of a GCC
24086 builtin and then its argument prototype would still apply. */
24087#ifdef __cplusplus
24088extern "C"
24089#endif
24090char $ac_func ();
24091/* The GNU C library defines this for functions which it implements
24092 to always fail with ENOSYS. Some functions are actually named
24093 something starting with __ and the normal name is an alias. */
24094#if defined __stub_$ac_func || defined __stub___$ac_func
24095choke me
24096#endif
24097
24098int
24099main ()
24100{
24101return $ac_func ();
24102 ;
24103 return 0;
24104}
24105_ACEOF
24106rm -f conftest.$ac_objext conftest$ac_exeext
24107if { (ac_try="$ac_link"
24108case "(($ac_try" in
24109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24110 *) ac_try_echo=$ac_try;;
24111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024113 (eval "$ac_link") 2>conftest.er1
24114 ac_status=$?
24115 grep -v '^ *+' conftest.er1 >conftest.err
24116 rm -f conftest.er1
24117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024119 (exit $ac_status); } && {
24120 test -z "$ac_c_werror_flag" ||
24121 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024122 } && test -s conftest$ac_exeext &&
24123 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024124 eval "$as_ac_var=yes"
24125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024126 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024127sed 's/^/| /' conftest.$ac_ext >&5
24128
24129 eval "$as_ac_var=no"
24130fi
24131
24132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24133 conftest$ac_exeext conftest.$ac_ext
24134fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024135ac_res=`eval echo '${'$as_ac_var'}'`
24136 { echo "$as_me:$LINENO: result: $ac_res" >&5
24137echo "${ECHO_T}$ac_res" >&6; }
24138if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024139 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024140#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024141_ACEOF
24142
24143fi
24144done
24145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024146{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24147echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024148if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024149 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024150else
24151 cat >conftest.$ac_ext <<_ACEOF
24152/* confdefs.h. */
24153_ACEOF
24154cat confdefs.h >>conftest.$ac_ext
24155cat >>conftest.$ac_ext <<_ACEOF
24156/* end confdefs.h. */
24157#include <math.h>
24158
24159int
24160main ()
24161{
24162#ifndef isinf
24163 (void) isinf;
24164#endif
24165
24166 ;
24167 return 0;
24168}
24169_ACEOF
24170rm -f conftest.$ac_objext
24171if { (ac_try="$ac_compile"
24172case "(($ac_try" in
24173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24174 *) ac_try_echo=$ac_try;;
24175esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024177 (eval "$ac_compile") 2>conftest.er1
24178 ac_status=$?
24179 grep -v '^ *+' conftest.er1 >conftest.err
24180 rm -f conftest.er1
24181 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024183 (exit $ac_status); } && {
24184 test -z "$ac_c_werror_flag" ||
24185 test ! -s conftest.err
24186 } && test -s conftest.$ac_objext; then
24187 ac_cv_have_decl_isinf=yes
24188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024189 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024190sed 's/^/| /' conftest.$ac_ext >&5
24191
24192 ac_cv_have_decl_isinf=no
24193fi
24194
24195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24196fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024197{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24198echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24199if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024200
24201cat >>confdefs.h <<_ACEOF
24202#define HAVE_DECL_ISINF 1
24203_ACEOF
24204
24205
24206else
24207 cat >>confdefs.h <<_ACEOF
24208#define HAVE_DECL_ISINF 0
24209_ACEOF
24210
24211
24212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024213{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24214echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024215if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024217else
24218 cat >conftest.$ac_ext <<_ACEOF
24219/* confdefs.h. */
24220_ACEOF
24221cat confdefs.h >>conftest.$ac_ext
24222cat >>conftest.$ac_ext <<_ACEOF
24223/* end confdefs.h. */
24224#include <math.h>
24225
24226int
24227main ()
24228{
24229#ifndef isnan
24230 (void) isnan;
24231#endif
24232
24233 ;
24234 return 0;
24235}
24236_ACEOF
24237rm -f conftest.$ac_objext
24238if { (ac_try="$ac_compile"
24239case "(($ac_try" in
24240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24241 *) ac_try_echo=$ac_try;;
24242esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024244 (eval "$ac_compile") 2>conftest.er1
24245 ac_status=$?
24246 grep -v '^ *+' conftest.er1 >conftest.err
24247 rm -f conftest.er1
24248 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024250 (exit $ac_status); } && {
24251 test -z "$ac_c_werror_flag" ||
24252 test ! -s conftest.err
24253 } && test -s conftest.$ac_objext; then
24254 ac_cv_have_decl_isnan=yes
24255else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024256 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024257sed 's/^/| /' conftest.$ac_ext >&5
24258
24259 ac_cv_have_decl_isnan=no
24260fi
24261
24262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24263fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024264{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24265echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24266if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024267
24268cat >>confdefs.h <<_ACEOF
24269#define HAVE_DECL_ISNAN 1
24270_ACEOF
24271
24272
24273else
24274 cat >>confdefs.h <<_ACEOF
24275#define HAVE_DECL_ISNAN 0
24276_ACEOF
24277
24278
24279fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024280{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24281echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024282if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024283 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024284else
24285 cat >conftest.$ac_ext <<_ACEOF
24286/* confdefs.h. */
24287_ACEOF
24288cat confdefs.h >>conftest.$ac_ext
24289cat >>conftest.$ac_ext <<_ACEOF
24290/* end confdefs.h. */
24291#include <math.h>
24292
24293int
24294main ()
24295{
24296#ifndef isfinite
24297 (void) isfinite;
24298#endif
24299
24300 ;
24301 return 0;
24302}
24303_ACEOF
24304rm -f conftest.$ac_objext
24305if { (ac_try="$ac_compile"
24306case "(($ac_try" in
24307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24308 *) ac_try_echo=$ac_try;;
24309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024311 (eval "$ac_compile") 2>conftest.er1
24312 ac_status=$?
24313 grep -v '^ *+' conftest.er1 >conftest.err
24314 rm -f conftest.er1
24315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024317 (exit $ac_status); } && {
24318 test -z "$ac_c_werror_flag" ||
24319 test ! -s conftest.err
24320 } && test -s conftest.$ac_objext; then
24321 ac_cv_have_decl_isfinite=yes
24322else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024323 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024324sed 's/^/| /' conftest.$ac_ext >&5
24325
24326 ac_cv_have_decl_isfinite=no
24327fi
24328
24329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24330fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024331{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24332echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24333if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024334
24335cat >>confdefs.h <<_ACEOF
24336#define HAVE_DECL_ISFINITE 1
24337_ACEOF
24338
24339
24340else
24341 cat >>confdefs.h <<_ACEOF
24342#define HAVE_DECL_ISFINITE 0
24343_ACEOF
24344
24345
24346fi
24347
24348
Christian Heimes0a8143f2007-12-18 23:22:54 +000024349
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024350LIBS=$LIBS_SAVE
24351
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024352# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024353{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24354echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024355# Check whether --enable-big-digits was given.
24356if test "${enable_big_digits+set}" = set; then
24357 enableval=$enable_big_digits; case $enable_big_digits in
24358yes)
24359 enable_big_digits=30 ;;
24360no)
24361 enable_big_digits=15 ;;
2436215|30)
24363 ;;
24364*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024365 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24366echo "$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 +000024367 { (exit 1); exit 1; }; } ;;
24368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024369{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24370echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024371
24372cat >>confdefs.h <<_ACEOF
24373#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24374_ACEOF
24375
24376
24377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024378 { echo "$as_me:$LINENO: result: no value specified" >&5
24379echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024380fi
24381
24382
Guido van Rossumef2255b2000-03-10 22:30:29 +000024383# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024384if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024385 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24386echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024387if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024388 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024389fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024390{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24391echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024392else
Martin v. Löwis11437992002-04-12 09:54:03 +000024393 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024394{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24395echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024397/* confdefs.h. */
24398_ACEOF
24399cat confdefs.h >>conftest.$ac_ext
24400cat >>conftest.$ac_ext <<_ACEOF
24401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024402$ac_includes_default
24403#include <wchar.h>
24404_ACEOF
24405rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406if { (ac_try="$ac_compile"
24407case "(($ac_try" in
24408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24409 *) ac_try_echo=$ac_try;;
24410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024414 grep -v '^ *+' conftest.er1 >conftest.err
24415 rm -f conftest.er1
24416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024418 (exit $ac_status); } && {
24419 test -z "$ac_c_werror_flag" ||
24420 test ! -s conftest.err
24421 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024422 ac_header_compiler=yes
24423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024425sed 's/^/| /' conftest.$ac_ext >&5
24426
Martin v. Löwiseba40652007-08-30 20:10:57 +000024427 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024428fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429
24430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024431{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24432echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024433
24434# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024435{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24436echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024438/* confdefs.h. */
24439_ACEOF
24440cat confdefs.h >>conftest.$ac_ext
24441cat >>conftest.$ac_ext <<_ACEOF
24442/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024443#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024444_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445if { (ac_try="$ac_cpp conftest.$ac_ext"
24446case "(($ac_try" in
24447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24448 *) ac_try_echo=$ac_try;;
24449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024451 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024452 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024453 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024454 rm -f conftest.er1
24455 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 (exit $ac_status); } >/dev/null && {
24458 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24459 test ! -s conftest.err
24460 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 ac_header_preproc=yes
24462else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024464sed 's/^/| /' conftest.$ac_ext >&5
24465
Martin v. Löwis11437992002-04-12 09:54:03 +000024466 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024470{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24471echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024472
24473# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24475 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024476 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24477echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24478 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24479echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024480 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024481 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024482 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024483 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24484echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24485 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24486echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24487 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24488echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24489 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24490echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24491 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24492echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24493 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24494echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024495 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024496## -------------------------------------- ##
24497## Report this to http://bugs.python.org/ ##
24498## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024499_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024500 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024501 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024503{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24504echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024505if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024506 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024507else
24508 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024510{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24511echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024512
24513fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024514if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024515
24516
24517cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024518#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024519_ACEOF
24520
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024521 wchar_h="yes"
24522
Guido van Rossumef2255b2000-03-10 22:30:29 +000024523else
Martin v. Löwis11437992002-04-12 09:54:03 +000024524 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024525
24526fi
24527
Michael W. Hudson54241132001-12-07 15:38:26 +000024528
Martin v. Löwis11437992002-04-12 09:54:03 +000024529
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024530# determine wchar_t size
24531if test "$wchar_h" = yes
24532then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024533 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24534echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24535if test "${ac_cv_type_wchar_t+set}" = set; then
24536 echo $ECHO_N "(cached) $ECHO_C" >&6
24537else
24538 cat >conftest.$ac_ext <<_ACEOF
24539/* confdefs.h. */
24540_ACEOF
24541cat confdefs.h >>conftest.$ac_ext
24542cat >>conftest.$ac_ext <<_ACEOF
24543/* end confdefs.h. */
24544#include <wchar.h>
24545
24546typedef wchar_t ac__type_new_;
24547int
24548main ()
24549{
24550if ((ac__type_new_ *) 0)
24551 return 0;
24552if (sizeof (ac__type_new_))
24553 return 0;
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
24564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24565 (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
24570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24571 (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_type_wchar_t=yes
24576else
24577 echo "$as_me: failed program was:" >&5
24578sed 's/^/| /' conftest.$ac_ext >&5
24579
24580 ac_cv_type_wchar_t=no
24581fi
24582
24583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24584fi
24585{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24586echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24587
24588# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24591# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024592{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24593echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024594if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024596else
Martin v. Löwis11437992002-04-12 09:54:03 +000024597 if test "$cross_compiling" = yes; then
24598 # Depending upon the size, compute the lo and hi bounds.
24599cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024600/* confdefs.h. */
24601_ACEOF
24602cat confdefs.h >>conftest.$ac_ext
24603cat >>conftest.$ac_ext <<_ACEOF
24604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024605#include <wchar.h>
24606
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024607 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024608int
24609main ()
24610{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024611static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024612test_array [0] = 0
24613
24614 ;
24615 return 0;
24616}
24617_ACEOF
24618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024619if { (ac_try="$ac_compile"
24620case "(($ac_try" in
24621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24622 *) ac_try_echo=$ac_try;;
24623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024627 grep -v '^ *+' conftest.er1 >conftest.err
24628 rm -f conftest.er1
24629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 (exit $ac_status); } && {
24632 test -z "$ac_c_werror_flag" ||
24633 test ! -s conftest.err
24634 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024635 ac_lo=0 ac_mid=0
24636 while :; do
24637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024638/* confdefs.h. */
24639_ACEOF
24640cat confdefs.h >>conftest.$ac_ext
24641cat >>conftest.$ac_ext <<_ACEOF
24642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024643#include <wchar.h>
24644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024645 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024646int
24647main ()
24648{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024650test_array [0] = 0
24651
24652 ;
24653 return 0;
24654}
24655_ACEOF
24656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024657if { (ac_try="$ac_compile"
24658case "(($ac_try" in
24659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24660 *) ac_try_echo=$ac_try;;
24661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024665 grep -v '^ *+' conftest.er1 >conftest.err
24666 rm -f conftest.er1
24667 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024669 (exit $ac_status); } && {
24670 test -z "$ac_c_werror_flag" ||
24671 test ! -s conftest.err
24672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024673 ac_hi=$ac_mid; break
24674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024676sed 's/^/| /' conftest.$ac_ext >&5
24677
Martin v. Löwiseba40652007-08-30 20:10:57 +000024678 ac_lo=`expr $ac_mid + 1`
24679 if test $ac_lo -le $ac_mid; then
24680 ac_lo= ac_hi=
24681 break
24682 fi
24683 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024685
24686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024687 done
24688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024690sed 's/^/| /' conftest.$ac_ext >&5
24691
Martin v. Löwiseba40652007-08-30 20:10:57 +000024692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024693/* confdefs.h. */
24694_ACEOF
24695cat confdefs.h >>conftest.$ac_ext
24696cat >>conftest.$ac_ext <<_ACEOF
24697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024698#include <wchar.h>
24699
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024700 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024701int
24702main ()
24703{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024704static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024705test_array [0] = 0
24706
24707 ;
24708 return 0;
24709}
24710_ACEOF
24711rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024712if { (ac_try="$ac_compile"
24713case "(($ac_try" in
24714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24715 *) ac_try_echo=$ac_try;;
24716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024720 grep -v '^ *+' conftest.er1 >conftest.err
24721 rm -f conftest.er1
24722 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024724 (exit $ac_status); } && {
24725 test -z "$ac_c_werror_flag" ||
24726 test ! -s conftest.err
24727 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 ac_hi=-1 ac_mid=-1
24729 while :; do
24730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024731/* confdefs.h. */
24732_ACEOF
24733cat confdefs.h >>conftest.$ac_ext
24734cat >>conftest.$ac_ext <<_ACEOF
24735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024736#include <wchar.h>
24737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024738 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024739int
24740main ()
24741{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024743test_array [0] = 0
24744
24745 ;
24746 return 0;
24747}
24748_ACEOF
24749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024750if { (ac_try="$ac_compile"
24751case "(($ac_try" in
24752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24753 *) ac_try_echo=$ac_try;;
24754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024758 grep -v '^ *+' conftest.er1 >conftest.err
24759 rm -f conftest.er1
24760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024762 (exit $ac_status); } && {
24763 test -z "$ac_c_werror_flag" ||
24764 test ! -s conftest.err
24765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024766 ac_lo=$ac_mid; break
24767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024769sed 's/^/| /' conftest.$ac_ext >&5
24770
Martin v. Löwiseba40652007-08-30 20:10:57 +000024771 ac_hi=`expr '(' $ac_mid ')' - 1`
24772 if test $ac_mid -le $ac_hi; then
24773 ac_lo= ac_hi=
24774 break
24775 fi
24776 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024778
24779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024780 done
24781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024783sed 's/^/| /' conftest.$ac_ext >&5
24784
Martin v. Löwiseba40652007-08-30 20:10:57 +000024785 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024787
24788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024790
24791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024792# Binary search between lo and hi bounds.
24793while test "x$ac_lo" != "x$ac_hi"; do
24794 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024796/* confdefs.h. */
24797_ACEOF
24798cat confdefs.h >>conftest.$ac_ext
24799cat >>conftest.$ac_ext <<_ACEOF
24800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024801#include <wchar.h>
24802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024803 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024804int
24805main ()
24806{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024807static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024808test_array [0] = 0
24809
24810 ;
24811 return 0;
24812}
24813_ACEOF
24814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024815if { (ac_try="$ac_compile"
24816case "(($ac_try" in
24817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24818 *) ac_try_echo=$ac_try;;
24819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024823 grep -v '^ *+' conftest.er1 >conftest.err
24824 rm -f conftest.er1
24825 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827 (exit $ac_status); } && {
24828 test -z "$ac_c_werror_flag" ||
24829 test ! -s conftest.err
24830 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024831 ac_hi=$ac_mid
24832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024834sed 's/^/| /' conftest.$ac_ext >&5
24835
Martin v. Löwiseba40652007-08-30 20:10:57 +000024836 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024838
24839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024840done
24841case $ac_lo in
24842?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024843'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024844 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024846echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024847See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024848 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024849 else
24850 ac_cv_sizeof_wchar_t=0
24851 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024852esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024853else
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024855/* confdefs.h. */
24856_ACEOF
24857cat confdefs.h >>conftest.$ac_ext
24858cat >>conftest.$ac_ext <<_ACEOF
24859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024860#include <wchar.h>
24861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024862 typedef wchar_t ac__type_sizeof_;
24863static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24864static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024865#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024866#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024867int
24868main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024869{
Martin v. Löwis11437992002-04-12 09:54:03 +000024870
24871 FILE *f = fopen ("conftest.val", "w");
24872 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024873 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024874 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024875 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024876 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024877 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024878 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024879 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024880 }
24881 else
24882 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024886 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024889
24890 ;
24891 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024892}
Martin v. Löwis11437992002-04-12 09:54:03 +000024893_ACEOF
24894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024895if { (ac_try="$ac_link"
24896case "(($ac_try" in
24897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24898 *) ac_try_echo=$ac_try;;
24899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024905 { (case "(($ac_try" in
24906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24907 *) ac_try_echo=$ac_try;;
24908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 (exit $ac_status); }; }; then
24914 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024916 echo "$as_me: program exited with status $ac_status" >&5
24917echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024918sed 's/^/| /' conftest.$ac_ext >&5
24919
Martin v. Löwis11437992002-04-12 09:54:03 +000024920( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024922 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024923See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024924echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024925See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024926 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024927 else
24928 ac_cv_sizeof_wchar_t=0
24929 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024931rm -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 +000024932fi
24933rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024934fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024935{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24936echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024937
24938
24939
Martin v. Löwis11437992002-04-12 09:54:03 +000024940cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024941#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024942_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024943
Michael W. Hudson54241132001-12-07 15:38:26 +000024944
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024945fi
24946
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24948echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024949have_ucs4_tcl=no
24950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024951/* confdefs.h. */
24952_ACEOF
24953cat confdefs.h >>conftest.$ac_ext
24954cat >>conftest.$ac_ext <<_ACEOF
24955/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024956
24957#include <tcl.h>
24958#if TCL_UTF_MAX != 6
24959# error "NOT UCS4_TCL"
24960#endif
24961int
24962main ()
24963{
24964
24965 ;
24966 return 0;
24967}
24968_ACEOF
24969rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024970if { (ac_try="$ac_compile"
24971case "(($ac_try" in
24972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24973 *) ac_try_echo=$ac_try;;
24974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024978 grep -v '^ *+' conftest.er1 >conftest.err
24979 rm -f conftest.er1
24980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 (exit $ac_status); } && {
24983 test -z "$ac_c_werror_flag" ||
24984 test ! -s conftest.err
24985 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024986
24987
24988cat >>confdefs.h <<\_ACEOF
24989#define HAVE_UCS4_TCL 1
24990_ACEOF
24991
24992 have_ucs4_tcl=yes
24993
24994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024996sed 's/^/| /' conftest.$ac_ext >&5
24997
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000
25001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025002{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25003echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025004
Skip Montanaro6dead952003-09-25 14:50:04 +000025005# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025006if test "$wchar_h" = yes
25007then
25008 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025009 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25010echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025011 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025012 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025013else
25014
25015 if test "$cross_compiling" = yes; then
25016 ac_cv_wchar_t_signed=yes
25017else
25018 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025019/* confdefs.h. */
25020_ACEOF
25021cat confdefs.h >>conftest.$ac_ext
25022cat >>conftest.$ac_ext <<_ACEOF
25023/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025024
25025 #include <wchar.h>
25026 int main()
25027 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025028 /* Success: exit code 0 */
25029 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025030 }
25031
25032_ACEOF
25033rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034if { (ac_try="$ac_link"
25035case "(($ac_try" in
25036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25037 *) ac_try_echo=$ac_try;;
25038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025040 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025041 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025044 { (case "(($ac_try" in
25045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25046 *) ac_try_echo=$ac_try;;
25047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025049 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025050 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025052 (exit $ac_status); }; }; then
25053 ac_cv_wchar_t_signed=yes
25054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025055 echo "$as_me: program exited with status $ac_status" >&5
25056echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025057sed 's/^/| /' conftest.$ac_ext >&5
25058
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025059( exit $ac_status )
25060ac_cv_wchar_t_signed=no
25061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025062rm -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 +000025063fi
25064
Martin v. Löwiseba40652007-08-30 20:10:57 +000025065
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025066fi
25067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025068 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25069echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025070fi
25071
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025072{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25073echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025074# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025075if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025076 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025077else
25078 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025079fi
25080
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025081
25082if test $enable_unicode = yes
25083then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025084 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025085 case "$have_ucs4_tcl" in
25086 yes) enable_unicode="ucs4"
25087 ;;
25088 *) enable_unicode="ucs2"
25089 ;;
25090 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025091fi
25092
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025093
25094
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025095case "$enable_unicode" in
25096ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025097 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025098#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025099_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025100
25101 ;;
25102ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025103 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025104#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025105_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025106
25107 ;;
25108esac
25109
Michael W. Hudson54241132001-12-07 15:38:26 +000025110
Martin v. Löwis11437992002-04-12 09:54:03 +000025111
25112
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025113
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025114if test "$enable_unicode" = "no"
25115then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025116 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025117 { echo "$as_me:$LINENO: result: not used" >&5
25118echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025119else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025120 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025121
25122cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025123#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025125
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025126
25127 # wchar_t is only usable if it maps to an unsigned type
25128 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025129 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025130 then
25131 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025132
Martin v. Löwis11437992002-04-12 09:54:03 +000025133cat >>confdefs.h <<\_ACEOF
25134#define HAVE_USABLE_WCHAR_T 1
25135_ACEOF
25136
25137 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025138#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025139_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025140
25141 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25142 then
25143 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025144 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025145#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025146_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025147
25148 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25149 then
25150 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025151 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025152#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025153_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025154
25155 else
25156 PY_UNICODE_TYPE="no type found"
25157 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025158 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25159echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025160fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025161
25162# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025163{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25164echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025165if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025167else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025168 # See if sys/param.h defines the BYTE_ORDER macro.
25169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025170/* confdefs.h. */
25171_ACEOF
25172cat confdefs.h >>conftest.$ac_ext
25173cat >>conftest.$ac_ext <<_ACEOF
25174/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025175#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025176#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025177
Martin v. Löwis11437992002-04-12 09:54:03 +000025178int
25179main ()
25180{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025181#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25182 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25183 bogus endian macros
25184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025185
25186 ;
25187 return 0;
25188}
25189_ACEOF
25190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025191if { (ac_try="$ac_compile"
25192case "(($ac_try" in
25193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25194 *) ac_try_echo=$ac_try;;
25195esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025199 grep -v '^ *+' conftest.er1 >conftest.err
25200 rm -f conftest.er1
25201 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025203 (exit $ac_status); } && {
25204 test -z "$ac_c_werror_flag" ||
25205 test ! -s conftest.err
25206 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025207 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025209/* confdefs.h. */
25210_ACEOF
25211cat confdefs.h >>conftest.$ac_ext
25212cat >>conftest.$ac_ext <<_ACEOF
25213/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025214#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025215#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025216
Martin v. Löwis11437992002-04-12 09:54:03 +000025217int
25218main ()
25219{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025220#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025221 not big endian
25222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025223
25224 ;
25225 return 0;
25226}
25227_ACEOF
25228rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025229if { (ac_try="$ac_compile"
25230case "(($ac_try" in
25231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25232 *) ac_try_echo=$ac_try;;
25233esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025237 grep -v '^ *+' conftest.er1 >conftest.err
25238 rm -f conftest.er1
25239 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025241 (exit $ac_status); } && {
25242 test -z "$ac_c_werror_flag" ||
25243 test ! -s conftest.err
25244 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025245 ac_cv_c_bigendian=yes
25246else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025248sed 's/^/| /' conftest.$ac_ext >&5
25249
Martin v. Löwiseba40652007-08-30 20:10:57 +000025250 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025252
25253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025256sed 's/^/| /' conftest.$ac_ext >&5
25257
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025258 # It does not; compile a test program.
25259if test "$cross_compiling" = yes; then
25260 # try to guess the endianness by grepping values into an object file
25261 ac_cv_c_bigendian=unknown
25262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025263/* confdefs.h. */
25264_ACEOF
25265cat confdefs.h >>conftest.$ac_ext
25266cat >>conftest.$ac_ext <<_ACEOF
25267/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025268short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25269short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25270void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25271short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25272short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25273void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025274int
25275main ()
25276{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025277 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025278 ;
25279 return 0;
25280}
25281_ACEOF
25282rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283if { (ac_try="$ac_compile"
25284case "(($ac_try" in
25285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25286 *) ac_try_echo=$ac_try;;
25287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025291 grep -v '^ *+' conftest.er1 >conftest.err
25292 rm -f conftest.er1
25293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025295 (exit $ac_status); } && {
25296 test -z "$ac_c_werror_flag" ||
25297 test ! -s conftest.err
25298 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025299 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025300 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025302if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25303 if test "$ac_cv_c_bigendian" = unknown; then
25304 ac_cv_c_bigendian=no
25305 else
25306 # finding both strings is unlikely to happen, but who knows?
25307 ac_cv_c_bigendian=unknown
25308 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025309fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025312sed 's/^/| /' conftest.$ac_ext >&5
25313
Martin v. Löwiseba40652007-08-30 20:10:57 +000025314
Martin v. Löwis11437992002-04-12 09:54:03 +000025315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316
25317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025318else
25319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025320/* confdefs.h. */
25321_ACEOF
25322cat confdefs.h >>conftest.$ac_ext
25323cat >>conftest.$ac_ext <<_ACEOF
25324/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025326int
25327main ()
25328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025329
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025330 /* Are we little or big endian? From Harbison&Steele. */
25331 union
25332 {
25333 long int l;
25334 char c[sizeof (long int)];
25335 } u;
25336 u.l = 1;
25337 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338
25339 ;
25340 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025341}
Martin v. Löwis11437992002-04-12 09:54:03 +000025342_ACEOF
25343rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025344if { (ac_try="$ac_link"
25345case "(($ac_try" in
25346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25347 *) ac_try_echo=$ac_try;;
25348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025350 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025351 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354 { (case "(($ac_try" in
25355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25356 *) ac_try_echo=$ac_try;;
25357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025359 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025360 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025362 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025363 ac_cv_c_bigendian=no
25364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025365 echo "$as_me: program exited with status $ac_status" >&5
25366echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025367sed 's/^/| /' conftest.$ac_ext >&5
25368
Martin v. Löwis11437992002-04-12 09:54:03 +000025369( exit $ac_status )
25370ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025371fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372rm -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 +000025373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025374
25375
Martin v. Löwis11437992002-04-12 09:54:03 +000025376fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025377
25378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25379fi
25380{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25381echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25382case $ac_cv_c_bigendian in
25383 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025384
25385cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025386#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025387_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025388 ;;
25389 no)
25390 ;;
25391 *)
25392 { { echo "$as_me:$LINENO: error: unknown endianness
25393presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25394echo "$as_me: error: unknown endianness
25395presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025396 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025397esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025398
Michael W. Hudson54241132001-12-07 15:38:26 +000025399
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025400# Check whether right shifting a negative integer extends the sign bit
25401# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025402{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25403echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025404if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025405 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025406else
Martin v. Löwis11437992002-04-12 09:54:03 +000025407
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025408if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025409 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025410else
Martin v. Löwis11437992002-04-12 09:54:03 +000025411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025412/* confdefs.h. */
25413_ACEOF
25414cat confdefs.h >>conftest.$ac_ext
25415cat >>conftest.$ac_ext <<_ACEOF
25416/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025417
25418int main()
25419{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025420 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025421}
25422
Martin v. Löwis11437992002-04-12 09:54:03 +000025423_ACEOF
25424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025425if { (ac_try="$ac_link"
25426case "(($ac_try" in
25427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25428 *) ac_try_echo=$ac_try;;
25429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025435 { (case "(($ac_try" in
25436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25437 *) ac_try_echo=$ac_try;;
25438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025441 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025443 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025444 ac_cv_rshift_extends_sign=yes
25445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025446 echo "$as_me: program exited with status $ac_status" >&5
25447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025448sed 's/^/| /' conftest.$ac_ext >&5
25449
Martin v. Löwis11437992002-04-12 09:54:03 +000025450( exit $ac_status )
25451ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453rm -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 +000025454fi
25455
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456
25457fi
25458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25460echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025461if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025462then
Martin v. Löwis11437992002-04-12 09:54:03 +000025463
25464cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025465#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025466_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025467
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025468fi
25469
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025470# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025471{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25472echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025473if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025475else
Martin v. Löwis11437992002-04-12 09:54:03 +000025476
25477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025478/* confdefs.h. */
25479_ACEOF
25480cat confdefs.h >>conftest.$ac_ext
25481cat >>conftest.$ac_ext <<_ACEOF
25482/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025483#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025484int
25485main ()
25486{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025487
25488 FILE *f = fopen("/dev/null", "r");
25489 flockfile(f);
25490 getc_unlocked(f);
25491 funlockfile(f);
25492
Martin v. Löwis11437992002-04-12 09:54:03 +000025493 ;
25494 return 0;
25495}
25496_ACEOF
25497rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025498if { (ac_try="$ac_link"
25499case "(($ac_try" in
25500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25501 *) ac_try_echo=$ac_try;;
25502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025506 grep -v '^ *+' conftest.er1 >conftest.err
25507 rm -f conftest.er1
25508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025510 (exit $ac_status); } && {
25511 test -z "$ac_c_werror_flag" ||
25512 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025513 } && test -s conftest$ac_exeext &&
25514 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025515 ac_cv_have_getc_unlocked=yes
25516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025517 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025518sed 's/^/| /' conftest.$ac_ext >&5
25519
Martin v. Löwiseba40652007-08-30 20:10:57 +000025520 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025522
25523rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025524 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025525fi
25526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025527{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25528echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025529if test "$ac_cv_have_getc_unlocked" = yes
25530then
Martin v. Löwis11437992002-04-12 09:54:03 +000025531
25532cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025533#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025534_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025535
25536fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025537
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025538# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025539# save the value of LIBS so we don't actually link Python with readline
25540LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025541
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025542# On some systems we need to link readline to a termcap compatible
25543# library. NOTE: Keep the precedence of listed libraries synchronised
25544# with setup.py.
25545py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25547echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025548for py_libtermcap in "" ncursesw ncurses curses termcap; do
25549 if test -z "$py_libtermcap"; then
25550 READLINE_LIBS="-lreadline"
25551 else
25552 READLINE_LIBS="-lreadline -l$py_libtermcap"
25553 fi
25554 LIBS="$READLINE_LIBS $LIBS_no_readline"
25555 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025556/* confdefs.h. */
25557_ACEOF
25558cat confdefs.h >>conftest.$ac_ext
25559cat >>conftest.$ac_ext <<_ACEOF
25560/* end confdefs.h. */
25561
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562/* Override any GCC internal prototype to avoid an error.
25563 Use char because int might match the return type of a GCC
25564 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025565#ifdef __cplusplus
25566extern "C"
25567#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025568char readline ();
25569int
25570main ()
25571{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025572return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025573 ;
25574 return 0;
25575}
25576_ACEOF
25577rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025578if { (ac_try="$ac_link"
25579case "(($ac_try" in
25580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25581 *) ac_try_echo=$ac_try;;
25582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025584 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025585 ac_status=$?
25586 grep -v '^ *+' conftest.er1 >conftest.err
25587 rm -f conftest.er1
25588 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025590 (exit $ac_status); } && {
25591 test -z "$ac_c_werror_flag" ||
25592 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025593 } && test -s conftest$ac_exeext &&
25594 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025595 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025597 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025598sed 's/^/| /' conftest.$ac_ext >&5
25599
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025600
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025602
25603rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025604 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025605 if test $py_cv_lib_readline = yes; then
25606 break
25607 fi
25608done
25609# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25610#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025611if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025612 { echo "$as_me:$LINENO: result: none" >&5
25613echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025614else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025615 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25616echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025617
25618cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025619#define HAVE_LIBREADLINE 1
25620_ACEOF
25621
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025622fi
25623
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025624# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025625{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25626echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025627if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025628 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025629else
25630 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025631LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025632cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025633/* confdefs.h. */
25634_ACEOF
25635cat confdefs.h >>conftest.$ac_ext
25636cat >>conftest.$ac_ext <<_ACEOF
25637/* end confdefs.h. */
25638
Martin v. Löwiseba40652007-08-30 20:10:57 +000025639/* Override any GCC internal prototype to avoid an error.
25640 Use char because int might match the return type of a GCC
25641 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025642#ifdef __cplusplus
25643extern "C"
25644#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025645char rl_callback_handler_install ();
25646int
25647main ()
25648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025649return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025650 ;
25651 return 0;
25652}
25653_ACEOF
25654rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025655if { (ac_try="$ac_link"
25656case "(($ac_try" in
25657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25658 *) ac_try_echo=$ac_try;;
25659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025663 grep -v '^ *+' conftest.er1 >conftest.err
25664 rm -f conftest.er1
25665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025667 (exit $ac_status); } && {
25668 test -z "$ac_c_werror_flag" ||
25669 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025670 } && test -s conftest$ac_exeext &&
25671 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025672 ac_cv_lib_readline_rl_callback_handler_install=yes
25673else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025674 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025675sed 's/^/| /' conftest.$ac_ext >&5
25676
Martin v. Löwiseba40652007-08-30 20:10:57 +000025677 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025679
25680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025681 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025682LIBS=$ac_check_lib_save_LIBS
25683fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025684{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25685echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25686if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025687
25688cat >>confdefs.h <<\_ACEOF
25689#define HAVE_RL_CALLBACK 1
25690_ACEOF
25691
25692fi
25693
25694
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025695# check for readline 2.2
25696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025697/* confdefs.h. */
25698_ACEOF
25699cat confdefs.h >>conftest.$ac_ext
25700cat >>conftest.$ac_ext <<_ACEOF
25701/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025702#include <readline/readline.h>
25703_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025704if { (ac_try="$ac_cpp conftest.$ac_ext"
25705case "(($ac_try" in
25706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25707 *) ac_try_echo=$ac_try;;
25708esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025711 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025712 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025713 rm -f conftest.er1
25714 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716 (exit $ac_status); } >/dev/null && {
25717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25718 test ! -s conftest.err
25719 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025720 have_readline=yes
25721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025723sed 's/^/| /' conftest.$ac_ext >&5
25724
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025725 have_readline=no
25726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025728rm -f conftest.err conftest.$ac_ext
25729if test $have_readline = yes
25730then
25731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025732/* confdefs.h. */
25733_ACEOF
25734cat confdefs.h >>conftest.$ac_ext
25735cat >>conftest.$ac_ext <<_ACEOF
25736/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025737#include <readline/readline.h>
25738
25739_ACEOF
25740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025741 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025742
25743cat >>confdefs.h <<\_ACEOF
25744#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25745_ACEOF
25746
25747fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000025748rm -f conftest*
25749
25750 cat >conftest.$ac_ext <<_ACEOF
25751/* confdefs.h. */
25752_ACEOF
25753cat confdefs.h >>conftest.$ac_ext
25754cat >>conftest.$ac_ext <<_ACEOF
25755/* end confdefs.h. */
25756#include <readline/readline.h>
25757
25758_ACEOF
25759if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25760 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25761
25762cat >>confdefs.h <<\_ACEOF
25763#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25764_ACEOF
25765
25766fi
25767rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025768
25769fi
25770
Martin v. Löwis0daad592001-09-30 21:09:59 +000025771# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025772{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25773echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025774if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025776else
Martin v. Löwis11437992002-04-12 09:54:03 +000025777 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025778LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025780/* confdefs.h. */
25781_ACEOF
25782cat confdefs.h >>conftest.$ac_ext
25783cat >>conftest.$ac_ext <<_ACEOF
25784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025785
Martin v. Löwiseba40652007-08-30 20:10:57 +000025786/* Override any GCC internal prototype to avoid an error.
25787 Use char because int might match the return type of a GCC
25788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025789#ifdef __cplusplus
25790extern "C"
25791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025792char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025793int
25794main ()
25795{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025796return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025797 ;
25798 return 0;
25799}
25800_ACEOF
25801rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802if { (ac_try="$ac_link"
25803case "(($ac_try" in
25804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25805 *) ac_try_echo=$ac_try;;
25806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025810 grep -v '^ *+' conftest.er1 >conftest.err
25811 rm -f conftest.er1
25812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814 (exit $ac_status); } && {
25815 test -z "$ac_c_werror_flag" ||
25816 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025817 } && test -s conftest$ac_exeext &&
25818 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025819 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025822sed 's/^/| /' conftest.$ac_ext >&5
25823
Martin v. Löwiseba40652007-08-30 20:10:57 +000025824 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025826
25827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025829LIBS=$ac_check_lib_save_LIBS
25830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025831{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25832echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25833if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025834
Martin v. Löwis11437992002-04-12 09:54:03 +000025835cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025836#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025837_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025838
Martin v. Löwis0daad592001-09-30 21:09:59 +000025839fi
25840
Michael W. Hudson54241132001-12-07 15:38:26 +000025841
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025842# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025843{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25844echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025845if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025846 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025847else
25848 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025849LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025850cat >conftest.$ac_ext <<_ACEOF
25851/* confdefs.h. */
25852_ACEOF
25853cat confdefs.h >>conftest.$ac_ext
25854cat >>conftest.$ac_ext <<_ACEOF
25855/* end confdefs.h. */
25856
25857/* Override any GCC internal prototype to avoid an error.
25858 Use char because int might match the return type of a GCC
25859 builtin and then its argument prototype would still apply. */
25860#ifdef __cplusplus
25861extern "C"
25862#endif
25863char rl_completion_display_matches_hook ();
25864int
25865main ()
25866{
25867return rl_completion_display_matches_hook ();
25868 ;
25869 return 0;
25870}
25871_ACEOF
25872rm -f conftest.$ac_objext conftest$ac_exeext
25873if { (ac_try="$ac_link"
25874case "(($ac_try" in
25875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25876 *) ac_try_echo=$ac_try;;
25877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025879 (eval "$ac_link") 2>conftest.er1
25880 ac_status=$?
25881 grep -v '^ *+' conftest.er1 >conftest.err
25882 rm -f conftest.er1
25883 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025885 (exit $ac_status); } && {
25886 test -z "$ac_c_werror_flag" ||
25887 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025888 } && test -s conftest$ac_exeext &&
25889 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025890 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25891else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025892 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025893sed 's/^/| /' conftest.$ac_ext >&5
25894
25895 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25896fi
25897
25898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25899 conftest$ac_exeext conftest.$ac_ext
25900LIBS=$ac_check_lib_save_LIBS
25901fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025902{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25903echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25904if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025905
25906cat >>confdefs.h <<\_ACEOF
25907#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25908_ACEOF
25909
25910fi
25911
25912
Martin v. Löwis0daad592001-09-30 21:09:59 +000025913# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025914{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25915echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025916if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025918else
Martin v. Löwis11437992002-04-12 09:54:03 +000025919 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025920LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025922/* confdefs.h. */
25923_ACEOF
25924cat confdefs.h >>conftest.$ac_ext
25925cat >>conftest.$ac_ext <<_ACEOF
25926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025927
Martin v. Löwiseba40652007-08-30 20:10:57 +000025928/* Override any GCC internal prototype to avoid an error.
25929 Use char because int might match the return type of a GCC
25930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025931#ifdef __cplusplus
25932extern "C"
25933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025934char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025935int
25936main ()
25937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025938return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 ;
25940 return 0;
25941}
25942_ACEOF
25943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025944if { (ac_try="$ac_link"
25945case "(($ac_try" in
25946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25947 *) ac_try_echo=$ac_try;;
25948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025952 grep -v '^ *+' conftest.er1 >conftest.err
25953 rm -f conftest.er1
25954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025956 (exit $ac_status); } && {
25957 test -z "$ac_c_werror_flag" ||
25958 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025959 } && test -s conftest$ac_exeext &&
25960 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025961 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025964sed 's/^/| /' conftest.$ac_ext >&5
25965
Martin v. Löwiseba40652007-08-30 20:10:57 +000025966 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025968
25969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025971LIBS=$ac_check_lib_save_LIBS
25972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025973{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25974echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25975if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025976
Martin v. Löwis11437992002-04-12 09:54:03 +000025977cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025978#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025979_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025980
Guido van Rossum353ae582001-07-10 16:45:32 +000025981fi
25982
Jack Jansendd19cf82001-12-06 22:36:17 +000025983
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025984# also in readline 4.2
25985cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025986/* confdefs.h. */
25987_ACEOF
25988cat confdefs.h >>conftest.$ac_ext
25989cat >>conftest.$ac_ext <<_ACEOF
25990/* end confdefs.h. */
25991#include <readline/readline.h>
25992_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025993if { (ac_try="$ac_cpp conftest.$ac_ext"
25994case "(($ac_try" in
25995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25996 *) ac_try_echo=$ac_try;;
25997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025999 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026000 ac_status=$?
26001 grep -v '^ *+' conftest.er1 >conftest.err
26002 rm -f conftest.er1
26003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026005 (exit $ac_status); } >/dev/null && {
26006 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26007 test ! -s conftest.err
26008 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026009 have_readline=yes
26010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026011 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026012sed 's/^/| /' conftest.$ac_ext >&5
26013
26014 have_readline=no
26015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026016
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026017rm -f conftest.err conftest.$ac_ext
26018if test $have_readline = yes
26019then
26020 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026021/* confdefs.h. */
26022_ACEOF
26023cat confdefs.h >>conftest.$ac_ext
26024cat >>conftest.$ac_ext <<_ACEOF
26025/* end confdefs.h. */
26026#include <readline/readline.h>
26027
26028_ACEOF
26029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26030 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26031
26032cat >>confdefs.h <<\_ACEOF
26033#define HAVE_RL_CATCH_SIGNAL 1
26034_ACEOF
26035
26036fi
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026037rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026038
26039fi
26040
Martin v. Löwis82bca632006-02-10 20:49:30 +000026041# End of readline checks: restore LIBS
26042LIBS=$LIBS_no_readline
26043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026044{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26045echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026046if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026047 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026048else
Martin v. Löwis11437992002-04-12 09:54:03 +000026049
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026050if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026051 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026052else
Martin v. Löwis11437992002-04-12 09:54:03 +000026053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026054/* confdefs.h. */
26055_ACEOF
26056cat confdefs.h >>conftest.$ac_ext
26057cat >>conftest.$ac_ext <<_ACEOF
26058/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026059
26060int main()
26061{
26062 int val1 = nice(1);
26063 if (val1 != -1 && val1 == nice(2))
26064 exit(0);
26065 exit(1);
26066}
26067
Martin v. Löwis11437992002-04-12 09:54:03 +000026068_ACEOF
26069rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070if { (ac_try="$ac_link"
26071case "(($ac_try" in
26072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26073 *) ac_try_echo=$ac_try;;
26074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026076 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026077 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026079 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026080 { (case "(($ac_try" in
26081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26082 *) ac_try_echo=$ac_try;;
26083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026085 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026086 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026088 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026089 ac_cv_broken_nice=yes
26090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026091 echo "$as_me: program exited with status $ac_status" >&5
26092echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026093sed 's/^/| /' conftest.$ac_ext >&5
26094
Martin v. Löwis11437992002-04-12 09:54:03 +000026095( exit $ac_status )
26096ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026098rm -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 +000026099fi
26100
Martin v. Löwiseba40652007-08-30 20:10:57 +000026101
26102fi
26103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026104{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26105echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026106if test "$ac_cv_broken_nice" = yes
26107then
Martin v. Löwis11437992002-04-12 09:54:03 +000026108
26109cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026110#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026111_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026112
26113fi
26114
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026115{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26116echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026117if test "${ac_cv_broken_poll+set}" = set; then
26118 echo $ECHO_N "(cached) $ECHO_C" >&6
26119else
26120 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026121 ac_cv_broken_poll=no
26122else
26123 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026124/* confdefs.h. */
26125_ACEOF
26126cat confdefs.h >>conftest.$ac_ext
26127cat >>conftest.$ac_ext <<_ACEOF
26128/* end confdefs.h. */
26129
26130#include <poll.h>
26131
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026132int main()
26133{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026134 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026135 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026136
26137 close (42);
26138
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026139 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026140 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026141 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026142 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026143 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026144 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026145 return 1;
26146}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026147
26148_ACEOF
26149rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026150if { (ac_try="$ac_link"
26151case "(($ac_try" in
26152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26153 *) ac_try_echo=$ac_try;;
26154esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026156 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026157 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026159 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026160 { (case "(($ac_try" in
26161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26162 *) ac_try_echo=$ac_try;;
26163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026165 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026166 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026168 (exit $ac_status); }; }; then
26169 ac_cv_broken_poll=yes
26170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026171 echo "$as_me: program exited with status $ac_status" >&5
26172echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026173sed 's/^/| /' conftest.$ac_ext >&5
26174
26175( exit $ac_status )
26176ac_cv_broken_poll=no
26177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026178rm -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 +000026179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026180
26181
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026182fi
26183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026184{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26185echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026186if test "$ac_cv_broken_poll" = yes
26187then
26188
26189cat >>confdefs.h <<\_ACEOF
26190#define HAVE_BROKEN_POLL 1
26191_ACEOF
26192
26193fi
26194
Brett Cannon43802422005-02-10 20:48:03 +000026195# 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 +000026196# (which is not required by ISO C or UNIX spec) and/or if we support
26197# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026198{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26199echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026200if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026201 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026202else
26203 cat >conftest.$ac_ext <<_ACEOF
26204/* confdefs.h. */
26205_ACEOF
26206cat confdefs.h >>conftest.$ac_ext
26207cat >>conftest.$ac_ext <<_ACEOF
26208/* end confdefs.h. */
26209#include <sys/types.h>
26210#include <$ac_cv_struct_tm>
26211
26212
26213int
26214main ()
26215{
26216static struct tm ac_aggr;
26217if (ac_aggr.tm_zone)
26218return 0;
26219 ;
26220 return 0;
26221}
26222_ACEOF
26223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026224if { (ac_try="$ac_compile"
26225case "(($ac_try" in
26226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26227 *) ac_try_echo=$ac_try;;
26228esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026230 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026231 ac_status=$?
26232 grep -v '^ *+' conftest.er1 >conftest.err
26233 rm -f conftest.er1
26234 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026236 (exit $ac_status); } && {
26237 test -z "$ac_c_werror_flag" ||
26238 test ! -s conftest.err
26239 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026240 ac_cv_member_struct_tm_tm_zone=yes
26241else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026242 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026243sed 's/^/| /' conftest.$ac_ext >&5
26244
Martin v. Löwiseba40652007-08-30 20:10:57 +000026245 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026246/* confdefs.h. */
26247_ACEOF
26248cat confdefs.h >>conftest.$ac_ext
26249cat >>conftest.$ac_ext <<_ACEOF
26250/* end confdefs.h. */
26251#include <sys/types.h>
26252#include <$ac_cv_struct_tm>
26253
26254
26255int
26256main ()
26257{
26258static struct tm ac_aggr;
26259if (sizeof ac_aggr.tm_zone)
26260return 0;
26261 ;
26262 return 0;
26263}
26264_ACEOF
26265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026266if { (ac_try="$ac_compile"
26267case "(($ac_try" in
26268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26269 *) ac_try_echo=$ac_try;;
26270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026272 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026273 ac_status=$?
26274 grep -v '^ *+' conftest.er1 >conftest.err
26275 rm -f conftest.er1
26276 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026278 (exit $ac_status); } && {
26279 test -z "$ac_c_werror_flag" ||
26280 test ! -s conftest.err
26281 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026282 ac_cv_member_struct_tm_tm_zone=yes
26283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026284 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026285sed 's/^/| /' conftest.$ac_ext >&5
26286
Martin v. Löwiseba40652007-08-30 20:10:57 +000026287 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289
26290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026292
26293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026294fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026295{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26296echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26297if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026298
26299cat >>confdefs.h <<_ACEOF
26300#define HAVE_STRUCT_TM_TM_ZONE 1
26301_ACEOF
26302
26303
26304fi
26305
26306if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26307
26308cat >>confdefs.h <<\_ACEOF
26309#define HAVE_TM_ZONE 1
26310_ACEOF
26311
26312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026313 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26314echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026315if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026316 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026317else
26318 cat >conftest.$ac_ext <<_ACEOF
26319/* confdefs.h. */
26320_ACEOF
26321cat confdefs.h >>conftest.$ac_ext
26322cat >>conftest.$ac_ext <<_ACEOF
26323/* end confdefs.h. */
26324#include <time.h>
26325
26326int
26327main ()
26328{
26329#ifndef tzname
26330 (void) tzname;
26331#endif
26332
26333 ;
26334 return 0;
26335}
26336_ACEOF
26337rm -f conftest.$ac_objext
26338if { (ac_try="$ac_compile"
26339case "(($ac_try" in
26340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26341 *) ac_try_echo=$ac_try;;
26342esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026344 (eval "$ac_compile") 2>conftest.er1
26345 ac_status=$?
26346 grep -v '^ *+' conftest.er1 >conftest.err
26347 rm -f conftest.er1
26348 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026350 (exit $ac_status); } && {
26351 test -z "$ac_c_werror_flag" ||
26352 test ! -s conftest.err
26353 } && test -s conftest.$ac_objext; then
26354 ac_cv_have_decl_tzname=yes
26355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026356 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026357sed 's/^/| /' conftest.$ac_ext >&5
26358
26359 ac_cv_have_decl_tzname=no
26360fi
26361
26362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26363fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026364{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26365echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26366if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026367
26368cat >>confdefs.h <<_ACEOF
26369#define HAVE_DECL_TZNAME 1
26370_ACEOF
26371
26372
26373else
26374 cat >>confdefs.h <<_ACEOF
26375#define HAVE_DECL_TZNAME 0
26376_ACEOF
26377
26378
26379fi
26380
26381
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026382 { echo "$as_me:$LINENO: checking for tzname" >&5
26383echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026384if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026385 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026386else
26387 cat >conftest.$ac_ext <<_ACEOF
26388/* confdefs.h. */
26389_ACEOF
26390cat confdefs.h >>conftest.$ac_ext
26391cat >>conftest.$ac_ext <<_ACEOF
26392/* end confdefs.h. */
26393#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026394#if !HAVE_DECL_TZNAME
26395extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026396#endif
26397
26398int
26399main ()
26400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026401return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026402 ;
26403 return 0;
26404}
26405_ACEOF
26406rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026407if { (ac_try="$ac_link"
26408case "(($ac_try" in
26409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26410 *) ac_try_echo=$ac_try;;
26411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026413 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026414 ac_status=$?
26415 grep -v '^ *+' conftest.er1 >conftest.err
26416 rm -f conftest.er1
26417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026419 (exit $ac_status); } && {
26420 test -z "$ac_c_werror_flag" ||
26421 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026422 } && test -s conftest$ac_exeext &&
26423 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026424 ac_cv_var_tzname=yes
26425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026426 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026427sed 's/^/| /' conftest.$ac_ext >&5
26428
Martin v. Löwiseba40652007-08-30 20:10:57 +000026429 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431
26432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026433 conftest$ac_exeext conftest.$ac_ext
26434fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026435{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26436echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026437 if test $ac_cv_var_tzname = yes; then
26438
26439cat >>confdefs.h <<\_ACEOF
26440#define HAVE_TZNAME 1
26441_ACEOF
26442
26443 fi
26444fi
26445
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026446
Martin v. Löwis1d459062005-03-14 21:23:33 +000026447# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026448{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26449echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026450if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026451 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026452else
26453
26454if test "$cross_compiling" = yes; then
26455 ac_cv_working_tzset=no
26456else
26457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026458/* confdefs.h. */
26459_ACEOF
26460cat confdefs.h >>conftest.$ac_ext
26461cat >>conftest.$ac_ext <<_ACEOF
26462/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026463
26464#include <stdlib.h>
26465#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026466#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026467
26468#if HAVE_TZNAME
26469extern char *tzname[];
26470#endif
26471
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026472int main()
26473{
Brett Cannon18367812003-09-19 00:59:16 +000026474 /* Note that we need to ensure that not only does tzset(3)
26475 do 'something' with localtime, but it works as documented
26476 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026477 This includes making sure that tzname is set properly if
26478 tm->tm_zone does not exist since it is the alternative way
26479 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026480
26481 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026482 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026483 */
26484
Martin v. Löwis1d459062005-03-14 21:23:33 +000026485 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026486 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26487
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026488 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026489 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026490 if (localtime(&groundhogday)->tm_hour != 0)
26491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026492#if HAVE_TZNAME
26493 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26494 if (strcmp(tzname[0], "UTC") ||
26495 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26496 exit(1);
26497#endif
Brett Cannon18367812003-09-19 00:59:16 +000026498
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026499 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026500 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026501 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026502 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026503#if HAVE_TZNAME
26504 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26505 exit(1);
26506#endif
Brett Cannon18367812003-09-19 00:59:16 +000026507
26508 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26509 tzset();
26510 if (localtime(&groundhogday)->tm_hour != 11)
26511 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026512#if HAVE_TZNAME
26513 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26514 exit(1);
26515#endif
26516
26517#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026518 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26519 exit(1);
26520 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26521 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026522#endif
Brett Cannon18367812003-09-19 00:59:16 +000026523
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026524 exit(0);
26525}
26526
26527_ACEOF
26528rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026529if { (ac_try="$ac_link"
26530case "(($ac_try" in
26531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26532 *) ac_try_echo=$ac_try;;
26533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026535 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026536 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026538 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026539 { (case "(($ac_try" in
26540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26541 *) ac_try_echo=$ac_try;;
26542esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026544 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026545 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026547 (exit $ac_status); }; }; then
26548 ac_cv_working_tzset=yes
26549else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026550 echo "$as_me: program exited with status $ac_status" >&5
26551echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026552sed 's/^/| /' conftest.$ac_ext >&5
26553
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026554( exit $ac_status )
26555ac_cv_working_tzset=no
26556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557rm -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 +000026558fi
26559
Martin v. Löwiseba40652007-08-30 20:10:57 +000026560
26561fi
26562
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026563{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26564echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026565if test "$ac_cv_working_tzset" = yes
26566then
26567
26568cat >>confdefs.h <<\_ACEOF
26569#define HAVE_WORKING_TZSET 1
26570_ACEOF
26571
26572fi
26573
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026574# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026575{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26576echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026577if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026578 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026579else
26580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026581/* confdefs.h. */
26582_ACEOF
26583cat confdefs.h >>conftest.$ac_ext
26584cat >>conftest.$ac_ext <<_ACEOF
26585/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026586#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026587int
26588main ()
26589{
26590
26591struct stat st;
26592st.st_mtim.tv_nsec = 1;
26593
26594 ;
26595 return 0;
26596}
26597_ACEOF
26598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026599if { (ac_try="$ac_compile"
26600case "(($ac_try" in
26601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26602 *) ac_try_echo=$ac_try;;
26603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026607 grep -v '^ *+' conftest.er1 >conftest.err
26608 rm -f conftest.er1
26609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026611 (exit $ac_status); } && {
26612 test -z "$ac_c_werror_flag" ||
26613 test ! -s conftest.err
26614 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026615 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026618sed 's/^/| /' conftest.$ac_ext >&5
26619
Martin v. Löwiseba40652007-08-30 20:10:57 +000026620 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026621fi
26622
Martin v. Löwiseba40652007-08-30 20:10:57 +000026623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26624fi
26625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026626{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26627echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026628if test "$ac_cv_stat_tv_nsec" = yes
26629then
26630
26631cat >>confdefs.h <<\_ACEOF
26632#define HAVE_STAT_TV_NSEC 1
26633_ACEOF
26634
26635fi
26636
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026637# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026638{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26639echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026640if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026642else
26643 cat >conftest.$ac_ext <<_ACEOF
26644/* confdefs.h. */
26645_ACEOF
26646cat confdefs.h >>conftest.$ac_ext
26647cat >>conftest.$ac_ext <<_ACEOF
26648/* end confdefs.h. */
26649#include <sys/stat.h>
26650int
26651main ()
26652{
26653
26654struct stat st;
26655st.st_mtimespec.tv_nsec = 1;
26656
26657 ;
26658 return 0;
26659}
26660_ACEOF
26661rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026662if { (ac_try="$ac_compile"
26663case "(($ac_try" in
26664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26665 *) ac_try_echo=$ac_try;;
26666esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026669 ac_status=$?
26670 grep -v '^ *+' conftest.er1 >conftest.err
26671 rm -f conftest.er1
26672 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674 (exit $ac_status); } && {
26675 test -z "$ac_c_werror_flag" ||
26676 test ! -s conftest.err
26677 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026678 ac_cv_stat_tv_nsec2=yes
26679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026680 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026681sed 's/^/| /' conftest.$ac_ext >&5
26682
Martin v. Löwiseba40652007-08-30 20:10:57 +000026683 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026684fi
26685
Martin v. Löwiseba40652007-08-30 20:10:57 +000026686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26687fi
26688
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026689{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26690echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026691if test "$ac_cv_stat_tv_nsec2" = yes
26692then
26693
26694cat >>confdefs.h <<\_ACEOF
26695#define HAVE_STAT_TV_NSEC2 1
26696_ACEOF
26697
26698fi
26699
Jack Jansen666b1e72001-10-31 12:11:48 +000026700# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026701{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26702echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026703if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026704 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026705else
Martin v. Löwis11437992002-04-12 09:54:03 +000026706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026707/* confdefs.h. */
26708_ACEOF
26709cat confdefs.h >>conftest.$ac_ext
26710cat >>conftest.$ac_ext <<_ACEOF
26711/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026712#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026713int
26714main ()
26715{
Jack Jansen666b1e72001-10-31 12:11:48 +000026716
26717 int rtn;
26718 rtn = mvwdelch(0,0,0);
26719
Martin v. Löwis11437992002-04-12 09:54:03 +000026720 ;
26721 return 0;
26722}
26723_ACEOF
26724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026725if { (ac_try="$ac_compile"
26726case "(($ac_try" in
26727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26728 *) ac_try_echo=$ac_try;;
26729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026733 grep -v '^ *+' conftest.er1 >conftest.err
26734 rm -f conftest.er1
26735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026737 (exit $ac_status); } && {
26738 test -z "$ac_c_werror_flag" ||
26739 test ! -s conftest.err
26740 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026741 ac_cv_mvwdelch_is_expression=yes
26742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026744sed 's/^/| /' conftest.$ac_ext >&5
26745
Martin v. Löwiseba40652007-08-30 20:10:57 +000026746 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026747fi
26748
Martin v. Löwiseba40652007-08-30 20:10:57 +000026749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26750fi
26751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026752{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26753echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026754
26755if test "$ac_cv_mvwdelch_is_expression" = yes
26756then
Martin v. Löwis11437992002-04-12 09:54:03 +000026757
26758cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026759#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026760_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026761
26762fi
26763
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026764{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26765echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026766if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026767 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026768else
Martin v. Löwis11437992002-04-12 09:54:03 +000026769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026770/* confdefs.h. */
26771_ACEOF
26772cat confdefs.h >>conftest.$ac_ext
26773cat >>conftest.$ac_ext <<_ACEOF
26774/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026775#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026776int
26777main ()
26778{
Jack Jansen666b1e72001-10-31 12:11:48 +000026779
26780 WINDOW *w;
26781 w->_flags = 0;
26782
Martin v. Löwis11437992002-04-12 09:54:03 +000026783 ;
26784 return 0;
26785}
26786_ACEOF
26787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026788if { (ac_try="$ac_compile"
26789case "(($ac_try" in
26790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26791 *) ac_try_echo=$ac_try;;
26792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026796 grep -v '^ *+' conftest.er1 >conftest.err
26797 rm -f conftest.er1
26798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026800 (exit $ac_status); } && {
26801 test -z "$ac_c_werror_flag" ||
26802 test ! -s conftest.err
26803 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026804 ac_cv_window_has_flags=yes
26805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026807sed 's/^/| /' conftest.$ac_ext >&5
26808
Martin v. Löwiseba40652007-08-30 20:10:57 +000026809 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026810fi
26811
Martin v. Löwiseba40652007-08-30 20:10:57 +000026812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26813fi
26814
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026815{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26816echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026817
Jack Jansen666b1e72001-10-31 12:11:48 +000026818
26819if test "$ac_cv_window_has_flags" = yes
26820then
Martin v. Löwis11437992002-04-12 09:54:03 +000026821
26822cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026823#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026824_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026825
26826fi
26827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026828{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26829echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026830cat >conftest.$ac_ext <<_ACEOF
26831/* confdefs.h. */
26832_ACEOF
26833cat confdefs.h >>conftest.$ac_ext
26834cat >>conftest.$ac_ext <<_ACEOF
26835/* end confdefs.h. */
26836#include <curses.h>
26837int
26838main ()
26839{
26840void *x=is_term_resized
26841 ;
26842 return 0;
26843}
26844_ACEOF
26845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026846if { (ac_try="$ac_compile"
26847case "(($ac_try" in
26848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26849 *) ac_try_echo=$ac_try;;
26850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026852 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026853 ac_status=$?
26854 grep -v '^ *+' conftest.er1 >conftest.err
26855 rm -f conftest.er1
26856 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026858 (exit $ac_status); } && {
26859 test -z "$ac_c_werror_flag" ||
26860 test ! -s conftest.err
26861 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026862
26863cat >>confdefs.h <<\_ACEOF
26864#define HAVE_CURSES_IS_TERM_RESIZED 1
26865_ACEOF
26866
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026867 { echo "$as_me:$LINENO: result: yes" >&5
26868echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026869else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026870 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026871sed 's/^/| /' conftest.$ac_ext >&5
26872
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026873 { echo "$as_me:$LINENO: result: no" >&5
26874echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026875
26876fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026877
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026880{ echo "$as_me:$LINENO: checking for resize_term" >&5
26881echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026882cat >conftest.$ac_ext <<_ACEOF
26883/* confdefs.h. */
26884_ACEOF
26885cat confdefs.h >>conftest.$ac_ext
26886cat >>conftest.$ac_ext <<_ACEOF
26887/* end confdefs.h. */
26888#include <curses.h>
26889int
26890main ()
26891{
26892void *x=resize_term
26893 ;
26894 return 0;
26895}
26896_ACEOF
26897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026898if { (ac_try="$ac_compile"
26899case "(($ac_try" in
26900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26901 *) ac_try_echo=$ac_try;;
26902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026904 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026905 ac_status=$?
26906 grep -v '^ *+' conftest.er1 >conftest.err
26907 rm -f conftest.er1
26908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026910 (exit $ac_status); } && {
26911 test -z "$ac_c_werror_flag" ||
26912 test ! -s conftest.err
26913 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026914
26915cat >>confdefs.h <<\_ACEOF
26916#define HAVE_CURSES_RESIZE_TERM 1
26917_ACEOF
26918
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026919 { echo "$as_me:$LINENO: result: yes" >&5
26920echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026922 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026923sed 's/^/| /' conftest.$ac_ext >&5
26924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026925 { echo "$as_me:$LINENO: result: no" >&5
26926echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026927
26928fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026929
Martin v. Löwiseba40652007-08-30 20:10:57 +000026930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026932{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26933echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026934cat >conftest.$ac_ext <<_ACEOF
26935/* confdefs.h. */
26936_ACEOF
26937cat confdefs.h >>conftest.$ac_ext
26938cat >>conftest.$ac_ext <<_ACEOF
26939/* end confdefs.h. */
26940#include <curses.h>
26941int
26942main ()
26943{
26944void *x=resizeterm
26945 ;
26946 return 0;
26947}
26948_ACEOF
26949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026950if { (ac_try="$ac_compile"
26951case "(($ac_try" in
26952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26953 *) ac_try_echo=$ac_try;;
26954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026956 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026957 ac_status=$?
26958 grep -v '^ *+' conftest.er1 >conftest.err
26959 rm -f conftest.er1
26960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026962 (exit $ac_status); } && {
26963 test -z "$ac_c_werror_flag" ||
26964 test ! -s conftest.err
26965 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026966
26967cat >>confdefs.h <<\_ACEOF
26968#define HAVE_CURSES_RESIZETERM 1
26969_ACEOF
26970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026971 { echo "$as_me:$LINENO: result: yes" >&5
26972echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026973else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026974 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026975sed 's/^/| /' conftest.$ac_ext >&5
26976
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026977 { echo "$as_me:$LINENO: result: no" >&5
26978echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026979
26980fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026981
Martin v. Löwiseba40652007-08-30 20:10:57 +000026982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026984{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26985echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026986
26987if test -r /dev/ptmx
26988then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026989 { echo "$as_me:$LINENO: result: yes" >&5
26990echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026991
26992cat >>confdefs.h <<\_ACEOF
26993#define HAVE_DEV_PTMX 1
26994_ACEOF
26995
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026997 { echo "$as_me:$LINENO: result: no" >&5
26998echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026999fi
27000
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027001{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27002echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027003
27004if test -r /dev/ptc
27005then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027006 { echo "$as_me:$LINENO: result: yes" >&5
27007echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027008
27009cat >>confdefs.h <<\_ACEOF
27010#define HAVE_DEV_PTC 1
27011_ACEOF
27012
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014 { echo "$as_me:$LINENO: result: no" >&5
27015echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027016fi
27017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027018{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27019echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027020if test "${ac_cv_have_size_t_format+set}" = set; then
27021 echo $ECHO_N "(cached) $ECHO_C" >&6
27022else
27023 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027024 ac_cv_have_size_t_format="cross -- assuming yes"
27025
Brett Cannon09d12362006-05-11 05:11:33 +000027026else
27027 cat >conftest.$ac_ext <<_ACEOF
27028/* confdefs.h. */
27029_ACEOF
27030cat confdefs.h >>conftest.$ac_ext
27031cat >>conftest.$ac_ext <<_ACEOF
27032/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027033
Brett Cannon09d12362006-05-11 05:11:33 +000027034#include <stdio.h>
27035#include <stddef.h>
27036#include <string.h>
27037
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027038#ifdef HAVE_SYS_TYPES_H
27039#include <sys/types.h>
27040#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027041
27042#ifdef HAVE_SSIZE_T
27043typedef ssize_t Py_ssize_t;
27044#elif SIZEOF_VOID_P == SIZEOF_LONG
27045typedef long Py_ssize_t;
27046#else
27047typedef int Py_ssize_t;
27048#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027049
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027050int main()
27051{
27052 char buffer[256];
27053
Brett Cannon09d12362006-05-11 05:11:33 +000027054 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27055 return 1;
27056
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027057 if (strcmp(buffer, "123"))
27058 return 1;
27059
27060 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27061 return 1;
27062
27063 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027064 return 1;
27065
27066 return 0;
27067}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027068
Brett Cannon09d12362006-05-11 05:11:33 +000027069_ACEOF
27070rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027071if { (ac_try="$ac_link"
27072case "(($ac_try" in
27073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27074 *) ac_try_echo=$ac_try;;
27075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027077 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027078 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027081 { (case "(($ac_try" in
27082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27083 *) ac_try_echo=$ac_try;;
27084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027087 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027089 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027090 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027091else
27092 echo "$as_me: program exited with status $ac_status" >&5
27093echo "$as_me: failed program was:" >&5
27094sed 's/^/| /' conftest.$ac_ext >&5
27095
27096( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027097ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027098fi
27099rm -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 +000027100fi
27101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027102
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027103fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027104{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27105echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027106if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027107
27108cat >>confdefs.h <<\_ACEOF
27109#define PY_FORMAT_SIZE_T "z"
27110_ACEOF
27111
27112fi
27113
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027114{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27115echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027116if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027118else
Martin v. Löwis11437992002-04-12 09:54:03 +000027119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027120/* confdefs.h. */
27121_ACEOF
27122cat confdefs.h >>conftest.$ac_ext
27123cat >>conftest.$ac_ext <<_ACEOF
27124/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027125
27126#ifdef HAVE_SYS_TYPES_H
27127#include <sys/types.h>
27128#endif
27129#ifdef HAVE_SYS_SOCKET_H
27130#include <sys/socket.h>
27131#endif
27132
27133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027134typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027135int
27136main ()
27137{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027138if ((ac__type_new_ *) 0)
27139 return 0;
27140if (sizeof (ac__type_new_))
27141 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027142 ;
27143 return 0;
27144}
27145_ACEOF
27146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027147if { (ac_try="$ac_compile"
27148case "(($ac_try" in
27149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27150 *) ac_try_echo=$ac_try;;
27151esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027155 grep -v '^ *+' conftest.er1 >conftest.err
27156 rm -f conftest.er1
27157 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027159 (exit $ac_status); } && {
27160 test -z "$ac_c_werror_flag" ||
27161 test ! -s conftest.err
27162 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027163 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027164else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027166sed 's/^/| /' conftest.$ac_ext >&5
27167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027168 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027170
27171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027172fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027173{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27174echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27175if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027176 :
27177else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027178
Martin v. Löwis01c04012002-11-11 14:58:44 +000027179cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027180#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027181_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027182
27183fi
27184
Michael W. Hudson54241132001-12-07 15:38:26 +000027185
Michael W. Hudson54241132001-12-07 15:38:26 +000027186
27187
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027188for h in `(cd $srcdir;echo Python/thread_*.h)`
27189do
27190 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27191done
27192
Michael W. Hudson54241132001-12-07 15:38:26 +000027193
Neal Norwitzd24499d2005-12-18 21:36:39 +000027194SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027195{ echo "$as_me:$LINENO: checking for build directories" >&5
27196echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027197for dir in $SRCDIRS; do
27198 if test ! -d $dir; then
27199 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027200 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027201done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027202{ echo "$as_me:$LINENO: result: done" >&5
27203echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027204
Guido van Rossum627b2d71993-12-24 10:39:16 +000027205# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027206ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027207
Martin v. Löwis11437992002-04-12 09:54:03 +000027208cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027209# This file is a shell script that caches the results of configure
27210# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027211# scripts and configure runs, see configure's option --config-cache.
27212# It is not useful on other systems. If it contains results you don't
27213# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027214#
Martin v. Löwis11437992002-04-12 09:54:03 +000027215# config.status only pays attention to the cache file if you give it
27216# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027217#
Skip Montanaro6dead952003-09-25 14:50:04 +000027218# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027219# loading this file, other *unset* `ac_cv_foo' will be assigned the
27220# following values.
27221
27222_ACEOF
27223
Guido van Rossumf78abae1997-01-21 22:02:36 +000027224# The following way of writing the cache mishandles newlines in values,
27225# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027226# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027227# Ultrix sh set writes to stderr and can't be redirected directly,
27228# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027229(
27230 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27231 eval ac_val=\$$ac_var
27232 case $ac_val in #(
27233 *${as_nl}*)
27234 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027235 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27236echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027237 esac
27238 case $ac_var in #(
27239 _ | IFS | as_nl) ;; #(
27240 *) $as_unset $ac_var ;;
27241 esac ;;
27242 esac
27243 done
27244
Martin v. Löwis11437992002-04-12 09:54:03 +000027245 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027246 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27247 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027248 # `set' does not quote correctly, so add quotes (double-quote
27249 # substitution turns \\\\ into \\, and sed turns \\ into \).
27250 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027251 "s/'/'\\\\''/g;
27252 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027253 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027254 *)
27255 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027256 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027258 esac |
27259 sort
27260) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027261 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027262 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027263 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027264 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027265 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27266 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027267 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27268 :end' >>confcache
27269if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27270 if test -w "$cache_file"; then
27271 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027272 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27273echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027274 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027275 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027276 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27277echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027278 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027279fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027280rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027281
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027282test "x$prefix" = xNONE && prefix=$ac_default_prefix
27283# Let make expand exec_prefix.
27284test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027285
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027286DEFS=-DHAVE_CONFIG_H
27287
Skip Montanaro6dead952003-09-25 14:50:04 +000027288ac_libobjs=
27289ac_ltlibobjs=
27290for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27291 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027292 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027293 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027294 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27295 # will be set to the directory where LIBOBJS objects are built.
27296 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27297 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027298done
27299LIBOBJS=$ac_libobjs
27300
27301LTLIBOBJS=$ac_ltlibobjs
27302
27303
Martin v. Löwis11437992002-04-12 09:54:03 +000027304
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027305: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027306ac_clean_files_save=$ac_clean_files
27307ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027308{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27309echo "$as_me: creating $CONFIG_STATUS" >&6;}
27310cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027311#! $SHELL
27312# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027313# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027314# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027315# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027316
Martin v. Löwis11437992002-04-12 09:54:03 +000027317debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027318ac_cs_recheck=false
27319ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027320SHELL=\${CONFIG_SHELL-$SHELL}
27321_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027322
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027323cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027324## --------------------- ##
27325## M4sh Initialization. ##
27326## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027327
Martin v. Löwiseba40652007-08-30 20:10:57 +000027328# Be more Bourne compatible
27329DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027330if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27331 emulate sh
27332 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027333 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027334 # is contrary to our usage. Disable this feature.
27335 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027336 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027337else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027338 case `(set -o) 2>/dev/null` in
27339 *posix*) set -o posix ;;
27340esac
27341
Martin v. Löwis11437992002-04-12 09:54:03 +000027342fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027343
Skip Montanaro6dead952003-09-25 14:50:04 +000027344
Martin v. Löwis11437992002-04-12 09:54:03 +000027345
27346
Martin v. Löwiseba40652007-08-30 20:10:57 +000027347# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027348# Avoid depending upon Character Ranges.
27349as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27350as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27351as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27352as_cr_digits='0123456789'
27353as_cr_alnum=$as_cr_Letters$as_cr_digits
27354
27355# The user is always right.
27356if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027357 echo "#! /bin/sh" >conf$$.sh
27358 echo "exit 0" >>conf$$.sh
27359 chmod +x conf$$.sh
27360 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27361 PATH_SEPARATOR=';'
27362 else
27363 PATH_SEPARATOR=:
27364 fi
27365 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027366fi
27367
Martin v. Löwiseba40652007-08-30 20:10:57 +000027368# Support unset when possible.
27369if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27370 as_unset=unset
27371else
27372 as_unset=false
27373fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027374
Martin v. Löwiseba40652007-08-30 20:10:57 +000027375
27376# IFS
27377# We need space, tab and new line, in precisely that order. Quoting is
27378# there to prevent editors from complaining about space-tab.
27379# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27380# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027381as_nl='
27382'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027383IFS=" "" $as_nl"
27384
27385# Find who we are. Look in the path if we contain no directory separator.
27386case $0 in
27387 *[\\/]* ) as_myself=$0 ;;
27388 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027389for as_dir in $PATH
27390do
27391 IFS=$as_save_IFS
27392 test -z "$as_dir" && as_dir=.
27393 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27394done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027395IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027396
Martin v. Löwiseba40652007-08-30 20:10:57 +000027397 ;;
27398esac
27399# We did not find ourselves, most probably we were run as `sh COMMAND'
27400# in which case we are not to be found in the path.
27401if test "x$as_myself" = x; then
27402 as_myself=$0
27403fi
27404if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027405 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027406 { (exit 1); exit 1; }
27407fi
27408
27409# Work around bugs in pre-3.0 UWIN ksh.
27410for as_var in ENV MAIL MAILPATH
27411do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27412done
27413PS1='$ '
27414PS2='> '
27415PS4='+ '
27416
27417# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027418for as_var in \
27419 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27420 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27421 LC_TELEPHONE LC_TIME
27422do
27423 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27424 eval $as_var=C; export $as_var
27425 else
27426 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27427 fi
27428done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027429
27430# Required to use basename.
27431if expr a : '\(a\)' >/dev/null 2>&1 &&
27432 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27433 as_expr=expr
27434else
27435 as_expr=false
27436fi
27437
27438if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27439 as_basename=basename
27440else
27441 as_basename=false
27442fi
27443
27444
27445# Name of the executable.
27446as_me=`$as_basename -- "$0" ||
27447$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27448 X"$0" : 'X\(//\)$' \| \
27449 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027450echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027451 sed '/^.*\/\([^/][^/]*\)\/*$/{
27452 s//\1/
27453 q
27454 }
27455 /^X\/\(\/\/\)$/{
27456 s//\1/
27457 q
27458 }
27459 /^X\/\(\/\).*/{
27460 s//\1/
27461 q
27462 }
27463 s/.*/./; q'`
27464
27465# CDPATH.
27466$as_unset CDPATH
27467
27468
27469
Martin v. Löwis11437992002-04-12 09:54:03 +000027470 as_lineno_1=$LINENO
27471 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027472 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027473 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027474
Martin v. Löwis11437992002-04-12 09:54:03 +000027475 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27476 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027477 # line-number line after each line using $LINENO; the second 'sed'
27478 # does the real work. The second script uses 'N' to pair each
27479 # line-number line with the line containing $LINENO, and appends
27480 # trailing '-' during substitution so that $LINENO is not a special
27481 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027482 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027483 # scripts with optimization help from Paolo Bonzini. Blame Lee
27484 # E. McMahon (1931-1989) for sed's syntax. :-)
27485 sed -n '
27486 p
27487 /[$]LINENO/=
27488 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027489 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027490 s/[$]LINENO.*/&-/
27491 t lineno
27492 b
27493 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027494 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027495 :loop
27496 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027497 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027498 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027499 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027500 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027501 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027502 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027503
Martin v. Löwis11437992002-04-12 09:54:03 +000027504 # Don't try to exec as it changes $[0], causing all sort of problems
27505 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027506 # original and so on. Autoconf is especially sensitive to this).
27507 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027508 # Exit status is that of the last command.
27509 exit
27510}
27511
27512
Martin v. Löwiseba40652007-08-30 20:10:57 +000027513if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27514 as_dirname=dirname
27515else
27516 as_dirname=false
27517fi
27518
27519ECHO_C= ECHO_N= ECHO_T=
27520case `echo -n x` in
27521-n*)
27522 case `echo 'x\c'` in
27523 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27524 *) ECHO_C='\c';;
27525 esac;;
27526*)
27527 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027529
Martin v. Löwiseba40652007-08-30 20:10:57 +000027530if expr a : '\(a\)' >/dev/null 2>&1 &&
27531 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027532 as_expr=expr
27533else
27534 as_expr=false
27535fi
27536
27537rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027538if test -d conf$$.dir; then
27539 rm -f conf$$.dir/conf$$.file
27540else
27541 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027542 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027544echo >conf$$.file
27545if ln -s conf$$.file conf$$ 2>/dev/null; then
27546 as_ln_s='ln -s'
27547 # ... but there are two gotchas:
27548 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27549 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27550 # In both cases, we have to default to `cp -p'.
27551 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027552 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027553elif ln conf$$.file conf$$ 2>/dev/null; then
27554 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027555else
27556 as_ln_s='cp -p'
27557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027558rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27559rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027560
Skip Montanaro6dead952003-09-25 14:50:04 +000027561if mkdir -p . 2>/dev/null; then
27562 as_mkdir_p=:
27563else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027564 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027565 as_mkdir_p=false
27566fi
27567
Martin v. Löwiseba40652007-08-30 20:10:57 +000027568if test -x / >/dev/null 2>&1; then
27569 as_test_x='test -x'
27570else
27571 if ls -dL / >/dev/null 2>&1; then
27572 as_ls_L_option=L
27573 else
27574 as_ls_L_option=
27575 fi
27576 as_test_x='
27577 eval sh -c '\''
27578 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027579 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027580 else
27581 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027582 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027583 esac;
27584 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27585 ???[sx]*):;;*)false;;esac;fi
27586 '\'' sh
27587 '
27588fi
27589as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027590
27591# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027592as_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 +000027593
27594# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027595as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027596
27597
Martin v. Löwis11437992002-04-12 09:54:03 +000027598exec 6>&1
27599
Martin v. Löwiseba40652007-08-30 20:10:57 +000027600# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027601# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027602# values after options handling.
27603ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027604This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027605generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027606
27607 CONFIG_FILES = $CONFIG_FILES
27608 CONFIG_HEADERS = $CONFIG_HEADERS
27609 CONFIG_LINKS = $CONFIG_LINKS
27610 CONFIG_COMMANDS = $CONFIG_COMMANDS
27611 $ $0 $@
27612
Martin v. Löwiseba40652007-08-30 20:10:57 +000027613on `(hostname || uname -n) 2>/dev/null | sed 1q`
27614"
27615
Martin v. Löwis11437992002-04-12 09:54:03 +000027616_ACEOF
27617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027618cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027619# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027620config_files="$ac_config_files"
27621config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027622
Martin v. Löwiseba40652007-08-30 20:10:57 +000027623_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027624
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027625cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027626ac_cs_usage="\
27627\`$as_me' instantiates files from templates according to the
27628current configuration.
27629
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027630Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027631
27632 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027633 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027634 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027635 -d, --debug don't remove temporary files
27636 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027637 --file=FILE[:TEMPLATE]
27638 instantiate the configuration file FILE
27639 --header=FILE[:TEMPLATE]
27640 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027641
27642Configuration files:
27643$config_files
27644
27645Configuration headers:
27646$config_headers
27647
27648Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027649
Martin v. Löwiseba40652007-08-30 20:10:57 +000027650_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027651cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027652ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027653python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027654configured by $0, generated by GNU Autoconf 2.61,
27655 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027656
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027657Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027658This config.status script is free software; the Free Software Foundation
27659gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027660
27661ac_pwd='$ac_pwd'
27662srcdir='$srcdir'
27663INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027664_ACEOF
27665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027666cat >>$CONFIG_STATUS <<\_ACEOF
27667# If no file are specified by the user, then we need to provide default
27668# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027669ac_need_defaults=:
27670while test $# != 0
27671do
27672 case $1 in
27673 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027674 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27675 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027676 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027677 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027678 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027679 ac_option=$1
27680 ac_optarg=$2
27681 ac_shift=shift
27682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027683 esac
27684
Skip Montanaro6dead952003-09-25 14:50:04 +000027685 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027686 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027687 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27688 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027689 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027690 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027691 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027692 debug=: ;;
27693 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027694 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027695 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027696 ac_need_defaults=false;;
27697 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027698 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027699 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027700 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027701 --he | --h)
27702 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027703 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027704Try \`$0 --help' for more information." >&2
27705 { (exit 1); exit 1; }; };;
27706 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027707 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027708 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27709 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27710 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027711
27712 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027713 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027714Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027715 { (exit 1); exit 1; }; } ;;
27716
Martin v. Löwiseba40652007-08-30 20:10:57 +000027717 *) ac_config_targets="$ac_config_targets $1"
27718 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027719
27720 esac
27721 shift
27722done
27723
Skip Montanaro6dead952003-09-25 14:50:04 +000027724ac_configure_extra_args=
27725
27726if $ac_cs_silent; then
27727 exec 6>/dev/null
27728 ac_configure_extra_args="$ac_configure_extra_args --silent"
27729fi
27730
27731_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027732cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027733if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027734 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27735 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027736 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027737 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027738fi
27739
Martin v. Löwis11437992002-04-12 09:54:03 +000027740_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027741cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027742exec 5>>config.log
27743{
27744 echo
27745 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27746## Running $as_me. ##
27747_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027748 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027749} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027750
Martin v. Löwiseba40652007-08-30 20:10:57 +000027751_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027752cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027753_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027755cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027756
27757# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027758for ac_config_target in $ac_config_targets
27759do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027760 case $ac_config_target in
27761 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27762 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27763 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27764 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027765 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27766 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027767 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27768 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027769 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027770
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027771 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27772echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027773 { (exit 1); exit 1; }; };;
27774 esac
27775done
27776
Martin v. Löwiseba40652007-08-30 20:10:57 +000027777
Martin v. Löwis11437992002-04-12 09:54:03 +000027778# If the user did not use the arguments to specify the items to instantiate,
27779# then the envvar interface is used. Set only those that are not.
27780# We use the long form for the default assignment because of an extremely
27781# bizarre bug on SunOS 4.1.3.
27782if $ac_need_defaults; then
27783 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27784 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27785fi
27786
Skip Montanaro6dead952003-09-25 14:50:04 +000027787# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027788# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027789# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027790# Hook for its removal unless debugging.
27791# Note that there is a small window in which the directory will not be cleaned:
27792# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027793$debug ||
27794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027795 tmp=
27796 trap 'exit_status=$?
27797 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27798' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027799 trap '{ (exit 1); exit 1; }' 1 2 13 15
27800}
Martin v. Löwis11437992002-04-12 09:54:03 +000027801# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027802
Martin v. Löwis11437992002-04-12 09:54:03 +000027803{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027804 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027805 test -n "$tmp" && test -d "$tmp"
27806} ||
27807{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027808 tmp=./conf$$-$RANDOM
27809 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027810} ||
27811{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027812 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027813 { (exit 1); exit 1; }
27814}
27815
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027816#
27817# Set up the sed scripts for CONFIG_FILES section.
27818#
27819
27820# No need to generate the scripts if there are no CONFIG_FILES.
27821# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027822if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027823
27824_ACEOF
27825
Martin v. Löwiseba40652007-08-30 20:10:57 +000027826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027827
Martin v. Löwiseba40652007-08-30 20:10:57 +000027828ac_delim='%!_!# '
27829for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027830 cat >conf$$subs.sed <<_ACEOF
27831SHELL!$SHELL$ac_delim
27832PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27833PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27834PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27835PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27836PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27837PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27838exec_prefix!$exec_prefix$ac_delim
27839prefix!$prefix$ac_delim
27840program_transform_name!$program_transform_name$ac_delim
27841bindir!$bindir$ac_delim
27842sbindir!$sbindir$ac_delim
27843libexecdir!$libexecdir$ac_delim
27844datarootdir!$datarootdir$ac_delim
27845datadir!$datadir$ac_delim
27846sysconfdir!$sysconfdir$ac_delim
27847sharedstatedir!$sharedstatedir$ac_delim
27848localstatedir!$localstatedir$ac_delim
27849includedir!$includedir$ac_delim
27850oldincludedir!$oldincludedir$ac_delim
27851docdir!$docdir$ac_delim
27852infodir!$infodir$ac_delim
27853htmldir!$htmldir$ac_delim
27854dvidir!$dvidir$ac_delim
27855pdfdir!$pdfdir$ac_delim
27856psdir!$psdir$ac_delim
27857libdir!$libdir$ac_delim
27858localedir!$localedir$ac_delim
27859mandir!$mandir$ac_delim
27860DEFS!$DEFS$ac_delim
27861ECHO_C!$ECHO_C$ac_delim
27862ECHO_N!$ECHO_N$ac_delim
27863ECHO_T!$ECHO_T$ac_delim
27864LIBS!$LIBS$ac_delim
27865build_alias!$build_alias$ac_delim
27866host_alias!$host_alias$ac_delim
27867target_alias!$target_alias$ac_delim
27868VERSION!$VERSION$ac_delim
27869SOVERSION!$SOVERSION$ac_delim
27870CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27871UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27872ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27873PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27874PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27875PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27876PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27877PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27878FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27879FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27880FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27881FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27882FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27883MACHDEP!$MACHDEP$ac_delim
27884SGI_ABI!$SGI_ABI$ac_delim
27885EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27886EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27887CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27888EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27889CC!$CC$ac_delim
27890CFLAGS!$CFLAGS$ac_delim
27891LDFLAGS!$LDFLAGS$ac_delim
27892CPPFLAGS!$CPPFLAGS$ac_delim
27893ac_ct_CC!$ac_ct_CC$ac_delim
27894EXEEXT!$EXEEXT$ac_delim
27895OBJEXT!$OBJEXT$ac_delim
27896CXX!$CXX$ac_delim
27897MAINCC!$MAINCC$ac_delim
27898CPP!$CPP$ac_delim
27899GREP!$GREP$ac_delim
27900EGREP!$EGREP$ac_delim
27901BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27902LIBRARY!$LIBRARY$ac_delim
27903LDLIBRARY!$LDLIBRARY$ac_delim
27904DLLLIBRARY!$DLLLIBRARY$ac_delim
27905BLDLIBRARY!$BLDLIBRARY$ac_delim
27906LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27907INSTSONAME!$INSTSONAME$ac_delim
27908RUNSHARED!$RUNSHARED$ac_delim
27909LINKCC!$LINKCC$ac_delim
27910GNULD!$GNULD$ac_delim
27911RANLIB!$RANLIB$ac_delim
27912AR!$AR$ac_delim
27913ARFLAGS!$ARFLAGS$ac_delim
27914SVNVERSION!$SVNVERSION$ac_delim
27915INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27916INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27917INSTALL_DATA!$INSTALL_DATA$ac_delim
27918LN!$LN$ac_delim
27919OPT!$OPT$ac_delim
27920BASECFLAGS!$BASECFLAGS$ac_delim
27921UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27922OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27923LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27924SO!$SO$ac_delim
27925LDSHARED!$LDSHARED$ac_delim
27926BLDSHARED!$BLDSHARED$ac_delim
27927CCSHARED!$CCSHARED$ac_delim
27928_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027930 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 +000027931 break
27932 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027933 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27934echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027935 { (exit 1); exit 1; }; }
27936 else
27937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027938 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027939done
27940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027941ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27942if test -n "$ac_eof"; then
27943 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27944 ac_eof=`expr $ac_eof + 1`
27945fi
27946
27947cat >>$CONFIG_STATUS <<_ACEOF
27948cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27949/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027950_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027951sed '
27952s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27953s/^/s,@/; s/!/@,|#_!!_#|/
27954:n
27955t n
27956s/'"$ac_delim"'$/,g/; t
27957s/$/\\/; p
27958N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27959' >>$CONFIG_STATUS <conf$$subs.sed
27960rm -f conf$$subs.sed
27961cat >>$CONFIG_STATUS <<_ACEOF
27962CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027963_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027964
27965
27966ac_delim='%!_!# '
27967for ac_last_try in false false false false false :; do
27968 cat >conf$$subs.sed <<_ACEOF
27969LINKFORSHARED!$LINKFORSHARED$ac_delim
27970CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27971SHLIBS!$SHLIBS$ac_delim
27972USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27973SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27974USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27975LDLAST!$LDLAST$ac_delim
27976THREADOBJ!$THREADOBJ$ac_delim
27977DLINCLDIR!$DLINCLDIR$ac_delim
27978DYNLOADFILE!$DYNLOADFILE$ac_delim
27979MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27980TRUE!$TRUE$ac_delim
27981LIBOBJS!$LIBOBJS$ac_delim
27982HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27983HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27984HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27985HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27986HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27987LIBM!$LIBM$ac_delim
27988LIBC!$LIBC$ac_delim
27989UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27990THREADHEADERS!$THREADHEADERS$ac_delim
27991SRCDIRS!$SRCDIRS$ac_delim
27992LTLIBOBJS!$LTLIBOBJS$ac_delim
27993_ACEOF
27994
27995 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27996 break
27997 elif $ac_last_try; then
27998 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27999echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028000 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028001 else
28002 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28003 fi
28004done
28005
28006ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28007if test -n "$ac_eof"; then
28008 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28009 ac_eof=`expr $ac_eof + 1`
28010fi
28011
28012cat >>$CONFIG_STATUS <<_ACEOF
28013cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28014/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028015_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028016sed '
28017s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28018s/^/s,@/; s/!/@,|#_!!_#|/
28019:n
28020t n
28021s/'"$ac_delim"'$/,g/; t
28022s/$/\\/; p
28023N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28024' >>$CONFIG_STATUS <conf$$subs.sed
28025rm -f conf$$subs.sed
28026cat >>$CONFIG_STATUS <<_ACEOF
28027:end
28028s/|#_!!_#|//g
28029CEOF$ac_eof
28030_ACEOF
28031
Martin v. Löwiseba40652007-08-30 20:10:57 +000028032
28033# VPATH may cause trouble with some makes, so we remove $(srcdir),
28034# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28035# trailing colons and then remove the whole line if VPATH becomes empty
28036# (actually we leave an empty line to preserve line numbers).
28037if test "x$srcdir" = x.; then
28038 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28039s/:*\$(srcdir):*/:/
28040s/:*\${srcdir}:*/:/
28041s/:*@srcdir@:*/:/
28042s/^\([^=]*=[ ]*\):*/\1/
28043s/:*$//
28044s/^[^=]*=[ ]*$//
28045}'
28046fi
28047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028048cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028049fi # test -n "$CONFIG_FILES"
28050
Martin v. Löwiseba40652007-08-30 20:10:57 +000028051
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028052for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028053do
28054 case $ac_tag in
28055 :[FHLC]) ac_mode=$ac_tag; continue;;
28056 esac
28057 case $ac_mode$ac_tag in
28058 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028059 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28060echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028061 { (exit 1); exit 1; }; };;
28062 :[FH]-) ac_tag=-:-;;
28063 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28064 esac
28065 ac_save_IFS=$IFS
28066 IFS=:
28067 set x $ac_tag
28068 IFS=$ac_save_IFS
28069 shift
28070 ac_file=$1
28071 shift
28072
28073 case $ac_mode in
28074 :L) ac_source=$1;;
28075 :[FH])
28076 ac_file_inputs=
28077 for ac_f
28078 do
28079 case $ac_f in
28080 -) ac_f="$tmp/stdin";;
28081 *) # Look for the file first in the build tree, then in the source tree
28082 # (if the path is not absolute). The absolute path cannot be DOS-style,
28083 # because $ac_f cannot contain `:'.
28084 test -f "$ac_f" ||
28085 case $ac_f in
28086 [\\/$]*) false;;
28087 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28088 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028089 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28090echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028091 { (exit 1); exit 1; }; };;
28092 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028093 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028094 done
28095
28096 # Let's still pretend it is `configure' which instantiates (i.e., don't
28097 # use $as_me), people would be surprised to read:
28098 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028099 configure_input="Generated from "`IFS=:
28100 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028101 if test x"$ac_file" != x-; then
28102 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028103 { echo "$as_me:$LINENO: creating $ac_file" >&5
28104echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028105 fi
28106
28107 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028108 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028109 esac
28110 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028111 esac
28112
Martin v. Löwiseba40652007-08-30 20:10:57 +000028113 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028114$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028115 X"$ac_file" : 'X\(//\)[^/]' \| \
28116 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028117 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028118echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028119 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28120 s//\1/
28121 q
28122 }
28123 /^X\(\/\/\)[^/].*/{
28124 s//\1/
28125 q
28126 }
28127 /^X\(\/\/\)$/{
28128 s//\1/
28129 q
28130 }
28131 /^X\(\/\).*/{
28132 s//\1/
28133 q
28134 }
28135 s/.*/./; q'`
28136 { as_dir="$ac_dir"
28137 case $as_dir in #(
28138 -*) as_dir=./$as_dir;;
28139 esac
28140 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028141 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028142 while :; do
28143 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028144 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028145 *) as_qdir=$as_dir;;
28146 esac
28147 as_dirs="'$as_qdir' $as_dirs"
28148 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028149$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028150 X"$as_dir" : 'X\(//\)[^/]' \| \
28151 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028152 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028153echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28155 s//\1/
28156 q
28157 }
28158 /^X\(\/\/\)[^/].*/{
28159 s//\1/
28160 q
28161 }
28162 /^X\(\/\/\)$/{
28163 s//\1/
28164 q
28165 }
28166 /^X\(\/\).*/{
28167 s//\1/
28168 q
28169 }
28170 s/.*/./; q'`
28171 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028172 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028173 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028174 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28175echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028176 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028177 ac_builddir=.
28178
Martin v. Löwiseba40652007-08-30 20:10:57 +000028179case "$ac_dir" in
28180.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28181*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028182 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028183 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028184 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028185 case $ac_top_builddir_sub in
28186 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28187 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28188 esac ;;
28189esac
28190ac_abs_top_builddir=$ac_pwd
28191ac_abs_builddir=$ac_pwd$ac_dir_suffix
28192# for backward compatibility:
28193ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028194
28195case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028196 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028197 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028198 ac_top_srcdir=$ac_top_builddir_sub
28199 ac_abs_top_srcdir=$ac_pwd ;;
28200 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028201 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028202 ac_top_srcdir=$srcdir
28203 ac_abs_top_srcdir=$srcdir ;;
28204 *) # Relative name.
28205 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28206 ac_top_srcdir=$ac_top_build_prefix$srcdir
28207 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028208esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028209ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028210
Martin v. Löwis11437992002-04-12 09:54:03 +000028211
Martin v. Löwiseba40652007-08-30 20:10:57 +000028212 case $ac_mode in
28213 :F)
28214 #
28215 # CONFIG_FILE
28216 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028217
28218 case $INSTALL in
28219 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028220 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028221 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028222_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028224cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028225# If the template does not know about datarootdir, expand it.
28226# FIXME: This hack should be removed a few years after 2.60.
28227ac_datarootdir_hack=; ac_datarootdir_seen=
28228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028229case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028230 p
28231 q
28232}
28233/@datadir@/p
28234/@docdir@/p
28235/@infodir@/p
28236/@localedir@/p
28237/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028238' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028239*datarootdir*) ac_datarootdir_seen=yes;;
28240*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028241 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28242echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028243_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028244cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028245 ac_datarootdir_hack='
28246 s&@datadir@&$datadir&g
28247 s&@docdir@&$docdir&g
28248 s&@infodir@&$infodir&g
28249 s&@localedir@&$localedir&g
28250 s&@mandir@&$mandir&g
28251 s&\\\${datarootdir}&$datarootdir&g' ;;
28252esac
28253_ACEOF
28254
28255# Neutralize VPATH when `$srcdir' = `.'.
28256# Shell code in configure.ac might set extrasub.
28257# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028258cat >>$CONFIG_STATUS <<_ACEOF
28259 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028260$extrasub
28261_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028262cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028263:t
28264/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028265s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028266s&@top_builddir@&$ac_top_builddir_sub&;t t
28267s&@srcdir@&$ac_srcdir&;t t
28268s&@abs_srcdir@&$ac_abs_srcdir&;t t
28269s&@top_srcdir@&$ac_top_srcdir&;t t
28270s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28271s&@builddir@&$ac_builddir&;t t
28272s&@abs_builddir@&$ac_abs_builddir&;t t
28273s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28274s&@INSTALL@&$ac_INSTALL&;t t
28275$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028276" $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 +000028277
Martin v. Löwiseba40652007-08-30 20:10:57 +000028278test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28279 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28280 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028281 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028282which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028283echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028284which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028285
Martin v. Löwiseba40652007-08-30 20:10:57 +000028286 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028287 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028288 -) cat "$tmp/out"; rm -f "$tmp/out";;
28289 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28290 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028291 ;;
28292 :H)
28293 #
28294 # CONFIG_HEADER
28295 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028296_ACEOF
28297
28298# Transform confdefs.h into a sed script `conftest.defines', that
28299# substitutes the proper values into config.h.in to produce config.h.
28300rm -f conftest.defines conftest.tail
28301# First, append a space to every undef/define line, to ease matching.
28302echo 's/$/ /' >conftest.defines
28303# Then, protect against being on the right side of a sed subst, or in
28304# an unquoted here document, in config.status. If some macros were
28305# called several times there might be several #defines for the same
28306# symbol, which is useless. But do not sort them, since the last
28307# AC_DEFINE must be honored.
28308ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28309# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28310# NAME is the cpp macro being defined, VALUE is the value it is being given.
28311# PARAMS is the parameter list in the macro definition--in most cases, it's
28312# just an empty string.
28313ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28314ac_dB='\\)[ (].*,\\1define\\2'
28315ac_dC=' '
28316ac_dD=' ,'
28317
28318uniq confdefs.h |
28319 sed -n '
28320 t rset
28321 :rset
28322 s/^[ ]*#[ ]*define[ ][ ]*//
28323 t ok
28324 d
28325 :ok
28326 s/[\\&,]/\\&/g
28327 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28328 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28329 ' >>conftest.defines
28330
28331# Remove the space that was appended to ease matching.
28332# Then replace #undef with comments. This is necessary, for
28333# example, in the case of _POSIX_SOURCE, which is predefined and required
28334# on some systems where configure will not decide to define it.
28335# (The regexp can be short, since the line contains either #define or #undef.)
28336echo 's/ $//
28337s,^[ #]*u.*,/* & */,' >>conftest.defines
28338
28339# Break up conftest.defines:
28340ac_max_sed_lines=50
28341
28342# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28343# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28344# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28345# et cetera.
28346ac_in='$ac_file_inputs'
28347ac_out='"$tmp/out1"'
28348ac_nxt='"$tmp/out2"'
28349
28350while :
28351do
28352 # Write a here document:
28353 cat >>$CONFIG_STATUS <<_ACEOF
28354 # First, check the format of the line:
28355 cat >"\$tmp/defines.sed" <<\\CEOF
28356/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28357/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28358b
28359:def
28360_ACEOF
28361 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28362 echo 'CEOF
28363 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28364 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28365 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28366 grep . conftest.tail >/dev/null || break
28367 rm -f conftest.defines
28368 mv conftest.tail conftest.defines
28369done
28370rm -f conftest.defines conftest.tail
28371
28372echo "ac_result=$ac_in" >>$CONFIG_STATUS
28373cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028374 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028375 echo "/* $configure_input */" >"$tmp/config.h"
28376 cat "$ac_result" >>"$tmp/config.h"
28377 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28378 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28379echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028380 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028381 rm -f $ac_file
28382 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028383 fi
28384 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028385 echo "/* $configure_input */"
28386 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028387 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028388 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028389 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028390
Martin v. Löwiseba40652007-08-30 20:10:57 +000028391
28392 esac
28393
28394done # for ac_tag
28395
Guido van Rossum627b2d71993-12-24 10:39:16 +000028396
Martin v. Löwis11437992002-04-12 09:54:03 +000028397{ (exit 0); exit 0; }
28398_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028399chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028400ac_clean_files=$ac_clean_files_save
28401
28402
28403# configure is writing to config.log, and then calls config.status.
28404# config.status does its own redirection, appending to config.log.
28405# Unfortunately, on DOS this fails, as config.log is still kept open
28406# by configure, so config.status won't be able to write to it; its
28407# output is simply discarded. So we exec the FD to /dev/null,
28408# effectively closing config.log, so it can be properly (re)opened and
28409# appended to by config.status. When coming back to configure, we
28410# need to make the FD available again.
28411if test "$no_create" != yes; then
28412 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028413 ac_config_status_args=
28414 test "$silent" = yes &&
28415 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028416 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028417 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028418 exec 5>>config.log
28419 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28420 # would make configure fail if this is the last instruction.
28421 $ac_cs_success || { (exit 1); exit 1; }
28422fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028423
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028424
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028425echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028426if test ! -f Modules/Setup
28427then
28428 cp $srcdir/Modules/Setup.dist Modules/Setup
28429fi
28430
Martin v. Löwisf7afe952006-04-14 15:16:15 +000028431echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028432if test ! -f Modules/Setup.local
28433then
28434 echo "# Edit this file for local setup changes" >Modules/Setup.local
28435fi
28436
28437echo "creating Makefile"
28438$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28439 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028440 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000028441
28442case $ac_sys_system in
28443BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028444 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028445
28446 Support for BeOS is deprecated as of Python 2.6.
28447 See PEP 11 for the gory details.
28448 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028449echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000028450
28451 Support for BeOS is deprecated as of Python 2.6.
28452 See PEP 11 for the gory details.
28453 " >&2;}
28454 ;;
28455*) ;;
28456esac
28457
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028458mv config.c Modules