blob: 284b01488bb0fabc8925c39cffab23e83c88ec79 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren23d92532009-09-07 06:12:00 +00002# From configure.in Revision: 74672 .
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"
1926
1927else
1928
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001929 { echo "$as_me:$LINENO: result: 32-bit" >&5
1930echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001931
1932fi
1933
1934
1935
1936
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001937
1938# Check whether --with-framework-name was given.
1939if test "${with_framework_name+set}" = set; then
1940 withval=$with_framework_name;
1941 PYTHONFRAMEWORK=${withval}
1942 PYTHONFRAMEWORKDIR=${withval}.framework
1943 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1944
1945else
1946
1947 PYTHONFRAMEWORK=Python
1948 PYTHONFRAMEWORKDIR=Python.framework
1949 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1950
1951fi
1952
Martin v. Löwiseba40652007-08-30 20:10:57 +00001953# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001954if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001955 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001956 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001957 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001958 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001959 esac
1960 case $enableval in
1961 no)
1962 PYTHONFRAMEWORK=
1963 PYTHONFRAMEWORKDIR=no-framework
1964 PYTHONFRAMEWORKPREFIX=
1965 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001966 FRAMEWORKINSTALLFIRST=
1967 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001968 FRAMEWORKALTINSTALLFIRST=
1969 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001970 if test "x${prefix}" = "xNONE"; then
1971 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1972 else
1973 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1974 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001975 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001976 ;;
1977 *)
1978 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001979 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001981 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1982 if test "$UNIVERSAL_ARCHS" = "all"
1983 then
1984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001986 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001987 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001988 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1989 fi
1990
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001991 if test "x${prefix}" = "xNONE" ; then
1992 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1993 else
1994 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1995 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001996 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001997
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001998 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001999 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002000 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002001
Martin v. Löwiseba40652007-08-30 20:10:57 +00002002 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002003
Martin v. Löwiseba40652007-08-30 20:10:57 +00002004 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002005
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002006 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2007
2008 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2009
Jack Jansene578a632001-08-15 01:27:14 +00002010 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002011
Guido van Rossum563e7081996-09-10 18:20:48 +00002012else
Martin v. Löwis11437992002-04-12 09:54:03 +00002013
Jack Jansene578a632001-08-15 01:27:14 +00002014 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002015 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002016 PYTHONFRAMEWORKPREFIX=
2017 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002018 FRAMEWORKINSTALLFIRST=
2019 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002020 FRAMEWORKALTINSTALLFIRST=
2021 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002022 if test "x${prefix}" = "xNONE" ; then
2023 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2024 else
2025 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2026 fi
Jack Jansene578a632001-08-15 01:27:14 +00002027 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002028
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002029 if test "$UNIVERSAL_ARCHS" = "all"
2030 then
2031 FRAMEWORKINSTALLLAST=update4wayuniversal
2032 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2033 fi
2034
Martin v. Löwiseba40652007-08-30 20:10:57 +00002035fi
2036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037
2038
2039
2040
Jack Jansene578a632001-08-15 01:27:14 +00002041
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002042
2043
Ronald Oussoren5b787322006-06-06 19:50:24 +00002044
2045
2046
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002047
Jack Jansene578a632001-08-15 01:27:14 +00002048##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002049## AC_HELP_STRING(--with-dyld,
2050## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002051##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052# Set name for machine-dependent library files
2053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002054{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2055echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002056if test -z "$MACHDEP"
2057then
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002059 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002060 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002061 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002062 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002063 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002065 ac_md_system=`echo $ac_sys_system |
2066 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2067 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002068 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002069 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002070
Guido van Rossum07397971997-04-29 21:49:50 +00002071 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002072 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002073 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002074 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002075 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002076 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002077 esac
2078fi
Guido van Rossum91922671997-10-09 20:24:13 +00002079
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002080# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2081# disable features if it is defined, without any means to access these
2082# features as extensions. For these systems, we skip the definition of
2083# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2084# some feature, make sure there is no alternative way to access this
2085# feature. Also, when using wildcards, make sure you have verified the
2086# need for not defining _XOPEN_SOURCE on all systems matching the
2087# wildcard, and that the wildcard does not include future systems
2088# (which may remove their limitations).
2089case $ac_sys_system/$ac_sys_release in
2090 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2091 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002092 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002093 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002094 define_xopen_source=no
2095 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2096 # also defined. This can be overridden by defining _BSD_SOURCE
2097 # As this has a different meaning on Linux, only define it on OpenBSD
2098
2099cat >>confdefs.h <<\_ACEOF
2100#define _BSD_SOURCE 1
2101_ACEOF
2102
2103 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002104 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2105 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2106 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002107 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 +00002108 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002109 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2110 # of union __?sigval. Reported by Stuart Bishop.
2111 SunOS/5.6)
2112 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2114 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002115 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002116 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002117 define_xopen_source=no;;
2118 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002119 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002120 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002121 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002122 # On FreeBSD 4, the math functions C89 does not cover are never defined
2123 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2124 FreeBSD/4.*)
2125 define_xopen_source=no;;
2126 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2127 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2128 # identifies itself as Darwin/7.*
2129 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2130 # disables platform specific features beyond repair.
2131 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2132 # has no effect, don't bother defining them
2133 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2136 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2137 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002138 AIX/4)
2139 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002140 AIX/5)
2141 if test `uname -r` -eq 1; then
2142 define_xopen_source=no
2143 fi
2144 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002145 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2146 # defining NI_NUMERICHOST.
2147 QNX/6.3.2)
2148 define_xopen_source=no
2149 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002150
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002151esac
2152
2153if test $define_xopen_source = yes
2154then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2156 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002157 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2158 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002159 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002160 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002161
2162cat >>confdefs.h <<\_ACEOF
2163#define _XOPEN_SOURCE 500
2164_ACEOF
2165
2166 ;;
2167 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002168
2169cat >>confdefs.h <<\_ACEOF
2170#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002171_ACEOF
2172
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 ;;
2174 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002175
2176 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2177 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2178 # several APIs are not declared. Since this is also needed in some
2179 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002180 # except for Solaris 10, where it must not be defined,
2181 # as it implies XPG4.2
2182 case $ac_sys_system/$ac_sys_release in
2183 SunOS/5.10)
2184 ;;
2185 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002186
2187cat >>confdefs.h <<\_ACEOF
2188#define _XOPEN_SOURCE_EXTENDED 1
2189_ACEOF
2190
Martin v. Löwis7dece662005-11-26 11:38:24 +00002191 ;;
2192 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002193
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002194
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002195cat >>confdefs.h <<\_ACEOF
2196#define _POSIX_C_SOURCE 200112L
2197_ACEOF
2198
2199
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002200fi
2201
Guido van Rossum91922671997-10-09 20:24:13 +00002202#
2203# SGI compilers allow the specification of the both the ABI and the
2204# ISA on the command line. Depending on the values of these switches,
2205# different and often incompatable code will be generated.
2206#
2207# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2208# thus supply support for various ABI/ISA combinations. The MACHDEP
2209# variable is also adjusted.
2210#
2211
2212if test ! -z "$SGI_ABI"
2213then
2214 CC="cc $SGI_ABI"
2215 LDFLAGS="$SGI_ABI $LDFLAGS"
2216 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2217fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002218{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2219echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002220
Jack Jansen83f898c2002-12-30 22:23:40 +00002221# And add extra plat-mac for darwin
2222
Jack Jansen7b59b422003-03-17 15:44:10 +00002223
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002224{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2225echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002226if test -z "$EXTRAPLATDIR"
2227then
2228 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002229 darwin)
2230 EXTRAPLATDIR="\$(PLATMACDIRS)"
2231 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2232 ;;
2233 *)
2234 EXTRAPLATDIR=""
2235 EXTRAMACHDEPPATH=""
2236 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002237 esac
2238fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002239{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2240echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002241
Jack Jansen6b08a402004-06-03 12:41:45 +00002242# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2243# it may influence the way we can build extensions, so distutils
2244# needs to check it
2245
Ronald Oussoren988117f2006-04-29 11:31:35 +00002246
Jack Jansen6b08a402004-06-03 12:41:45 +00002247CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002248EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002250{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2251echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002252ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2254echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002255
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002257
2258# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2259# for debug/optimization stuff. BASECFLAGS is for flags that are required
2260# just to get things to compile and link. Users are free to override OPT
2261# when running configure or make. The build should not break if they do.
2262# BASECFLAGS should generally not be messed with, however.
2263
2264# XXX shouldn't some/most/all of this code be merged with the stuff later
2265# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002266{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2267echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002268
Martin v. Löwiseba40652007-08-30 20:10:57 +00002269# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002270if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002271 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002272 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002273 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002274 without_gcc=yes;;
2275 yes) CC=gcc
2276 without_gcc=no;;
2277 *) CC=$withval
2278 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002279 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002280else
Martin v. Löwis11437992002-04-12 09:54:03 +00002281
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002282 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002283 AIX*) CC=cc_r
2284 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 case $BE_HOST_CPU in
2287 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002288 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002289 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002290 BASECFLAGS="$BASECFLAGS -export pragma"
2291 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002292 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 ;;
2294 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002295 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002296 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002297 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002298 ;;
2299 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002300 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2301echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002302 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 ;;
2304 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002305 AR="\$(srcdir)/Modules/ar_beos"
2306 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002308 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002309 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002310fi
2311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002312{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2313echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002314
Guido van Rossum8b131c51995-03-09 14:10:13 +00002315# If the user switches compilers, we can't believe the cache
2316if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2317then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002318 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002319(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002320echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002321(it is also a good idea to do 'make clean' before compiling)" >&2;}
2322 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002323fi
2324
Martin v. Löwis11437992002-04-12 09:54:03 +00002325ac_ext=c
2326ac_cpp='$CPP $CPPFLAGS'
2327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2329ac_compiler_gnu=$ac_cv_c_compiler_gnu
2330if test -n "$ac_tool_prefix"; then
2331 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2332set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002335if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002336 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002337else
2338 if test -n "$CC"; then
2339 ac_cv_prog_CC="$CC" # Let the user override the test.
2340else
Martin v. Löwis11437992002-04-12 09:54:03 +00002341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2342for as_dir in $PATH
2343do
2344 IFS=$as_save_IFS
2345 test -z "$as_dir" && as_dir=.
2346 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002347 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 +00002348 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 break 2
2351 fi
2352done
2353done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002354IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
Jack Jansendd19cf82001-12-06 22:36:17 +00002356fi
2357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002358CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002359if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002360 { echo "$as_me:$LINENO: result: $CC" >&5
2361echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 { echo "$as_me:$LINENO: result: no" >&5
2364echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365fi
2366
Martin v. Löwiseba40652007-08-30 20:10:57 +00002367
Martin v. Löwis11437992002-04-12 09:54:03 +00002368fi
2369if test -z "$ac_cv_prog_CC"; then
2370 ac_ct_CC=$CC
2371 # Extract the first word of "gcc", so it can be a program name with args.
2372set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002373{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002376 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002377else
2378 if test -n "$ac_ct_CC"; then
2379 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2380else
2381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002387 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 +00002388 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 break 2
2391 fi
2392done
2393done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396fi
2397fi
2398ac_ct_CC=$ac_cv_prog_ac_ct_CC
2399if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002400 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2401echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 { echo "$as_me:$LINENO: result: no" >&5
2404echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406
Martin v. Löwiseba40652007-08-30 20:10:57 +00002407 if test "x$ac_ct_CC" = x; then
2408 CC=""
2409 else
2410 case $cross_compiling:$ac_tool_warned in
2411yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002412{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2413whose name does not start with the host triplet. If you think this
2414configuration is useful to you, please write to autoconf@gnu.org." >&5
2415echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2416whose name does not start with the host triplet. If you think this
2417configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002418ac_tool_warned=yes ;;
2419esac
2420 CC=$ac_ct_CC
2421 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002422else
2423 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002424fi
2425
Jack Jansendd19cf82001-12-06 22:36:17 +00002426if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002427 if test -n "$ac_tool_prefix"; then
2428 # 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 +00002429set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002430{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002432if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002433 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002434else
2435 if test -n "$CC"; then
2436 ac_cv_prog_CC="$CC" # Let the user override the test.
2437else
Martin v. Löwis11437992002-04-12 09:54:03 +00002438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2439for as_dir in $PATH
2440do
2441 IFS=$as_save_IFS
2442 test -z "$as_dir" && as_dir=.
2443 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444 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 +00002445 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 break 2
2448 fi
2449done
2450done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453fi
2454fi
2455CC=$ac_cv_prog_CC
2456if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002457 { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462fi
2463
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002466fi
2467if test -z "$CC"; then
2468 # Extract the first word of "cc", so it can be a program name with args.
2469set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002470{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002472if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002474else
2475 if test -n "$CC"; then
2476 ac_cv_prog_CC="$CC" # Let the user override the test.
2477else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002478 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485 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 +00002486 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2487 ac_prog_rejected=yes
2488 continue
2489 fi
2490 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 break 2
2493 fi
2494done
2495done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498if test $ac_prog_rejected = yes; then
2499 # We found a bogon in the path, so make sure we never use it.
2500 set dummy $ac_cv_prog_CC
2501 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002502 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503 # We chose a different compiler from the bogus one.
2504 # However, it has the same basename, so the bogon will be chosen
2505 # first if we set CC to just the basename; use the full file name.
2506 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002508 fi
2509fi
2510fi
2511fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002512CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002513if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002514 { echo "$as_me:$LINENO: result: $CC" >&5
2515echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002516else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002517 { echo "$as_me:$LINENO: result: no" >&5
2518echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002519fi
2520
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522fi
2523if test -z "$CC"; then
2524 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 do
2527 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2528set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002529{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2530echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002531if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002533else
2534 if test -n "$CC"; then
2535 ac_cv_prog_CC="$CC" # Let the user override the test.
2536else
Martin v. Löwis11437992002-04-12 09:54:03 +00002537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2538for as_dir in $PATH
2539do
2540 IFS=$as_save_IFS
2541 test -z "$as_dir" && as_dir=.
2542 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543 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 +00002544 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002545 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552fi
2553fi
2554CC=$ac_cv_prog_CC
2555if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002556 { echo "$as_me:$LINENO: result: $CC" >&5
2557echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 { echo "$as_me:$LINENO: result: no" >&5
2560echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002561fi
2562
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 test -n "$CC" && break
2565 done
2566fi
2567if test -z "$CC"; then
2568 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002569 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002570do
2571 # Extract the first word of "$ac_prog", so it can be a program name with args.
2572set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002575if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002577else
2578 if test -n "$ac_ct_CC"; then
2579 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2580else
2581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582for as_dir in $PATH
2583do
2584 IFS=$as_save_IFS
2585 test -z "$as_dir" && as_dir=.
2586 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 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 +00002588 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 break 2
2591 fi
2592done
2593done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596fi
2597fi
2598ac_ct_CC=$ac_cv_prog_ac_ct_CC
2599if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002600 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2601echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 { echo "$as_me:$LINENO: result: no" >&5
2604echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002605fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002606
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 test -n "$ac_ct_CC" && break
2609done
Michael W. Hudson54241132001-12-07 15:38:26 +00002610
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611 if test "x$ac_ct_CC" = x; then
2612 CC=""
2613 else
2614 case $cross_compiling:$ac_tool_warned in
2615yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002616{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2617whose name does not start with the host triplet. If you think this
2618configuration is useful to you, please write to autoconf@gnu.org." >&5
2619echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2620whose name does not start with the host triplet. If you think this
2621configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622ac_tool_warned=yes ;;
2623esac
2624 CC=$ac_ct_CC
2625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002626fi
2627
2628fi
2629
2630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002631test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002632See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002633echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002634See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002635 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002636
2637# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002638echo "$as_me:$LINENO: checking for C compiler version" >&5
2639ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640{ (ac_try="$ac_compiler --version >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650{ (ac_try="$ac_compiler -v >&5"
2651case "(($ac_try" in
2652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2653 *) ac_try_echo=$ac_try;;
2654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002656 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660{ (ac_try="$ac_compiler -V >&5"
2661case "(($ac_try" in
2662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2663 *) ac_try_echo=$ac_try;;
2664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 (exit $ac_status); }
2670
2671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002672/* confdefs.h. */
2673_ACEOF
2674cat confdefs.h >>conftest.$ac_ext
2675cat >>conftest.$ac_ext <<_ACEOF
2676/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678int
2679main ()
2680{
2681
2682 ;
2683 return 0;
2684}
2685_ACEOF
2686ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002687ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688# Try to create an executable without -o first, disregard a.out.
2689# It will help us diagnose broken compilers, and finding out an intuition
2690# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2692echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2693ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2694#
2695# List of possible output files, starting from the most likely.
2696# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2697# only as a last resort. b.out is created by i960 compilers.
2698ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2699#
2700# The IRIX 6 linker writes into existing files which may not be
2701# executable, retaining their permissions. Remove them first so a
2702# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703ac_rmfiles=
2704for ac_file in $ac_files
2705do
2706 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002707 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2709 esac
2710done
2711rm -f $ac_rmfiles
2712
2713if { (ac_try="$ac_link_default"
2714case "(($ac_try" in
2715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716 *) ac_try_echo=$ac_try;;
2717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002719 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2724# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2725# in a Makefile. We should not override ac_cv_exeext if it was cached,
2726# so that the user can short-circuit this test for compilers unknown to
2727# Autoconf.
2728for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002729do
2730 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002733 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002734 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 # We found the default executable, but exeext='' is most
2736 # certainly right.
2737 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002739 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2740 then :; else
2741 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2742 fi
2743 # We set ac_cv_exeext here because the later test for it is not
2744 # safe: cross compilers may not add the suffix if given an `-o'
2745 # argument, so we may need to know it at that point already.
2746 # Even if this section looks crufty: it has the advantage of
2747 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002748 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002750 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 esac
2752done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753test "$ac_cv_exeext" = no && ac_cv_exeext=
2754
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002756 ac_file=''
2757fi
2758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002759{ echo "$as_me:$LINENO: result: $ac_file" >&5
2760echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002761if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002763sed 's/^/| /' conftest.$ac_ext >&5
2764
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002765{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002766See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002767echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002768See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002769 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002770fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002771
Martin v. Löwis11437992002-04-12 09:54:03 +00002772ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002773
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002775# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2777echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002778# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2779# If not cross compiling, check that we can run a simple program.
2780if test "$cross_compiling" != yes; then
2781 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002782 { (case "(($ac_try" in
2783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2784 *) ac_try_echo=$ac_try;;
2785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 (exit $ac_status); }; }; then
2791 cross_compiling=no
2792 else
2793 if test "$cross_compiling" = maybe; then
2794 cross_compiling=yes
2795 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002796 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002797If you meant to cross compile, use \`--host'.
2798See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002799echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002800If you meant to cross compile, use \`--host'.
2801See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002802 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 fi
2804 fi
2805fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806{ echo "$as_me:$LINENO: result: yes" >&5
2807echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002810ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002812# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2814echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2815{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2816echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002818{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2819echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002820if { (ac_try="$ac_link"
2821case "(($ac_try" in
2822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2823 *) ac_try_echo=$ac_try;;
2824esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 (exit $ac_status); }; then
2830 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2831# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2832# work properly (i.e., refer to `conftest.exe'), while it won't with
2833# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002834for ac_file in conftest.exe conftest conftest.*; do
2835 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002837 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002839 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 * ) break;;
2841 esac
2842done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002844 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002846echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002849fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002850
Martin v. Löwis11437992002-04-12 09:54:03 +00002851rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2853echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
2855rm -f conftest.$ac_ext
2856EXEEXT=$ac_cv_exeext
2857ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2859echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002861 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002862else
Martin v. Löwis11437992002-04-12 09:54:03 +00002863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002864/* confdefs.h. */
2865_ACEOF
2866cat confdefs.h >>conftest.$ac_ext
2867cat >>conftest.$ac_ext <<_ACEOF
2868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002869
Martin v. Löwis11437992002-04-12 09:54:03 +00002870int
2871main ()
2872{
2873
2874 ;
2875 return 0;
2876}
2877_ACEOF
2878rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002879if { (ac_try="$ac_compile"
2880case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002885 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002886 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889 for ac_file in conftest.o conftest.obj conftest.*; do
2890 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002892 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002893 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2894 break;;
2895 esac
2896done
2897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002899sed 's/^/| /' conftest.$ac_ext >&5
2900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002902See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002903echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002904See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002906fi
2907
2908rm -f conftest.$ac_cv_objext conftest.$ac_ext
2909fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002910{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2911echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002912OBJEXT=$ac_cv_objext
2913ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002914{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2915echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002918else
2919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002920/* confdefs.h. */
2921_ACEOF
2922cat confdefs.h >>conftest.$ac_ext
2923cat >>conftest.$ac_ext <<_ACEOF
2924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Martin v. Löwis11437992002-04-12 09:54:03 +00002926int
2927main ()
2928{
2929#ifndef __GNUC__
2930 choke me
2931#endif
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002938if { (ac_try="$ac_compile"
2939case "(($ac_try" in
2940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941 *) ac_try_echo=$ac_try;;
2942esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002946 grep -v '^ *+' conftest.er1 >conftest.err
2947 rm -f conftest.er1
2948 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002950 (exit $ac_status); } && {
2951 test -z "$ac_c_werror_flag" ||
2952 test ! -s conftest.err
2953 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 ac_compiler_gnu=yes
2955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002957sed 's/^/| /' conftest.$ac_ext >&5
2958
Martin v. Löwiseba40652007-08-30 20:10:57 +00002959 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961
2962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002963ac_cv_c_compiler_gnu=$ac_compiler_gnu
2964
2965fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002966{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2967echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2968GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002969ac_test_CFLAGS=${CFLAGS+set}
2970ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002971{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2972echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002973if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002975else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002976 ac_save_c_werror_flag=$ac_c_werror_flag
2977 ac_c_werror_flag=yes
2978 ac_cv_prog_cc_g=no
2979 CFLAGS="-g"
2980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002981/* confdefs.h. */
2982_ACEOF
2983cat confdefs.h >>conftest.$ac_ext
2984cat >>conftest.$ac_ext <<_ACEOF
2985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987int
2988main ()
2989{
2990
2991 ;
2992 return 0;
2993}
2994_ACEOF
2995rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002996if { (ac_try="$ac_compile"
2997case "(($ac_try" in
2998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2999 *) ac_try_echo=$ac_try;;
3000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003004 grep -v '^ *+' conftest.er1 >conftest.err
3005 rm -f conftest.er1
3006 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003008 (exit $ac_status); } && {
3009 test -z "$ac_c_werror_flag" ||
3010 test ! -s conftest.err
3011 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003012 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003015sed 's/^/| /' conftest.$ac_ext >&5
3016
Martin v. Löwiseba40652007-08-30 20:10:57 +00003017 CFLAGS=""
3018 cat >conftest.$ac_ext <<_ACEOF
3019/* confdefs.h. */
3020_ACEOF
3021cat confdefs.h >>conftest.$ac_ext
3022cat >>conftest.$ac_ext <<_ACEOF
3023/* end confdefs.h. */
3024
3025int
3026main ()
3027{
3028
3029 ;
3030 return 0;
3031}
3032_ACEOF
3033rm -f conftest.$ac_objext
3034if { (ac_try="$ac_compile"
3035case "(($ac_try" in
3036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037 *) ac_try_echo=$ac_try;;
3038esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003040 (eval "$ac_compile") 2>conftest.er1
3041 ac_status=$?
3042 grep -v '^ *+' conftest.er1 >conftest.err
3043 rm -f conftest.er1
3044 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046 (exit $ac_status); } && {
3047 test -z "$ac_c_werror_flag" ||
3048 test ! -s conftest.err
3049 } && test -s conftest.$ac_objext; then
3050 :
3051else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003052 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053sed 's/^/| /' conftest.$ac_ext >&5
3054
3055 ac_c_werror_flag=$ac_save_c_werror_flag
3056 CFLAGS="-g"
3057 cat >conftest.$ac_ext <<_ACEOF
3058/* confdefs.h. */
3059_ACEOF
3060cat confdefs.h >>conftest.$ac_ext
3061cat >>conftest.$ac_ext <<_ACEOF
3062/* end confdefs.h. */
3063
3064int
3065main ()
3066{
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072rm -f conftest.$ac_objext
3073if { (ac_try="$ac_compile"
3074case "(($ac_try" in
3075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3076 *) ac_try_echo=$ac_try;;
3077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003079 (eval "$ac_compile") 2>conftest.er1
3080 ac_status=$?
3081 grep -v '^ *+' conftest.er1 >conftest.err
3082 rm -f conftest.er1
3083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085 (exit $ac_status); } && {
3086 test -z "$ac_c_werror_flag" ||
3087 test ! -s conftest.err
3088 } && test -s conftest.$ac_objext; then
3089 ac_cv_prog_cc_g=yes
3090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003091 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092sed 's/^/| /' conftest.$ac_ext >&5
3093
3094
Guido van Rossum627b2d71993-12-24 10:39:16 +00003095fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096
3097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099
3100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3101fi
3102
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104 ac_c_werror_flag=$ac_save_c_werror_flag
3105fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003106{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3107echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003108if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110elif test $ac_cv_prog_cc_g = yes; then
3111 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003112 CFLAGS="-g -O2"
3113 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115 fi
3116else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003117 if test "$GCC" = yes; then
3118 CFLAGS="-O2"
3119 else
3120 CFLAGS=
3121 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003123{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3124echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003125if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003126 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003127else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003129ac_save_CC=$CC
3130cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003131/* confdefs.h. */
3132_ACEOF
3133cat confdefs.h >>conftest.$ac_ext
3134cat >>conftest.$ac_ext <<_ACEOF
3135/* end confdefs.h. */
3136#include <stdarg.h>
3137#include <stdio.h>
3138#include <sys/types.h>
3139#include <sys/stat.h>
3140/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3141struct buf { int x; };
3142FILE * (*rcsopen) (struct buf *, struct stat *, int);
3143static char *e (p, i)
3144 char **p;
3145 int i;
3146{
3147 return p[i];
3148}
3149static char *f (char * (*g) (char **, int), char **p, ...)
3150{
3151 char *s;
3152 va_list v;
3153 va_start (v,p);
3154 s = g (p, va_arg (v,int));
3155 va_end (v);
3156 return s;
3157}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003158
3159/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3160 function prototypes and stuff, but not '\xHH' hex character constants.
3161 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003162 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003163 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3164 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003165 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003166int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3167
Martin v. Löwiseba40652007-08-30 20:10:57 +00003168/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3169 inside strings and character constants. */
3170#define FOO(x) 'x'
3171int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3172
Skip Montanaro6dead952003-09-25 14:50:04 +00003173int test (int i, double x);
3174struct s1 {int (*f) (int a);};
3175struct s2 {int (*f) (double a);};
3176int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3177int argc;
3178char **argv;
3179int
3180main ()
3181{
3182return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3183 ;
3184 return 0;
3185}
3186_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3188 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003189do
3190 CC="$ac_save_CC $ac_arg"
3191 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003192if { (ac_try="$ac_compile"
3193case "(($ac_try" in
3194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3195 *) ac_try_echo=$ac_try;;
3196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003198 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003200 grep -v '^ *+' conftest.er1 >conftest.err
3201 rm -f conftest.er1
3202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003204 (exit $ac_status); } && {
3205 test -z "$ac_c_werror_flag" ||
3206 test ! -s conftest.err
3207 } && test -s conftest.$ac_objext; then
3208 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003211sed 's/^/| /' conftest.$ac_ext >&5
3212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213
Skip Montanaro6dead952003-09-25 14:50:04 +00003214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003215
3216rm -f core conftest.err conftest.$ac_objext
3217 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003218done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003220CC=$ac_save_CC
3221
3222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223# AC_CACHE_VAL
3224case "x$ac_cv_prog_cc_c89" in
3225 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003226 { echo "$as_me:$LINENO: result: none needed" >&5
3227echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003229 { echo "$as_me:$LINENO: result: unsupported" >&5
3230echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003231 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003233 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3234echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003235esac
3236
Skip Montanaro6dead952003-09-25 14:50:04 +00003237
Martin v. Löwis11437992002-04-12 09:54:03 +00003238ac_ext=c
3239ac_cpp='$CPP $CPPFLAGS'
3240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3242ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003244
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245
3246
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3248echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003251if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003252 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
3254 case $withval in
3255 no) with_cxx_main=no
3256 MAINCC='$(CC)';;
3257 yes) with_cxx_main=yes
3258 MAINCC='$(CXX)';;
3259 *) with_cxx_main=yes
3260 MAINCC=$withval
3261 if test -z "$CXX"
3262 then
3263 CXX=$withval
3264 fi;;
3265 esac
3266else
3267
3268 with_cxx_main=no
3269 MAINCC='$(CC)'
3270
Martin v. Löwiseba40652007-08-30 20:10:57 +00003271fi
3272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003273{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3274echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003275
3276preset_cxx="$CXX"
3277if test -z "$CXX"
3278then
3279 case "$CC" in
3280 gcc) # Extract the first word of "g++", so it can be a program name with args.
3281set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003284if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003286else
3287 case $CXX in
3288 [\\/]* | ?:[\\/]*)
3289 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3290 ;;
3291 *)
3292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3293for as_dir in notfound
3294do
3295 IFS=$as_save_IFS
3296 test -z "$as_dir" && as_dir=.
3297 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003298 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 +00003299 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003300 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301 break 2
3302 fi
3303done
3304done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003306
3307 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3308 ;;
3309esac
3310fi
3311CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003312if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003313 { echo "$as_me:$LINENO: result: $CXX" >&5
3314echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003316 { echo "$as_me:$LINENO: result: no" >&5
3317echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320 ;;
3321 cc) # Extract the first word of "c++", so it can be a program name with args.
3322set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003325if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003327else
3328 case $CXX in
3329 [\\/]* | ?:[\\/]*)
3330 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3331 ;;
3332 *)
3333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3334for as_dir in notfound
3335do
3336 IFS=$as_save_IFS
3337 test -z "$as_dir" && as_dir=.
3338 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003339 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 +00003340 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003342 break 2
3343 fi
3344done
3345done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003347
3348 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3349 ;;
3350esac
3351fi
3352CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003353if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003354 { echo "$as_me:$LINENO: result: $CXX" >&5
3355echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003356else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003357 { echo "$as_me:$LINENO: result: no" >&5
3358echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361 ;;
3362 esac
3363 if test "$CXX" = "notfound"
3364 then
3365 CXX=""
3366 fi
3367fi
3368if test -z "$CXX"
3369then
3370 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3371do
3372 # Extract the first word of "$ac_prog", so it can be a program name with args.
3373set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003376if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003378else
3379 if test -n "$CXX"; then
3380 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3381else
3382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
3387 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003388 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 +00003389 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003390 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003391 break 2
3392 fi
3393done
3394done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003395IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003396
3397fi
3398fi
3399CXX=$ac_cv_prog_CXX
3400if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003401 { echo "$as_me:$LINENO: result: $CXX" >&5
3402echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 { echo "$as_me:$LINENO: result: no" >&5
3405echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406fi
3407
Martin v. Löwiseba40652007-08-30 20:10:57 +00003408
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003409 test -n "$CXX" && break
3410done
3411test -n "$CXX" || CXX="notfound"
3412
3413 if test "$CXX" = "notfound"
3414 then
3415 CXX=""
3416 fi
3417fi
3418if test "$preset_cxx" != "$CXX"
3419then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003420 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421
3422 By default, distutils will build C++ extension modules with \"$CXX\".
3423 If this is not intended, then set CXX on the configure command line.
3424 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003425echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003426
3427 By default, distutils will build C++ extension modules with \"$CXX\".
3428 If this is not intended, then set CXX on the configure command line.
3429 " >&2;}
3430fi
3431
3432
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003433# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003434
3435ac_ext=c
3436ac_cpp='$CPP $CPPFLAGS'
3437ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3438ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3439ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003440{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3441echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442# On Suns, sometimes $CPP names a directory.
3443if test -n "$CPP" && test -d "$CPP"; then
3444 CPP=
3445fi
3446if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003447 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003449else
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # Double quotes because CPP needs to be expanded
3451 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3452 do
3453 ac_preproc_ok=false
3454for ac_c_preproc_warn_flag in '' yes
3455do
3456 # Use a header file that comes with gcc, so configuring glibc
3457 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003458 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3459 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003460 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 # not just through cpp. "Syntax error" is here to catch this case.
3462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003463/* confdefs.h. */
3464_ACEOF
3465cat confdefs.h >>conftest.$ac_ext
3466cat >>conftest.$ac_ext <<_ACEOF
3467/* end confdefs.h. */
3468#ifdef __STDC__
3469# include <limits.h>
3470#else
3471# include <assert.h>
3472#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003473 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003474_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475if { (ac_try="$ac_cpp conftest.$ac_ext"
3476case "(($ac_try" in
3477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3478 *) ac_try_echo=$ac_try;;
3479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003483 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003484 rm -f conftest.er1
3485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487 (exit $ac_status); } >/dev/null && {
3488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3489 test ! -s conftest.err
3490 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003491 :
3492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003494sed 's/^/| /' conftest.$ac_ext >&5
3495
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 # Broken: fails on valid input.
3497continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003501
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 # can be detected and how.
3504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* confdefs.h. */
3506_ACEOF
3507cat confdefs.h >>conftest.$ac_ext
3508cat >>conftest.$ac_ext <<_ACEOF
3509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003510#include <ac_nonexistent.h>
3511_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512if { (ac_try="$ac_cpp conftest.$ac_ext"
3513case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003520 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 rm -f conftest.er1
3522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003524 (exit $ac_status); } >/dev/null && {
3525 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3526 test ! -s conftest.err
3527 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003528 # Broken: success on invalid input.
3529continue
3530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003532sed 's/^/| /' conftest.$ac_ext >&5
3533
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 # Passes both tests.
3535ac_preproc_ok=:
3536break
3537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539rm -f conftest.err conftest.$ac_ext
3540
3541done
3542# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3543rm -f conftest.err conftest.$ac_ext
3544if $ac_preproc_ok; then
3545 break
3546fi
3547
3548 done
3549 ac_cv_prog_CPP=$CPP
3550
3551fi
3552 CPP=$ac_cv_prog_CPP
3553else
3554 ac_cv_prog_CPP=$CPP
3555fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003556{ echo "$as_me:$LINENO: result: $CPP" >&5
3557echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003558ac_preproc_ok=false
3559for ac_c_preproc_warn_flag in '' yes
3560do
3561 # Use a header file that comes with gcc, so configuring glibc
3562 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003563 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3564 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003565 # On the NeXT, cc -E runs the code through the compiler's parser,
3566 # not just through cpp. "Syntax error" is here to catch this case.
3567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003568/* confdefs.h. */
3569_ACEOF
3570cat confdefs.h >>conftest.$ac_ext
3571cat >>conftest.$ac_ext <<_ACEOF
3572/* end confdefs.h. */
3573#ifdef __STDC__
3574# include <limits.h>
3575#else
3576# include <assert.h>
3577#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003578 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003579_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003580if { (ac_try="$ac_cpp conftest.$ac_ext"
3581case "(($ac_try" in
3582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3583 *) ac_try_echo=$ac_try;;
3584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003588 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 rm -f conftest.er1
3590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003592 (exit $ac_status); } >/dev/null && {
3593 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3594 test ! -s conftest.err
3595 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 :
3597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003599sed 's/^/| /' conftest.$ac_ext >&5
3600
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 # Broken: fails on valid input.
3602continue
3603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605rm -f conftest.err conftest.$ac_ext
3606
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 # can be detected and how.
3609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003610/* confdefs.h. */
3611_ACEOF
3612cat confdefs.h >>conftest.$ac_ext
3613cat >>conftest.$ac_ext <<_ACEOF
3614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003615#include <ac_nonexistent.h>
3616_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003617if { (ac_try="$ac_cpp conftest.$ac_ext"
3618case "(($ac_try" in
3619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3620 *) ac_try_echo=$ac_try;;
3621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003625 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 rm -f conftest.er1
3627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003629 (exit $ac_status); } >/dev/null && {
3630 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3631 test ! -s conftest.err
3632 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 # Broken: success on invalid input.
3634continue
3635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003637sed 's/^/| /' conftest.$ac_ext >&5
3638
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 # Passes both tests.
3640ac_preproc_ok=:
3641break
3642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643
Martin v. Löwis11437992002-04-12 09:54:03 +00003644rm -f conftest.err conftest.$ac_ext
3645
3646done
3647# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3648rm -f conftest.err conftest.$ac_ext
3649if $ac_preproc_ok; then
3650 :
3651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003652 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003653See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003654echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003655See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003656 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
3659ac_ext=c
3660ac_cpp='$CPP $CPPFLAGS'
3661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664
3665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3667echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003669 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003670else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003671 # Extract the first word of "grep ggrep" to use in msg output
3672if test -z "$GREP"; then
3673set dummy grep ggrep; ac_prog_name=$2
3674if test "${ac_cv_path_GREP+set}" = set; then
3675 echo $ECHO_N "(cached) $ECHO_C" >&6
3676else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003678# Loop through the user's path and test for each of PROGNAME-LIST
3679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
3684 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 for ac_exec_ext in '' $ac_executable_extensions; do
3686 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3687 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3688 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003689 # Check for GNU $ac_path_GREP
3690case `"$ac_path_GREP" --version 2>&1` in
3691*GNU*)
3692 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3693*)
3694 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003695 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003696 while :
3697 do
3698 cat "conftest.in" "conftest.in" >"conftest.tmp"
3699 mv "conftest.tmp" "conftest.in"
3700 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003702 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3703 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3704 ac_count=`expr $ac_count + 1`
3705 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3706 # Best one so far, save it but keep looking for a better one
3707 ac_cv_path_GREP="$ac_path_GREP"
3708 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003709 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 # 10*(2^10) chars as input seems more than enough
3711 test $ac_count -gt 10 && break
3712 done
3713 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3714esac
3715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716
3717 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 done
3719done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003720
3721done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003723
3724
3725fi
3726
3727GREP="$ac_cv_path_GREP"
3728if test -z "$GREP"; then
3729 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3730echo "$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 +00003731 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003732fi
3733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734else
3735 ac_cv_path_GREP=$GREP
3736fi
3737
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003738
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3741echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003742 GREP="$ac_cv_path_GREP"
3743
3744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003745{ echo "$as_me:$LINENO: checking for egrep" >&5
3746echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749else
3750 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3751 then ac_cv_path_EGREP="$GREP -E"
3752 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003753 # Extract the first word of "egrep" to use in msg output
3754if test -z "$EGREP"; then
3755set dummy egrep; ac_prog_name=$2
3756if test "${ac_cv_path_EGREP+set}" = set; then
3757 echo $ECHO_N "(cached) $ECHO_C" >&6
3758else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003759 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003760# Loop through the user's path and test for each of PROGNAME-LIST
3761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3763do
3764 IFS=$as_save_IFS
3765 test -z "$as_dir" && as_dir=.
3766 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
3768 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3769 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3770 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771 # Check for GNU $ac_path_EGREP
3772case `"$ac_path_EGREP" --version 2>&1` in
3773*GNU*)
3774 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3775*)
3776 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 while :
3779 do
3780 cat "conftest.in" "conftest.in" >"conftest.tmp"
3781 mv "conftest.tmp" "conftest.in"
3782 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3785 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3786 ac_count=`expr $ac_count + 1`
3787 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3788 # Best one so far, save it but keep looking for a better one
3789 ac_cv_path_EGREP="$ac_path_EGREP"
3790 ac_path_EGREP_max=$ac_count
3791 fi
3792 # 10*(2^10) chars as input seems more than enough
3793 test $ac_count -gt 10 && break
3794 done
3795 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3796esac
3797
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003798
3799 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003800 done
3801done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003802
3803done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003805
3806
3807fi
3808
3809EGREP="$ac_cv_path_EGREP"
3810if test -z "$EGREP"; then
3811 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3812echo "$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 +00003813 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816else
3817 ac_cv_path_EGREP=$EGREP
3818fi
3819
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003820
Martin v. Löwiseba40652007-08-30 20:10:57 +00003821 fi
3822fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003823{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3824echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003826
3827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828
3829{ echo "$as_me:$LINENO: checking for AIX" >&5
3830echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3831cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837#ifdef _AIX
3838 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003839#endif
3840
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003841_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3843 $EGREP "yes" >/dev/null 2>&1; then
3844 { echo "$as_me:$LINENO: result: yes" >&5
3845echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003847#define _ALL_SOURCE 1
3848_ACEOF
3849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850else
3851 { echo "$as_me:$LINENO: result: no" >&5
3852echo "${ECHO_T}no" >&6; }
3853fi
Ronald Oussoren25967582009-09-06 10:00:26 +00003854rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003855
3856
3857
3858# Check for unsupported systems
3859case $ac_sys_system/$ac_sys_release in
3860atheos*|Linux*/1*)
3861 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3862 echo See README for details.
3863 exit 1;;
3864esac
3865
3866
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003867{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3868echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870# Check whether --with-suffix was given.
3871if test "${with_suffix+set}" = set; then
3872 withval=$with_suffix;
3873 case $withval in
3874 no) EXEEXT=;;
3875 yes) EXEEXT=.exe;;
3876 *) EXEEXT=$withval;;
3877 esac
3878fi
3879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003880{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3881echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003882
3883# Test whether we're running on a non-case-sensitive system, in which
3884# case we give a warning if no ext is given
3885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003886{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3887echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003888if test ! -d CaseSensitiveTestDir; then
3889mkdir CaseSensitiveTestDir
3890fi
3891
3892if test -d casesensitivetestdir
3893then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894 { echo "$as_me:$LINENO: result: yes" >&5
3895echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896 BUILDEXEEXT=.exe
3897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898 { echo "$as_me:$LINENO: result: no" >&5
3899echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900 BUILDEXEEXT=$EXEEXT
3901fi
3902rmdir CaseSensitiveTestDir
3903
3904case $MACHDEP in
3905bsdos*)
3906 case $CC in
3907 gcc) CC="$CC -D_HAVE_BSDI";;
3908 esac;;
3909esac
3910
3911case $ac_sys_system in
3912hp*|HP*)
3913 case $CC in
3914 cc|*/cc) CC="$CC -Ae";;
3915 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003916SunOS*)
3917 # Some functions have a prototype only with that define, e.g. confstr
3918
3919cat >>confdefs.h <<\_ACEOF
3920#define __EXTENSIONS__ 1
3921_ACEOF
3922
3923 ;;
3924esac
3925
3926
3927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003928{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3929echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930if test -z "$LIBRARY"
3931then
3932 LIBRARY='libpython$(VERSION).a'
3933fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3935echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003936
3937# LDLIBRARY is the name of the library to link against (as opposed to the
3938# name of the library into which to insert object files). BLDLIBRARY is also
3939# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3940# is blank as the main program is not linked directly against LDLIBRARY.
3941# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3942# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3943# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3944# DLLLIBRARY is the shared (i.e., DLL) library.
3945#
3946# RUNSHARED is used to run shared python without installed libraries
3947#
3948# INSTSONAME is the name of the shared library that will be use to install
3949# on the system - some systems like version suffix, others don't
3950
3951
3952
3953
3954
3955
3956LDLIBRARY="$LIBRARY"
3957BLDLIBRARY='$(LDLIBRARY)'
3958INSTSONAME='$(LDLIBRARY)'
3959DLLLIBRARY=''
3960LDLIBRARYDIR=''
3961RUNSHARED=''
3962
3963# LINKCC is the command that links the python executable -- default is $(CC).
3964# If CXX is set, and if it is needed to link a main function that was
3965# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3966# python might then depend on the C++ runtime
3967# This is altered for AIX in order to build the export list before
3968# linking.
3969
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003970{ echo "$as_me:$LINENO: checking LINKCC" >&5
3971echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003972if test -z "$LINKCC"
3973then
3974 LINKCC='$(PURIFY) $(MAINCC)'
3975 case $ac_sys_system in
3976 AIX*)
3977 exp_extra="\"\""
3978 if test $ac_sys_release -ge 5 -o \
3979 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3980 exp_extra="."
3981 fi
3982 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003983 QNX*)
3984 # qcc must be used because the other compilers do not
3985 # support -N.
3986 LINKCC=qcc;;
3987 esac
3988fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003989{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3990echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003991
3992# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3993# make sure we default having it set to "no": this is used by
3994# distutils.unixccompiler to know if it should add --enable-new-dtags
3995# to linker command lines, and failing to detect GNU ld simply results
3996# in the same bahaviour as before.
3997
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003998{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3999echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004000ac_prog=ld
4001if test "$GCC" = yes; then
4002 ac_prog=`$CC -print-prog-name=ld`
4003fi
4004case `"$ac_prog" -V 2>&1 < /dev/null` in
4005 *GNU*)
4006 GNULD=yes;;
4007 *)
4008 GNULD=no;;
4009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004010{ echo "$as_me:$LINENO: result: $GNULD" >&5
4011echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004012
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004013{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4014echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004015# Check whether --enable-shared was given.
4016if test "${enable_shared+set}" = set; then
4017 enableval=$enable_shared;
4018fi
4019
4020
4021if test -z "$enable_shared"
4022then
4023 case $ac_sys_system in
4024 CYGWIN* | atheos*)
4025 enable_shared="yes";;
4026 *)
4027 enable_shared="no";;
4028 esac
4029fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004030{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4031echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004033{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4034echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004035# Check whether --enable-profiling was given.
4036if test "${enable_profiling+set}" = set; then
4037 enableval=$enable_profiling; ac_save_cc="$CC"
4038 CC="$CC -pg"
4039 if test "$cross_compiling" = yes; then
4040 ac_enable_profiling="no"
4041else
4042 cat >conftest.$ac_ext <<_ACEOF
4043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
4048int main() { return 0; }
4049_ACEOF
4050rm -f conftest$ac_exeext
4051if { (ac_try="$ac_link"
4052case "(($ac_try" in
4053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4054 *) ac_try_echo=$ac_try;;
4055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004057 (eval "$ac_link") 2>&5
4058 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4061 { (case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004066 (eval "$ac_try") 2>&5
4067 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004069 (exit $ac_status); }; }; then
4070 ac_enable_profiling="yes"
4071else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004072 echo "$as_me: program exited with status $ac_status" >&5
4073echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074sed 's/^/| /' conftest.$ac_ext >&5
4075
4076( exit $ac_status )
4077ac_enable_profiling="no"
4078fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4080fi
4081
4082
4083 CC="$ac_save_cc"
4084fi
4085
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4087echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088
4089case "$ac_enable_profiling" in
4090 "yes")
4091 BASECFLAGS="-pg $BASECFLAGS"
4092 LDFLAGS="-pg $LDFLAGS"
4093 ;;
4094esac
4095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004096{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4097echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004098
4099# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4100# library that we build, but we do not want to link against it (we
4101# will find it with a -framework option). For this reason there is an
4102# extra variable BLDLIBRARY against which Python and the extension
4103# modules are linked, BLDLIBRARY. This is normally the same as
4104# LDLIBRARY, but empty for MacOSX framework builds.
4105if test "$enable_framework"
4106then
4107 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4108 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4109 BLDLIBRARY=''
4110else
4111 BLDLIBRARY='$(LDLIBRARY)'
4112fi
4113
4114# Other platforms follow
4115if test $enable_shared = "yes"; then
4116
4117cat >>confdefs.h <<\_ACEOF
4118#define Py_ENABLE_SHARED 1
4119_ACEOF
4120
4121 case $ac_sys_system in
4122 BeOS*)
4123 LDLIBRARY='libpython$(VERSION).so'
4124 ;;
4125 CYGWIN*)
4126 LDLIBRARY='libpython$(VERSION).dll.a'
4127 DLLLIBRARY='libpython$(VERSION).dll'
4128 ;;
4129 SunOS*)
4130 LDLIBRARY='libpython$(VERSION).so'
4131 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4132 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4133 INSTSONAME="$LDLIBRARY".$SOVERSION
4134 ;;
4135 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4136 LDLIBRARY='libpython$(VERSION).so'
4137 BLDLIBRARY='-L. -lpython$(VERSION)'
4138 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4139 case $ac_sys_system in
4140 FreeBSD*)
4141 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4142 ;;
4143 esac
4144 INSTSONAME="$LDLIBRARY".$SOVERSION
4145 ;;
4146 hp*|HP*)
4147 case `uname -m` in
4148 ia64)
4149 LDLIBRARY='libpython$(VERSION).so'
4150 ;;
4151 *)
4152 LDLIBRARY='libpython$(VERSION).sl'
4153 ;;
4154 esac
4155 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4156 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4157 ;;
4158 OSF*)
4159 LDLIBRARY='libpython$(VERSION).so'
4160 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4161 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4162 ;;
4163 atheos*)
4164 LDLIBRARY='libpython$(VERSION).so'
4165 BLDLIBRARY='-L. -lpython$(VERSION)'
4166 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4167 ;;
4168 Darwin*)
4169 LDLIBRARY='libpython$(VERSION).dylib'
4170 BLDLIBRARY='-L. -lpython$(VERSION)'
4171 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4172 ;;
4173
4174 esac
4175else # shared is disabled
4176 case $ac_sys_system in
4177 CYGWIN*)
4178 BLDLIBRARY='$(LIBRARY)'
4179 LDLIBRARY='libpython$(VERSION).dll.a'
4180 ;;
4181 esac
4182fi
4183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004184{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4185echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004186
4187if test -n "$ac_tool_prefix"; then
4188 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4189set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004190{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4191echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004192if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004193 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004194else
4195 if test -n "$RANLIB"; then
4196 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4197else
4198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4199for as_dir in $PATH
4200do
4201 IFS=$as_save_IFS
4202 test -z "$as_dir" && as_dir=.
4203 for ac_exec_ext in '' $ac_executable_extensions; do
4204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4205 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004207 break 2
4208 fi
4209done
4210done
4211IFS=$as_save_IFS
4212
4213fi
4214fi
4215RANLIB=$ac_cv_prog_RANLIB
4216if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004217 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4218echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 { echo "$as_me:$LINENO: result: no" >&5
4221echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004222fi
4223
4224
4225fi
4226if test -z "$ac_cv_prog_RANLIB"; then
4227 ac_ct_RANLIB=$RANLIB
4228 # Extract the first word of "ranlib", so it can be a program name with args.
4229set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004230{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4231echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004232if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004234else
4235 if test -n "$ac_ct_RANLIB"; then
4236 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4237else
4238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4239for as_dir in $PATH
4240do
4241 IFS=$as_save_IFS
4242 test -z "$as_dir" && as_dir=.
4243 for ac_exec_ext in '' $ac_executable_extensions; do
4244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4245 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004247 break 2
4248 fi
4249done
4250done
4251IFS=$as_save_IFS
4252
4253fi
4254fi
4255ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4256if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004257 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4258echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 { echo "$as_me:$LINENO: result: no" >&5
4261echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004262fi
4263
4264 if test "x$ac_ct_RANLIB" = x; then
4265 RANLIB=":"
4266 else
4267 case $cross_compiling:$ac_tool_warned in
4268yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004269{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4270whose name does not start with the host triplet. If you think this
4271configuration is useful to you, please write to autoconf@gnu.org." >&5
4272echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4273whose name does not start with the host triplet. If you think this
4274configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004275ac_tool_warned=yes ;;
4276esac
4277 RANLIB=$ac_ct_RANLIB
4278 fi
4279else
4280 RANLIB="$ac_cv_prog_RANLIB"
4281fi
4282
4283
4284for ac_prog in ar aal
4285do
4286 # Extract the first word of "$ac_prog", so it can be a program name with args.
4287set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004290if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004291 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004292else
4293 if test -n "$AR"; then
4294 ac_cv_prog_AR="$AR" # Let the user override the test.
4295else
4296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4297for as_dir in $PATH
4298do
4299 IFS=$as_save_IFS
4300 test -z "$as_dir" && as_dir=.
4301 for ac_exec_ext in '' $ac_executable_extensions; do
4302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4303 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004305 break 2
4306 fi
4307done
4308done
4309IFS=$as_save_IFS
4310
4311fi
4312fi
4313AR=$ac_cv_prog_AR
4314if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004315 { echo "$as_me:$LINENO: result: $AR" >&5
4316echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004317else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 { echo "$as_me:$LINENO: result: no" >&5
4319echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004320fi
4321
4322
4323 test -n "$AR" && break
4324done
4325test -n "$AR" || AR="ar"
4326
4327
4328# tweak ARFLAGS only if the user didn't set it on the command line
4329
4330if test -z "$ARFLAGS"
4331then
4332 ARFLAGS="rc"
4333fi
4334
4335
4336# Extract the first word of "svnversion", so it can be a program name with args.
4337set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004338{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004340if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004341 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004342else
4343 if test -n "$SVNVERSION"; then
4344 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4345else
4346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347for as_dir in $PATH
4348do
4349 IFS=$as_save_IFS
4350 test -z "$as_dir" && as_dir=.
4351 for ac_exec_ext in '' $ac_executable_extensions; do
4352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4353 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004354 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004355 break 2
4356 fi
4357done
4358done
4359IFS=$as_save_IFS
4360
4361 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4362fi
4363fi
4364SVNVERSION=$ac_cv_prog_SVNVERSION
4365if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004366 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4367echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004369 { echo "$as_me:$LINENO: result: no" >&5
4370echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004371fi
4372
4373
4374if test $SVNVERSION = found
4375then
4376 SVNVERSION="svnversion \$(srcdir)"
4377else
4378 SVNVERSION="echo Unversioned directory"
4379fi
4380
4381case $MACHDEP in
4382bsdos*|hp*|HP*)
4383 # install -d does not work on BSDI or HP-UX
4384 if test -z "$INSTALL"
4385 then
4386 INSTALL="${srcdir}/install-sh -c"
4387 fi
4388esac
4389ac_aux_dir=
4390for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4391 if test -f "$ac_dir/install-sh"; then
4392 ac_aux_dir=$ac_dir
4393 ac_install_sh="$ac_aux_dir/install-sh -c"
4394 break
4395 elif test -f "$ac_dir/install.sh"; then
4396 ac_aux_dir=$ac_dir
4397 ac_install_sh="$ac_aux_dir/install.sh -c"
4398 break
4399 elif test -f "$ac_dir/shtool"; then
4400 ac_aux_dir=$ac_dir
4401 ac_install_sh="$ac_aux_dir/shtool install -c"
4402 break
4403 fi
4404done
4405if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004406 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4407echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004408 { (exit 1); exit 1; }; }
4409fi
4410
4411# These three variables are undocumented and unsupported,
4412# and are intended to be withdrawn in a future Autoconf release.
4413# They can cause serious problems if a builder's source tree is in a directory
4414# whose full name contains unusual characters.
4415ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4416ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4417ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4418
4419
4420# Find a good install program. We prefer a C program (faster),
4421# so one script is as good as another. But avoid the broken or
4422# incompatible versions:
4423# SysV /etc/install, /usr/sbin/install
4424# SunOS /usr/etc/install
4425# IRIX /sbin/install
4426# AIX /bin/install
4427# AmigaOS /C/install, which installs bootblocks on floppy discs
4428# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4429# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4430# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4431# OS/2's system install, which has a completely different semantic
4432# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004433{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4434echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004435if test -z "$INSTALL"; then
4436if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004437 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004438else
4439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442 IFS=$as_save_IFS
4443 test -z "$as_dir" && as_dir=.
4444 # Account for people who put trailing slashes in PATH elements.
4445case $as_dir/ in
4446 ./ | .// | /cC/* | \
4447 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4448 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4449 /usr/ucb/* ) ;;
4450 *)
4451 # OSF1 and SCO ODT 3.0 have their own names for install.
4452 # Don't use installbsd from OSF since it installs stuff as root
4453 # by default.
4454 for ac_prog in ginstall scoinst install; do
4455 for ac_exec_ext in '' $ac_executable_extensions; do
4456 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4457 if test $ac_prog = install &&
4458 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4459 # AIX install. It has an incompatible calling convention.
4460 :
4461 elif test $ac_prog = install &&
4462 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4463 # program-specific install script used by HP pwplus--don't use.
4464 :
4465 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004466 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4467 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004468 fi
4469 fi
4470 done
4471 done
4472 ;;
4473esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004474done
4475IFS=$as_save_IFS
4476
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004477
4478fi
4479 if test "${ac_cv_path_install+set}" = set; then
4480 INSTALL=$ac_cv_path_install
4481 else
4482 # As a last resort, use the slow shell script. Don't cache a
4483 # value for INSTALL within a source directory, because that will
4484 # break other packages using the cache if that directory is
4485 # removed, or if the value is a relative name.
4486 INSTALL=$ac_install_sh
4487 fi
4488fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004489{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4490echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4493# It thinks the first close brace ends the variable substitution.
4494test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4495
4496test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4497
4498test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4499
4500
4501# Not every filesystem supports hard links
4502
4503if test -z "$LN" ; then
4504 case $ac_sys_system in
4505 BeOS*) LN="ln -s";;
4506 CYGWIN*) LN="ln -s";;
4507 atheos*) LN="ln -s";;
4508 *) LN=ln;;
4509 esac
4510fi
4511
4512# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004513{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4514echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004515
4516# Check whether --with-pydebug was given.
4517if test "${with_pydebug+set}" = set; then
4518 withval=$with_pydebug;
4519if test "$withval" != no
4520then
4521
4522cat >>confdefs.h <<\_ACEOF
4523#define Py_DEBUG 1
4524_ACEOF
4525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004526 { echo "$as_me:$LINENO: result: yes" >&5
4527echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004528 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529else { echo "$as_me:$LINENO: result: no" >&5
4530echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004531fi
4532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533 { echo "$as_me:$LINENO: result: no" >&5
4534echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004535fi
4536
4537
4538# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4539# merged with this chunk of code?
4540
4541# Optimizer/debugger flags
4542# ------------------------
4543# (The following bit of code is complicated enough - please keep things
4544# indented properly. Just pretend you're editing Python code. ;-)
4545
4546# There are two parallel sets of case statements below, one that checks to
4547# see if OPT was set and one that does BASECFLAGS setting based upon
4548# compiler and platform. BASECFLAGS tweaks need to be made even if the
4549# user set OPT.
4550
4551# tweak OPT based on compiler and platform, only if the user didn't set
4552# it on the command line
4553
4554if test -z "$OPT"
4555then
4556 case $GCC in
4557 yes)
4558 if test "$CC" != 'g++' ; then
4559 STRICT_PROTO="-Wstrict-prototypes"
4560 fi
4561 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4562 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4563 WRAP="-fwrapv"
4564 fi
4565 case $ac_cv_prog_cc_g in
4566 yes)
4567 if test "$Py_DEBUG" = 'true' ; then
4568 # Optimization messes up debuggers, so turn it off for
4569 # debug builds.
4570 OPT="-g -Wall $STRICT_PROTO"
4571 else
4572 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4573 fi
4574 ;;
4575 *)
4576 OPT="-O3 -Wall $STRICT_PROTO"
4577 ;;
4578 esac
4579 case $ac_sys_system in
4580 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4581 ;;
4582 esac
4583 ;;
4584
4585 *)
4586 OPT="-O"
4587 ;;
4588 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004589fi
4590
4591
4592
4593# The -arch flags for universal builds on OSX
4594UNIVERSAL_ARCH_FLAGS=
4595
4596
4597# tweak BASECFLAGS based on compiler and platform
4598case $GCC in
4599yes)
4600 # Python violates C99 rules, by casting between incompatible
4601 # pointer types. GCC may generate bad code as a result of that,
4602 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004603 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4604echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004605 ac_save_cc="$CC"
4606 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004607 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4609else
4610 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004611 ac_cv_no_strict_aliasing_ok=no
4612else
4613 cat >conftest.$ac_ext <<_ACEOF
4614/* confdefs.h. */
4615_ACEOF
4616cat confdefs.h >>conftest.$ac_ext
4617cat >>conftest.$ac_ext <<_ACEOF
4618/* end confdefs.h. */
4619int main() { return 0; }
4620_ACEOF
4621rm -f conftest$ac_exeext
4622if { (ac_try="$ac_link"
4623case "(($ac_try" in
4624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4625 *) ac_try_echo=$ac_try;;
4626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004628 (eval "$ac_link") 2>&5
4629 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4632 { (case "(($ac_try" in
4633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4634 *) ac_try_echo=$ac_try;;
4635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004637 (eval "$ac_try") 2>&5
4638 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004640 (exit $ac_status); }; }; then
4641 ac_cv_no_strict_aliasing_ok=yes
4642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004643 echo "$as_me: program exited with status $ac_status" >&5
4644echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004645sed 's/^/| /' conftest.$ac_ext >&5
4646
4647( exit $ac_status )
4648ac_cv_no_strict_aliasing_ok=no
4649fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4651fi
4652
4653
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004654fi
4655
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004657 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4658echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659 if test $ac_cv_no_strict_aliasing_ok = yes
4660 then
4661 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4662 fi
4663
4664 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4665 # support. Without this, treatment of subnormals doesn't follow
4666 # the standard.
4667 case $ac_sys_machine in
4668 alpha*)
4669 BASECFLAGS="$BASECFLAGS -mieee"
4670 ;;
4671 esac
4672
4673 case $ac_sys_system in
4674 SCO_SV*)
4675 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4676 ;;
4677 # is there any other compiler on Darwin besides gcc?
4678 Darwin*)
4679 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4680 # used to be here, but non-Apple gcc doesn't accept them.
4681
4682
4683 if test "${enable_universalsdk}"; then
4684 UNIVERSAL_ARCH_FLAGS=""
4685 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4686 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4687 ARCH_RUN_32BIT=""
4688
4689 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4690 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004691 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004692
4693 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4694 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4695 ARCH_RUN_32BIT="arch -i386 -ppc"
4696
Ronald Oussoren23d92532009-09-07 06:12:00 +00004697 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4698 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4699 ARCH_RUN_32BIT="arch -i386"
4700
4701 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4702 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4703 ARCH_RUN_32BIT="arch -i386 -ppc"
4704
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004705 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004706 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4707echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004708 { (exit 1); exit 1; }; }
4709
4710 fi
4711
4712
4713 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4714 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4715 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4716 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4717 fi
4718 fi
4719
4720 # Calculate the right deployment target for this build.
4721 #
4722 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4723 if test ${cur_target} '>' 10.2; then
4724 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004725 if test ${enable_universalsdk}; then
4726 if test "${UNIVERSAL_ARCHS}" = "all"; then
4727 # Ensure that the default platform for a
4728 # 4-way universal build is OSX 10.5,
4729 # that's the first OS release where
4730 # 4-way builds make sense.
4731 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004732
4733 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4734 cur_target='10.5'
4735
4736 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4737 cur_target='10.5'
4738
4739 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4740 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004741 fi
4742 else
4743 if test `arch` = "i386"; then
4744 # On Intel macs default to a deployment
4745 # target of 10.4, that's the first OSX
4746 # release with Intel support.
4747 cur_target="10.4"
4748 fi
4749 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004750 fi
4751 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4752
4753 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4754 # environment with a value that is the same as what we'll use
4755 # in the Makefile to ensure that we'll get the same compiler
4756 # environment during configure and build time.
4757 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4758 export MACOSX_DEPLOYMENT_TARGET
4759 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4760
4761 ;;
4762 OSF*)
4763 BASECFLAGS="$BASECFLAGS -mieee"
4764 ;;
4765 esac
4766 ;;
4767
4768*)
4769 case $ac_sys_system in
4770 OpenUNIX*|UnixWare*)
4771 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4772 ;;
4773 OSF*)
4774 BASECFLAGS="$BASECFLAGS -ieee -std"
4775 ;;
4776 SCO_SV*)
4777 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4778 ;;
4779 esac
4780 ;;
4781esac
4782
4783if test "$Py_DEBUG" = 'true'; then
4784 :
4785else
4786 OPT="-DNDEBUG $OPT"
4787fi
4788
4789if test "$ac_arch_flags"
4790then
4791 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4792fi
4793
4794# disable check for icc since it seems to pass, but generates a warning
4795if test "$CC" = icc
4796then
4797 ac_cv_opt_olimit_ok=no
4798fi
4799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004800{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4801echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004802if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004803 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004804else
4805 ac_save_cc="$CC"
4806CC="$CC -OPT:Olimit=0"
4807if test "$cross_compiling" = yes; then
4808 ac_cv_opt_olimit_ok=no
4809else
4810 cat >conftest.$ac_ext <<_ACEOF
4811/* confdefs.h. */
4812_ACEOF
4813cat confdefs.h >>conftest.$ac_ext
4814cat >>conftest.$ac_ext <<_ACEOF
4815/* end confdefs.h. */
4816int main() { return 0; }
4817_ACEOF
4818rm -f conftest$ac_exeext
4819if { (ac_try="$ac_link"
4820case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825 (eval "$ac_link") 2>&5
4826 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4829 { (case "(($ac_try" in
4830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4831 *) ac_try_echo=$ac_try;;
4832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004834 (eval "$ac_try") 2>&5
4835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004837 (exit $ac_status); }; }; then
4838 ac_cv_opt_olimit_ok=yes
4839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004840 echo "$as_me: program exited with status $ac_status" >&5
4841echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842sed 's/^/| /' conftest.$ac_ext >&5
4843
4844( exit $ac_status )
4845ac_cv_opt_olimit_ok=no
4846fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4848fi
4849
4850
4851CC="$ac_save_cc"
4852fi
4853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004854{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4855echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856if test $ac_cv_opt_olimit_ok = yes; then
4857 case $ac_sys_system in
4858 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4859 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4860 # environment?
4861 Darwin*)
4862 ;;
4863 *)
4864 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4865 ;;
4866 esac
4867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4869echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004871 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872else
4873 ac_save_cc="$CC"
4874 CC="$CC -Olimit 1500"
4875 if test "$cross_compiling" = yes; then
4876 ac_cv_olimit_ok=no
4877else
4878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
4884int main() { return 0; }
4885_ACEOF
4886rm -f conftest$ac_exeext
4887if { (ac_try="$ac_link"
4888case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893 (eval "$ac_link") 2>&5
4894 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004896 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4897 { (case "(($ac_try" in
4898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4899 *) ac_try_echo=$ac_try;;
4900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004902 (eval "$ac_try") 2>&5
4903 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004905 (exit $ac_status); }; }; then
4906 ac_cv_olimit_ok=yes
4907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004908 echo "$as_me: program exited with status $ac_status" >&5
4909echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910sed 's/^/| /' conftest.$ac_ext >&5
4911
4912( exit $ac_status )
4913ac_cv_olimit_ok=no
4914fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4916fi
4917
4918
4919 CC="$ac_save_cc"
4920fi
4921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004922 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4923echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924 if test $ac_cv_olimit_ok = yes; then
4925 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4926 fi
4927fi
4928
4929# Check whether GCC supports PyArg_ParseTuple format
4930if test "$GCC" = "yes"
4931then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004932 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4933echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934 save_CFLAGS=$CFLAGS
4935 CFLAGS="$CFLAGS -Werror"
4936 cat >conftest.$ac_ext <<_ACEOF
4937/* confdefs.h. */
4938_ACEOF
4939cat confdefs.h >>conftest.$ac_ext
4940cat >>conftest.$ac_ext <<_ACEOF
4941/* end confdefs.h. */
4942
4943 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4944
4945int
4946main ()
4947{
4948
4949 ;
4950 return 0;
4951}
4952_ACEOF
4953rm -f conftest.$ac_objext
4954if { (ac_try="$ac_compile"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004960 (eval "$ac_compile") 2>conftest.er1
4961 ac_status=$?
4962 grep -v '^ *+' conftest.er1 >conftest.err
4963 rm -f conftest.er1
4964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966 (exit $ac_status); } && {
4967 test -z "$ac_c_werror_flag" ||
4968 test ! -s conftest.err
4969 } && test -s conftest.$ac_objext; then
4970
4971cat >>confdefs.h <<\_ACEOF
4972#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4973_ACEOF
4974
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004975 { echo "$as_me:$LINENO: result: yes" >&5
4976echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004978 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004979sed 's/^/| /' conftest.$ac_ext >&5
4980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 { echo "$as_me:$LINENO: result: no" >&5
4982echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004983
4984fi
4985
4986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4987 CFLAGS=$save_CFLAGS
4988fi
4989
4990# On some compilers, pthreads are available without further options
4991# (e.g. MacOS X). On some of these systems, the compiler will not
4992# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4993# So we have to see first whether pthreads are available without
4994# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4996echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004998 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999else
5000 if test "$cross_compiling" = yes; then
5001 ac_cv_pthread_is_default=no
5002else
5003 cat >conftest.$ac_ext <<_ACEOF
5004/* confdefs.h. */
5005_ACEOF
5006cat confdefs.h >>conftest.$ac_ext
5007cat >>conftest.$ac_ext <<_ACEOF
5008/* end confdefs.h. */
5009
5010#include <pthread.h>
5011
5012void* routine(void* p){return NULL;}
5013
5014int main(){
5015 pthread_t p;
5016 if(pthread_create(&p,NULL,routine,NULL)!=0)
5017 return 1;
5018 (void)pthread_detach(p);
5019 return 0;
5020}
5021
5022_ACEOF
5023rm -f conftest$ac_exeext
5024if { (ac_try="$ac_link"
5025case "(($ac_try" in
5026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5027 *) ac_try_echo=$ac_try;;
5028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005030 (eval "$ac_link") 2>&5
5031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5034 { (case "(($ac_try" in
5035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5036 *) ac_try_echo=$ac_try;;
5037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039 (eval "$ac_try") 2>&5
5040 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042 (exit $ac_status); }; }; then
5043
5044 ac_cv_pthread_is_default=yes
5045 ac_cv_kthread=no
5046 ac_cv_pthread=no
5047
5048else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005049 echo "$as_me: program exited with status $ac_status" >&5
5050echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005051sed 's/^/| /' conftest.$ac_ext >&5
5052
5053( exit $ac_status )
5054ac_cv_pthread_is_default=no
5055fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5057fi
5058
5059
5060
5061fi
5062
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005063{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5064echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005065
5066
5067if test $ac_cv_pthread_is_default = yes
5068then
5069 ac_cv_kpthread=no
5070else
5071# -Kpthread, if available, provides the right #defines
5072# and linker options to make pthread_create available
5073# Some compilers won't report that they do not support -Kpthread,
5074# so we need to run a program to see whether it really made the
5075# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005076{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5077echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005078if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005079 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005080else
5081 ac_save_cc="$CC"
5082CC="$CC -Kpthread"
5083if test "$cross_compiling" = yes; then
5084 ac_cv_kpthread=no
5085else
5086 cat >conftest.$ac_ext <<_ACEOF
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
5092
5093#include <pthread.h>
5094
5095void* routine(void* p){return NULL;}
5096
5097int main(){
5098 pthread_t p;
5099 if(pthread_create(&p,NULL,routine,NULL)!=0)
5100 return 1;
5101 (void)pthread_detach(p);
5102 return 0;
5103}
5104
5105_ACEOF
5106rm -f conftest$ac_exeext
5107if { (ac_try="$ac_link"
5108case "(($ac_try" in
5109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5110 *) ac_try_echo=$ac_try;;
5111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113 (eval "$ac_link") 2>&5
5114 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5117 { (case "(($ac_try" in
5118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5119 *) ac_try_echo=$ac_try;;
5120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (eval "$ac_try") 2>&5
5123 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125 (exit $ac_status); }; }; then
5126 ac_cv_kpthread=yes
5127else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005128 echo "$as_me: program exited with status $ac_status" >&5
5129echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130sed 's/^/| /' conftest.$ac_ext >&5
5131
5132( exit $ac_status )
5133ac_cv_kpthread=no
5134fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5136fi
5137
5138
5139CC="$ac_save_cc"
5140fi
5141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005142{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5143echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144fi
5145
5146if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5147then
5148# -Kthread, if available, provides the right #defines
5149# and linker options to make pthread_create available
5150# Some compilers won't report that they do not support -Kthread,
5151# so we need to run a program to see whether it really made the
5152# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005153{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5154echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005155if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005156 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157else
5158 ac_save_cc="$CC"
5159CC="$CC -Kthread"
5160if test "$cross_compiling" = yes; then
5161 ac_cv_kthread=no
5162else
5163 cat >conftest.$ac_ext <<_ACEOF
5164/* confdefs.h. */
5165_ACEOF
5166cat confdefs.h >>conftest.$ac_ext
5167cat >>conftest.$ac_ext <<_ACEOF
5168/* end confdefs.h. */
5169
5170#include <pthread.h>
5171
5172void* routine(void* p){return NULL;}
5173
5174int main(){
5175 pthread_t p;
5176 if(pthread_create(&p,NULL,routine,NULL)!=0)
5177 return 1;
5178 (void)pthread_detach(p);
5179 return 0;
5180}
5181
5182_ACEOF
5183rm -f conftest$ac_exeext
5184if { (ac_try="$ac_link"
5185case "(($ac_try" in
5186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5187 *) ac_try_echo=$ac_try;;
5188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005190 (eval "$ac_link") 2>&5
5191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5194 { (case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199 (eval "$ac_try") 2>&5
5200 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005202 (exit $ac_status); }; }; then
5203 ac_cv_kthread=yes
5204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005205 echo "$as_me: program exited with status $ac_status" >&5
5206echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207sed 's/^/| /' conftest.$ac_ext >&5
5208
5209( exit $ac_status )
5210ac_cv_kthread=no
5211fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5213fi
5214
5215
5216CC="$ac_save_cc"
5217fi
5218
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5220echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005221fi
5222
5223if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5224then
5225# -pthread, if available, provides the right #defines
5226# and linker options to make pthread_create available
5227# Some compilers won't report that they do not support -pthread,
5228# so we need to run a program to see whether it really made the
5229# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005230{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5231echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005234else
5235 ac_save_cc="$CC"
5236CC="$CC -pthread"
5237if test "$cross_compiling" = yes; then
5238 ac_cv_pthread=no
5239else
5240 cat >conftest.$ac_ext <<_ACEOF
5241/* confdefs.h. */
5242_ACEOF
5243cat confdefs.h >>conftest.$ac_ext
5244cat >>conftest.$ac_ext <<_ACEOF
5245/* end confdefs.h. */
5246
5247#include <pthread.h>
5248
5249void* routine(void* p){return NULL;}
5250
5251int main(){
5252 pthread_t p;
5253 if(pthread_create(&p,NULL,routine,NULL)!=0)
5254 return 1;
5255 (void)pthread_detach(p);
5256 return 0;
5257}
5258
5259_ACEOF
5260rm -f conftest$ac_exeext
5261if { (ac_try="$ac_link"
5262case "(($ac_try" in
5263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5264 *) ac_try_echo=$ac_try;;
5265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005267 (eval "$ac_link") 2>&5
5268 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5271 { (case "(($ac_try" in
5272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5273 *) ac_try_echo=$ac_try;;
5274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276 (eval "$ac_try") 2>&5
5277 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005279 (exit $ac_status); }; }; then
5280 ac_cv_pthread=yes
5281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005282 echo "$as_me: program exited with status $ac_status" >&5
5283echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284sed 's/^/| /' conftest.$ac_ext >&5
5285
5286( exit $ac_status )
5287ac_cv_pthread=no
5288fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5290fi
5291
5292
5293CC="$ac_save_cc"
5294fi
5295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5297echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298fi
5299
5300# If we have set a CC compiler flag for thread support then
5301# check if it works for CXX, too.
5302ac_cv_cxx_thread=no
5303if test ! -z "$CXX"
5304then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005305{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5306echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005307ac_save_cxx="$CXX"
5308
5309if test "$ac_cv_kpthread" = "yes"
5310then
5311 CXX="$CXX -Kpthread"
5312 ac_cv_cxx_thread=yes
5313elif test "$ac_cv_kthread" = "yes"
5314then
5315 CXX="$CXX -Kthread"
5316 ac_cv_cxx_thread=yes
5317elif test "$ac_cv_pthread" = "yes"
5318then
5319 CXX="$CXX -pthread"
5320 ac_cv_cxx_thread=yes
5321fi
5322
5323if test $ac_cv_cxx_thread = yes
5324then
5325 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5326 $CXX -c conftest.$ac_ext 2>&5
5327 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5328 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5329 then
5330 ac_cv_cxx_thread=yes
5331 else
5332 ac_cv_cxx_thread=no
5333 fi
5334 rm -fr conftest*
5335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005336{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5337echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338fi
5339CXX="$ac_save_cxx"
5340
5341
5342# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005343{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5344echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005345if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005346 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347else
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355#include <stdarg.h>
5356#include <string.h>
5357#include <float.h>
5358
5359int
5360main ()
5361{
5362
5363 ;
5364 return 0;
5365}
5366_ACEOF
5367rm -f conftest.$ac_objext
5368if { (ac_try="$ac_compile"
5369case "(($ac_try" in
5370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5371 *) ac_try_echo=$ac_try;;
5372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374 (eval "$ac_compile") 2>conftest.er1
5375 ac_status=$?
5376 grep -v '^ *+' conftest.er1 >conftest.err
5377 rm -f conftest.er1
5378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380 (exit $ac_status); } && {
5381 test -z "$ac_c_werror_flag" ||
5382 test ! -s conftest.err
5383 } && test -s conftest.$ac_objext; then
5384 ac_cv_header_stdc=yes
5385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005386 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387sed 's/^/| /' conftest.$ac_ext >&5
5388
5389 ac_cv_header_stdc=no
5390fi
5391
5392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5393
5394if test $ac_cv_header_stdc = yes; then
5395 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5396 cat >conftest.$ac_ext <<_ACEOF
5397/* confdefs.h. */
5398_ACEOF
5399cat confdefs.h >>conftest.$ac_ext
5400cat >>conftest.$ac_ext <<_ACEOF
5401/* end confdefs.h. */
5402#include <string.h>
5403
5404_ACEOF
5405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5406 $EGREP "memchr" >/dev/null 2>&1; then
5407 :
5408else
5409 ac_cv_header_stdc=no
5410fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005411rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005412
5413fi
5414
5415if test $ac_cv_header_stdc = yes; then
5416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5417 cat >conftest.$ac_ext <<_ACEOF
5418/* confdefs.h. */
5419_ACEOF
5420cat confdefs.h >>conftest.$ac_ext
5421cat >>conftest.$ac_ext <<_ACEOF
5422/* end confdefs.h. */
5423#include <stdlib.h>
5424
5425_ACEOF
5426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5427 $EGREP "free" >/dev/null 2>&1; then
5428 :
5429else
5430 ac_cv_header_stdc=no
5431fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005432rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433
5434fi
5435
5436if test $ac_cv_header_stdc = yes; then
5437 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5438 if test "$cross_compiling" = yes; then
5439 :
5440else
5441 cat >conftest.$ac_ext <<_ACEOF
5442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
5447#include <ctype.h>
5448#include <stdlib.h>
5449#if ((' ' & 0x0FF) == 0x020)
5450# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5451# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5452#else
5453# define ISLOWER(c) \
5454 (('a' <= (c) && (c) <= 'i') \
5455 || ('j' <= (c) && (c) <= 'r') \
5456 || ('s' <= (c) && (c) <= 'z'))
5457# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5458#endif
5459
5460#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5461int
5462main ()
5463{
5464 int i;
5465 for (i = 0; i < 256; i++)
5466 if (XOR (islower (i), ISLOWER (i))
5467 || toupper (i) != TOUPPER (i))
5468 return 2;
5469 return 0;
5470}
5471_ACEOF
5472rm -f conftest$ac_exeext
5473if { (ac_try="$ac_link"
5474case "(($ac_try" in
5475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5476 *) ac_try_echo=$ac_try;;
5477esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479 (eval "$ac_link") 2>&5
5480 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5483 { (case "(($ac_try" in
5484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5485 *) ac_try_echo=$ac_try;;
5486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005488 (eval "$ac_try") 2>&5
5489 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005491 (exit $ac_status); }; }; then
5492 :
5493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005494 echo "$as_me: program exited with status $ac_status" >&5
5495echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498( exit $ac_status )
5499ac_cv_header_stdc=no
5500fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5502fi
5503
5504
5505fi
5506fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005507{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5508echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509if test $ac_cv_header_stdc = yes; then
5510
5511cat >>confdefs.h <<\_ACEOF
5512#define STDC_HEADERS 1
5513_ACEOF
5514
5515fi
5516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005517# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5528 inttypes.h stdint.h unistd.h
5529do
5530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5533if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5534 echo $ECHO_N "(cached) $ECHO_C" >&6
5535else
5536 cat >conftest.$ac_ext <<_ACEOF
5537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
5542$ac_includes_default
5543
5544#include <$ac_header>
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (ac_try="$ac_compile"
5548case "(($ac_try" in
5549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5550 *) ac_try_echo=$ac_try;;
5551esac
5552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5553 (eval "$ac_compile") 2>conftest.er1
5554 ac_status=$?
5555 grep -v '^ *+' conftest.er1 >conftest.err
5556 rm -f conftest.er1
5557 cat conftest.err >&5
5558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } && {
5560 test -z "$ac_c_werror_flag" ||
5561 test ! -s conftest.err
5562 } && test -s conftest.$ac_objext; then
5563 eval "$as_ac_Header=yes"
5564else
5565 echo "$as_me: failed program was:" >&5
5566sed 's/^/| /' conftest.$ac_ext >&5
5567
5568 eval "$as_ac_Header=no"
5569fi
5570
5571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5572fi
5573ac_res=`eval echo '${'$as_ac_Header'}'`
5574 { echo "$as_me:$LINENO: result: $ac_res" >&5
5575echo "${ECHO_T}$ac_res" >&6; }
5576if test `eval echo '${'$as_ac_Header'}'` = yes; then
5577 cat >>confdefs.h <<_ACEOF
5578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5579_ACEOF
5580
5581fi
5582
5583done
5584
5585
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586
Martin v. Löwis11437992002-04-12 09:54:03 +00005587
5588
5589
5590
5591
5592
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
Anthony Baxter8a560de2004-10-13 15:30:56 +00005622
Martin v. Löwisc3001752005-01-23 09:27:24 +00005623
Martin v. Löwis11017b12006-01-14 18:12:57 +00005624
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005625
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005626
5627
5628
5629
5630
5631
5632
5633
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005634
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005635
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005636
5637
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005638
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005639
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005640for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5641fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005642ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005643shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005644unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005645sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5646sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005647sys/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 +00005648sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005649sys/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 +00005650sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005651bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005653as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005654if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005655 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5656echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005658 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005659fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005660ac_res=`eval echo '${'$as_ac_Header'}'`
5661 { echo "$as_me:$LINENO: result: $ac_res" >&5
5662echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005663else
Martin v. Löwis11437992002-04-12 09:54:03 +00005664 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005665{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5666echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005667cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005673$ac_includes_default
5674#include <$ac_header>
5675_ACEOF
5676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005677if { (ac_try="$ac_compile"
5678case "(($ac_try" in
5679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5680 *) ac_try_echo=$ac_try;;
5681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005685 grep -v '^ *+' conftest.er1 >conftest.err
5686 rm -f conftest.er1
5687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689 (exit $ac_status); } && {
5690 test -z "$ac_c_werror_flag" ||
5691 test ! -s conftest.err
5692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005696sed 's/^/| /' conftest.$ac_ext >&5
5697
Martin v. Löwiseba40652007-08-30 20:10:57 +00005698 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700
5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005702{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5703echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005704
5705# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005706{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5707echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005714#include <$ac_header>
5715_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005716if { (ac_try="$ac_cpp conftest.$ac_ext"
5717case "(($ac_try" in
5718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5719 *) ac_try_echo=$ac_try;;
5720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005722 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005724 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 rm -f conftest.er1
5726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005728 (exit $ac_status); } >/dev/null && {
5729 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5730 test ! -s conftest.err
5731 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005732 ac_header_preproc=yes
5733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005735sed 's/^/| /' conftest.$ac_ext >&5
5736
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739
Martin v. Löwis11437992002-04-12 09:54:03 +00005740rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005741{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5742echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
5744# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005745case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5746 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5748echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5750echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005752 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005754 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5755echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5756 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5757echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5759echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5761echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5763echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5765echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005767## -------------------------------------- ##
5768## Report this to http://bugs.python.org/ ##
5769## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005770_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005772 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005773esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005774{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5775echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005776if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005777 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005778else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005781ac_res=`eval echo '${'$as_ac_Header'}'`
5782 { echo "$as_me:$LINENO: result: $ac_res" >&5
5783echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005784
5785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005786if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005789_ACEOF
5790
5791fi
5792
Guido van Rossum627b2d71993-12-24 10:39:16 +00005793done
5794
Martin v. Löwis11437992002-04-12 09:54:03 +00005795
5796
5797
5798
5799
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005801for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005802 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5803{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5804echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005805if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005806 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005807else
Martin v. Löwis11437992002-04-12 09:54:03 +00005808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005809/* confdefs.h. */
5810_ACEOF
5811cat confdefs.h >>conftest.$ac_ext
5812cat >>conftest.$ac_ext <<_ACEOF
5813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814#include <sys/types.h>
5815#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005816
Martin v. Löwis11437992002-04-12 09:54:03 +00005817int
5818main ()
5819{
5820if ((DIR *) 0)
5821return 0;
5822 ;
5823 return 0;
5824}
5825_ACEOF
5826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005827if { (ac_try="$ac_compile"
5828case "(($ac_try" in
5829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830 *) ac_try_echo=$ac_try;;
5831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005835 grep -v '^ *+' conftest.er1 >conftest.err
5836 rm -f conftest.er1
5837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 (exit $ac_status); } && {
5840 test -z "$ac_c_werror_flag" ||
5841 test ! -s conftest.err
5842 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005843 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005846sed 's/^/| /' conftest.$ac_ext >&5
5847
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005853ac_res=`eval echo '${'$as_ac_Header'}'`
5854 { echo "$as_me:$LINENO: result: $ac_res" >&5
5855echo "${ECHO_T}$ac_res" >&6; }
5856if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005857 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005859_ACEOF
5860
5861ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005863
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864done
5865# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5866if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5868echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005869if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871else
Martin v. Löwis11437992002-04-12 09:54:03 +00005872 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005874/* confdefs.h. */
5875_ACEOF
5876cat confdefs.h >>conftest.$ac_ext
5877cat >>conftest.$ac_ext <<_ACEOF
5878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880/* Override any GCC internal prototype to avoid an error.
5881 Use char because int might match the return type of a GCC
5882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883#ifdef __cplusplus
5884extern "C"
5885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005887int
5888main ()
5889{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005891 ;
5892 return 0;
5893}
5894_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005895for ac_lib in '' dir; do
5896 if test -z "$ac_lib"; then
5897 ac_res="none required"
5898 else
5899 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005901 fi
5902 rm -f conftest.$ac_objext conftest$ac_exeext
5903if { (ac_try="$ac_link"
5904case "(($ac_try" in
5905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906 *) ac_try_echo=$ac_try;;
5907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005910 ac_status=$?
5911 grep -v '^ *+' conftest.er1 >conftest.err
5912 rm -f conftest.er1
5913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 (exit $ac_status); } && {
5916 test -z "$ac_c_werror_flag" ||
5917 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005918 } && test -s conftest$ac_exeext &&
5919 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005923sed 's/^/| /' conftest.$ac_ext >&5
5924
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925
Brett Cannon19fab762007-06-02 03:02:29 +00005926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927
5928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5929 conftest$ac_exeext
5930 if test "${ac_cv_search_opendir+set}" = set; then
5931 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933done
5934if test "${ac_cv_search_opendir+set}" = set; then
5935 :
5936else
5937 ac_cv_search_opendir=no
5938fi
5939rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005940LIBS=$ac_func_search_save_LIBS
5941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005942{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5943echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944ac_res=$ac_cv_search_opendir
5945if test "$ac_res" != no; then
5946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005949
Michael W. Hudson54241132001-12-07 15:38:26 +00005950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005951 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5952echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005953if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005955else
5956 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
Martin v. Löwiseba40652007-08-30 20:10:57 +00005964/* Override any GCC internal prototype to avoid an error.
5965 Use char because int might match the return type of a GCC
5966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005967#ifdef __cplusplus
5968extern "C"
5969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005970char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005971int
5972main ()
5973{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005974return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005975 ;
5976 return 0;
5977}
5978_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005979for ac_lib in '' x; do
5980 if test -z "$ac_lib"; then
5981 ac_res="none required"
5982 else
5983 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005984 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 fi
5986 rm -f conftest.$ac_objext conftest$ac_exeext
5987if { (ac_try="$ac_link"
5988case "(($ac_try" in
5989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5990 *) ac_try_echo=$ac_try;;
5991esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005994 ac_status=$?
5995 grep -v '^ *+' conftest.er1 >conftest.err
5996 rm -f conftest.er1
5997 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999 (exit $ac_status); } && {
6000 test -z "$ac_c_werror_flag" ||
6001 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006002 } && test -s conftest$ac_exeext &&
6003 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006007sed 's/^/| /' conftest.$ac_ext >&5
6008
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009
Brett Cannon19fab762007-06-02 03:02:29 +00006010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006011
6012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6013 conftest$ac_exeext
6014 if test "${ac_cv_search_opendir+set}" = set; then
6015 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006017done
6018if test "${ac_cv_search_opendir+set}" = set; then
6019 :
6020else
6021 ac_cv_search_opendir=no
6022fi
6023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006024LIBS=$ac_func_search_save_LIBS
6025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006026{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6027echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028ac_res=$ac_cv_search_opendir
6029if test "$ac_res" != no; then
6030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
6033
6034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006036{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6037echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040else
6041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006047#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048int
6049main ()
6050{
6051return makedev(0, 0);
6052 ;
6053 return 0;
6054}
6055_ACEOF
6056rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006057if { (ac_try="$ac_link"
6058case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006065 grep -v '^ *+' conftest.er1 >conftest.err
6066 rm -f conftest.er1
6067 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006069 (exit $ac_status); } && {
6070 test -z "$ac_c_werror_flag" ||
6071 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006072 } && test -s conftest$ac_exeext &&
6073 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074 ac_cv_header_sys_types_h_makedev=yes
6075else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006077sed 's/^/| /' conftest.$ac_ext >&5
6078
Martin v. Löwiseba40652007-08-30 20:10:57 +00006079 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006081
6082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084
6085fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006086{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6087echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088
6089if test $ac_cv_header_sys_types_h_makedev = no; then
6090if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6092echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006094 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6097echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098else
6099 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6101echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006103/* confdefs.h. */
6104_ACEOF
6105cat confdefs.h >>conftest.$ac_ext
6106cat >>conftest.$ac_ext <<_ACEOF
6107/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108$ac_includes_default
6109#include <sys/mkdev.h>
6110_ACEOF
6111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006112if { (ac_try="$ac_compile"
6113case "(($ac_try" in
6114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6115 *) ac_try_echo=$ac_try;;
6116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006120 grep -v '^ *+' conftest.er1 >conftest.err
6121 rm -f conftest.er1
6122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 (exit $ac_status); } && {
6125 test -z "$ac_c_werror_flag" ||
6126 test ! -s conftest.err
6127 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006128 ac_header_compiler=yes
6129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006131sed 's/^/| /' conftest.$ac_ext >&5
6132
Martin v. Löwiseba40652007-08-30 20:10:57 +00006133 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135
6136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6138echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139
6140# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006141{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6142echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
6148/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149#include <sys/mkdev.h>
6150_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151if { (ac_try="$ac_cpp conftest.$ac_ext"
6152case "(($ac_try" in
6153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154 *) ac_try_echo=$ac_try;;
6155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 rm -f conftest.er1
6161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163 (exit $ac_status); } >/dev/null && {
6164 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6165 test ! -s conftest.err
6166 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167 ac_header_preproc=yes
6168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006170sed 's/^/| /' conftest.$ac_ext >&5
6171
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_header_preproc=no
6173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006176{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6177echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6181 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006186 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6190echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006201 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006202## -------------------------------------- ##
6203## Report this to http://bugs.python.org/ ##
6204## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006205_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006207 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006209{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6210echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213else
6214 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6215fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006216{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6217echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006220if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222cat >>confdefs.h <<\_ACEOF
6223#define MAJOR_IN_MKDEV 1
6224_ACEOF
6225
6226fi
6227
6228
6229
6230 if test $ac_cv_header_sys_mkdev_h = no; then
6231 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006232 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6233echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006235 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006237{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6238echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239else
6240 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006241{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6242echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249$ac_includes_default
6250#include <sys/sysmacros.h>
6251_ACEOF
6252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 ac_header_compiler=yes
6270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006272sed 's/^/| /' conftest.$ac_ext >&5
6273
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280
6281# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006282{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6283echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290#include <sys/sysmacros.h>
6291_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006300 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 rm -f conftest.er1
6302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006308 ac_header_preproc=yes
6309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006311sed 's/^/| /' conftest.$ac_ext >&5
6312
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_header_preproc=no
6314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006316rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006319
6320# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006327 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006328 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006330 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006342 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006343## -------------------------------------- ##
6344## Report this to http://bugs.python.org/ ##
6345## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006346_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006348 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006350{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6351echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354else
6355 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6356fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006357{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6358echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359
6360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006361if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006362
6363cat >>confdefs.h <<\_ACEOF
6364#define MAJOR_IN_SYSMACROS 1
6365_ACEOF
6366
6367fi
6368
6369
6370 fi
6371fi
6372
Michael W. Hudson54241132001-12-07 15:38:26 +00006373
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006375
6376for ac_header in term.h
6377do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006378as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6379{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006383else
6384 cat >conftest.$ac_ext <<_ACEOF
6385/* confdefs.h. */
6386_ACEOF
6387cat confdefs.h >>conftest.$ac_ext
6388cat >>conftest.$ac_ext <<_ACEOF
6389/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006390
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006391#ifdef HAVE_CURSES_H
6392#include <curses.h>
6393#endif
6394
6395
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006396#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397_ACEOF
6398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006415 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006417 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418sed 's/^/| /' conftest.$ac_ext >&5
6419
Martin v. Löwiseba40652007-08-30 20:10:57 +00006420 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006424fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006425ac_res=`eval echo '${'$as_ac_Header'}'`
6426 { echo "$as_me:$LINENO: result: $ac_res" >&5
6427echo "${ECHO_T}$ac_res" >&6; }
6428if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006429 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006431_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433fi
6434
6435done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006436
6437
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438# On Linux, netlink.h requires asm/types.h
6439
6440for ac_header in linux/netlink.h
6441do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006442as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6444echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006446 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006447else
6448 cat >conftest.$ac_ext <<_ACEOF
6449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
6454
6455#ifdef HAVE_ASM_TYPES_H
6456#include <asm/types.h>
6457#endif
6458#ifdef HAVE_SYS_SOCKET_H
6459#include <sys/socket.h>
6460#endif
6461
6462
6463#include <$ac_header>
6464_ACEOF
6465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006466if { (ac_try="$ac_compile"
6467case "(($ac_try" in
6468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6469 *) ac_try_echo=$ac_try;;
6470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 ac_status=$?
6474 grep -v '^ *+' conftest.er1 >conftest.err
6475 rm -f conftest.er1
6476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 (exit $ac_status); } && {
6479 test -z "$ac_c_werror_flag" ||
6480 test ! -s conftest.err
6481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482 eval "$as_ac_Header=yes"
6483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006484 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006485sed 's/^/| /' conftest.$ac_ext >&5
6486
Martin v. Löwiseba40652007-08-30 20:10:57 +00006487 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006489
6490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006492ac_res=`eval echo '${'$as_ac_Header'}'`
6493 { echo "$as_me:$LINENO: result: $ac_res" >&5
6494echo "${ECHO_T}$ac_res" >&6; }
6495if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498_ACEOF
6499
6500fi
6501
6502done
6503
6504
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006507{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6508echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006515#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006516
6517_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006519 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523
6524cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006525#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006526_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006527
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529fi
Ronald Oussoren25967582009-09-06 10:00:26 +00006530rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006532{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6533echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536{ echo "$as_me:$LINENO: checking for makedev" >&5
6537echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006538cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006539/* confdefs.h. */
6540_ACEOF
6541cat confdefs.h >>conftest.$ac_ext
6542cat >>conftest.$ac_ext <<_ACEOF
6543/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006544#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006545int
6546main ()
6547{
6548 makedev(0, 0)
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554if { (ac_try="$ac_link"
6555case "(($ac_try" in
6556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6557 *) ac_try_echo=$ac_try;;
6558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562 grep -v '^ *+' conftest.er1 >conftest.err
6563 rm -f conftest.er1
6564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (exit $ac_status); } && {
6567 test -z "$ac_c_werror_flag" ||
6568 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006569 } && test -s conftest$ac_exeext &&
6570 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006571 ac_cv_has_makedev=yes
6572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006574sed 's/^/| /' conftest.$ac_ext >&5
6575
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578
6579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006580 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006581if test "$ac_cv_has_makedev" = "no"; then
6582 # we didn't link, try if _OSF_SOURCE will allow us to link
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006589
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006590#define _OSF_SOURCE 1
6591#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006592
Neal Norwitz11690112002-07-30 01:08:28 +00006593int
6594main ()
6595{
6596 makedev(0, 0)
6597 ;
6598 return 0;
6599}
6600_ACEOF
6601rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602if { (ac_try="$ac_link"
6603case "(($ac_try" in
6604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6605 *) ac_try_echo=$ac_try;;
6606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006608 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006610 grep -v '^ *+' conftest.er1 >conftest.err
6611 rm -f conftest.er1
6612 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614 (exit $ac_status); } && {
6615 test -z "$ac_c_werror_flag" ||
6616 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006617 } && test -s conftest$ac_exeext &&
6618 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006619 ac_cv_has_makedev=yes
6620else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006629 if test "$ac_cv_has_makedev" = "yes"; then
6630
6631cat >>confdefs.h <<\_ACEOF
6632#define _OSF_SOURCE 1
6633_ACEOF
6634
6635 fi
6636fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006637{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6638echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006639if test "$ac_cv_has_makedev" = "yes"; then
6640
6641cat >>confdefs.h <<\_ACEOF
6642#define HAVE_MAKEDEV 1
6643_ACEOF
6644
6645fi
6646
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6648# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6649# defined, but the compiler does not support pragma redefine_extname,
6650# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6651# structures (such as rlimit64) without declaring them. As a
6652# work-around, disable LFS on such configurations
6653
6654use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006655{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6656echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006658/* confdefs.h. */
6659_ACEOF
6660cat confdefs.h >>conftest.$ac_ext
6661cat >>conftest.$ac_ext <<_ACEOF
6662/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006663
6664#define _LARGEFILE_SOURCE 1
6665#define _FILE_OFFSET_BITS 64
6666#include <sys/resource.h>
6667
Martin v. Löwis399a6892002-10-04 10:22:02 +00006668int
6669main ()
6670{
6671struct rlimit foo;
6672 ;
6673 return 0;
6674}
6675_ACEOF
6676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006677if { (ac_try="$ac_compile"
6678case "(($ac_try" in
6679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6680 *) ac_try_echo=$ac_try;;
6681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006685 grep -v '^ *+' conftest.er1 >conftest.err
6686 rm -f conftest.er1
6687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 (exit $ac_status); } && {
6690 test -z "$ac_c_werror_flag" ||
6691 test ! -s conftest.err
6692 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693 sol_lfs_bug=no
6694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006696sed 's/^/| /' conftest.$ac_ext >&5
6697
Martin v. Löwiseba40652007-08-30 20:10:57 +00006698 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006700
6701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006702{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6703echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006704if test "$sol_lfs_bug" = "yes"; then
6705 use_lfs=no
6706fi
6707
6708if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006709# Two defines needed to enable largefile support on various platforms
6710# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<\_ACEOF
6713#define _LARGEFILE_SOURCE 1
6714_ACEOF
6715
6716
6717cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006718#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006719_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720
Martin v. Löwis399a6892002-10-04 10:22:02 +00006721fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006722
Guido van Rossum84e7b241996-08-19 21:59:00 +00006723# Add some code to confdefs.h so that the test for off_t works on SCO
6724cat >> confdefs.h <<\EOF
6725#if defined(SCO_DS)
6726#undef _OFF_T
6727#endif
6728EOF
6729
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006731{ echo "$as_me:$LINENO: checking for mode_t" >&5
6732echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006733if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006734 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006735else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006736 cat >conftest.$ac_ext <<_ACEOF
6737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
6742$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006743typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006744int
6745main ()
6746{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006747if ((ac__type_new_ *) 0)
6748 return 0;
6749if (sizeof (ac__type_new_))
6750 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751 ;
6752 return 0;
6753}
6754_ACEOF
6755rm -f conftest.$ac_objext
6756if { (ac_try="$ac_compile"
6757case "(($ac_try" in
6758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6759 *) ac_try_echo=$ac_try;;
6760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006762 (eval "$ac_compile") 2>conftest.er1
6763 ac_status=$?
6764 grep -v '^ *+' conftest.er1 >conftest.err
6765 rm -f conftest.er1
6766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 (exit $ac_status); } && {
6769 test -z "$ac_c_werror_flag" ||
6770 test ! -s conftest.err
6771 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006772 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006773else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006775sed 's/^/| /' conftest.$ac_ext >&5
6776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006777 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779
6780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006781fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6783echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6784if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006786else
Martin v. Löwis11437992002-04-12 09:54:03 +00006787
6788cat >>confdefs.h <<_ACEOF
6789#define mode_t int
6790_ACEOF
6791
6792fi
6793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006794{ echo "$as_me:$LINENO: checking for off_t" >&5
6795echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006796if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006799 cat >conftest.$ac_ext <<_ACEOF
6800/* confdefs.h. */
6801_ACEOF
6802cat confdefs.h >>conftest.$ac_ext
6803cat >>conftest.$ac_ext <<_ACEOF
6804/* end confdefs.h. */
6805$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006806typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807int
6808main ()
6809{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006810if ((ac__type_new_ *) 0)
6811 return 0;
6812if (sizeof (ac__type_new_))
6813 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814 ;
6815 return 0;
6816}
6817_ACEOF
6818rm -f conftest.$ac_objext
6819if { (ac_try="$ac_compile"
6820case "(($ac_try" in
6821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6822 *) ac_try_echo=$ac_try;;
6823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006825 (eval "$ac_compile") 2>conftest.er1
6826 ac_status=$?
6827 grep -v '^ *+' conftest.er1 >conftest.err
6828 rm -f conftest.er1
6829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 (exit $ac_status); } && {
6832 test -z "$ac_c_werror_flag" ||
6833 test ! -s conftest.err
6834 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006835 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006838sed 's/^/| /' conftest.$ac_ext >&5
6839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006840 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006842
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006845{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6846echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6847if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849else
Martin v. Löwis11437992002-04-12 09:54:03 +00006850
6851cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006853_ACEOF
6854
6855fi
6856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006857{ echo "$as_me:$LINENO: checking for pid_t" >&5
6858echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006859if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006861else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862 cat >conftest.$ac_ext <<_ACEOF
6863/* confdefs.h. */
6864_ACEOF
6865cat confdefs.h >>conftest.$ac_ext
6866cat >>conftest.$ac_ext <<_ACEOF
6867/* end confdefs.h. */
6868$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006869typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006870int
6871main ()
6872{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006873if ((ac__type_new_ *) 0)
6874 return 0;
6875if (sizeof (ac__type_new_))
6876 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006877 ;
6878 return 0;
6879}
6880_ACEOF
6881rm -f conftest.$ac_objext
6882if { (ac_try="$ac_compile"
6883case "(($ac_try" in
6884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6885 *) ac_try_echo=$ac_try;;
6886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006888 (eval "$ac_compile") 2>conftest.er1
6889 ac_status=$?
6890 grep -v '^ *+' conftest.er1 >conftest.err
6891 rm -f conftest.er1
6892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894 (exit $ac_status); } && {
6895 test -z "$ac_c_werror_flag" ||
6896 test ! -s conftest.err
6897 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006901sed 's/^/| /' conftest.$ac_ext >&5
6902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006903 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905
6906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006908{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6909echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6910if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006911 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006912else
Martin v. Löwis11437992002-04-12 09:54:03 +00006913
6914cat >>confdefs.h <<_ACEOF
6915#define pid_t int
6916_ACEOF
6917
6918fi
6919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006920{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6921echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006922if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006924else
6925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931#include <sys/types.h>
6932#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006933
Martin v. Löwis11437992002-04-12 09:54:03 +00006934int
6935main ()
6936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006937return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943if { (ac_try="$ac_compile"
6944case "(($ac_try" in
6945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6946 *) ac_try_echo=$ac_try;;
6947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006951 grep -v '^ *+' conftest.er1 >conftest.err
6952 rm -f conftest.er1
6953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 (exit $ac_status); } && {
6956 test -z "$ac_c_werror_flag" ||
6957 test ! -s conftest.err
6958 } && test -s conftest.$ac_objext; then
6959 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006962sed 's/^/| /' conftest.$ac_ext >&5
6963
Martin v. Löwiseba40652007-08-30 20:10:57 +00006964 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006969{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6970echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006971
Martin v. Löwis11437992002-04-12 09:54:03 +00006972cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006975
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006977{ echo "$as_me:$LINENO: checking for size_t" >&5
6978echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006979if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982 cat >conftest.$ac_ext <<_ACEOF
6983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
6988$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006989typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006990int
6991main ()
6992{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006993if ((ac__type_new_ *) 0)
6994 return 0;
6995if (sizeof (ac__type_new_))
6996 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
7001rm -f conftest.$ac_objext
7002if { (ac_try="$ac_compile"
7003case "(($ac_try" in
7004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7005 *) ac_try_echo=$ac_try;;
7006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007008 (eval "$ac_compile") 2>conftest.er1
7009 ac_status=$?
7010 grep -v '^ *+' conftest.er1 >conftest.err
7011 rm -f conftest.er1
7012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007014 (exit $ac_status); } && {
7015 test -z "$ac_c_werror_flag" ||
7016 test ! -s conftest.err
7017 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007018 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007021sed 's/^/| /' conftest.$ac_ext >&5
7022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007023 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025
7026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007027fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007028{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7029echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7030if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007031 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007036_ACEOF
7037
7038fi
7039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007040{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7041echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007042if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007043 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007044else
7045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007046/* confdefs.h. */
7047_ACEOF
7048cat confdefs.h >>conftest.$ac_ext
7049cat >>conftest.$ac_ext <<_ACEOF
7050/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007052
7053_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007055 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056 ac_cv_type_uid_t=yes
7057else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=no
7059fi
Ronald Oussoren25967582009-09-06 10:00:26 +00007060rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007063{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7064echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007065if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067cat >>confdefs.h <<\_ACEOF
7068#define uid_t int
7069_ACEOF
7070
7071
7072cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007073#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007074_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075
7076fi
7077
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007078
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007079 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7080echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007081if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007082 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007083else
7084 ac_cv_c_uint32_t=no
7085 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7086 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7087 cat >conftest.$ac_ext <<_ACEOF
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
7092/* end confdefs.h. */
7093$ac_includes_default
7094int
7095main ()
7096{
7097static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7098test_array [0] = 0
7099
7100 ;
7101 return 0;
7102}
7103_ACEOF
7104rm -f conftest.$ac_objext
7105if { (ac_try="$ac_compile"
7106case "(($ac_try" in
7107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7108 *) ac_try_echo=$ac_try;;
7109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007111 (eval "$ac_compile") 2>conftest.er1
7112 ac_status=$?
7113 grep -v '^ *+' conftest.er1 >conftest.err
7114 rm -f conftest.er1
7115 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007117 (exit $ac_status); } && {
7118 test -z "$ac_c_werror_flag" ||
7119 test ! -s conftest.err
7120 } && test -s conftest.$ac_objext; then
7121 case $ac_type in
7122 uint32_t) ac_cv_c_uint32_t=yes ;;
7123 *) ac_cv_c_uint32_t=$ac_type ;;
7124esac
7125
7126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007127 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007128sed 's/^/| /' conftest.$ac_ext >&5
7129
7130
7131fi
7132
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134 test "$ac_cv_c_uint32_t" != no && break
7135 done
7136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007137{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7138echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007139 case $ac_cv_c_uint32_t in #(
7140 no|yes) ;; #(
7141 *)
7142
7143cat >>confdefs.h <<\_ACEOF
7144#define _UINT32_T 1
7145_ACEOF
7146
7147
7148cat >>confdefs.h <<_ACEOF
7149#define uint32_t $ac_cv_c_uint32_t
7150_ACEOF
7151;;
7152 esac
7153
7154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007155 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7156echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007157if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007158 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007159else
7160 ac_cv_c_uint64_t=no
7161 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7162 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7163 cat >conftest.$ac_ext <<_ACEOF
7164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
7169$ac_includes_default
7170int
7171main ()
7172{
7173static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7174test_array [0] = 0
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (ac_try="$ac_compile"
7182case "(($ac_try" in
7183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7184 *) ac_try_echo=$ac_try;;
7185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007187 (eval "$ac_compile") 2>conftest.er1
7188 ac_status=$?
7189 grep -v '^ *+' conftest.er1 >conftest.err
7190 rm -f conftest.er1
7191 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007193 (exit $ac_status); } && {
7194 test -z "$ac_c_werror_flag" ||
7195 test ! -s conftest.err
7196 } && test -s conftest.$ac_objext; then
7197 case $ac_type in
7198 uint64_t) ac_cv_c_uint64_t=yes ;;
7199 *) ac_cv_c_uint64_t=$ac_type ;;
7200esac
7201
7202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007203 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007204sed 's/^/| /' conftest.$ac_ext >&5
7205
7206
7207fi
7208
7209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7210 test "$ac_cv_c_uint64_t" != no && break
7211 done
7212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007213{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7214echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007215 case $ac_cv_c_uint64_t in #(
7216 no|yes) ;; #(
7217 *)
7218
7219cat >>confdefs.h <<\_ACEOF
7220#define _UINT64_T 1
7221_ACEOF
7222
7223
7224cat >>confdefs.h <<_ACEOF
7225#define uint64_t $ac_cv_c_uint64_t
7226_ACEOF
7227;;
7228 esac
7229
7230
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007231 { echo "$as_me:$LINENO: checking for int32_t" >&5
7232echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007233if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007234 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007235else
7236 ac_cv_c_int32_t=no
7237 for ac_type in 'int32_t' 'int' 'long int' \
7238 'long long int' 'short int' 'signed char'; do
7239 cat >conftest.$ac_ext <<_ACEOF
7240/* confdefs.h. */
7241_ACEOF
7242cat confdefs.h >>conftest.$ac_ext
7243cat >>conftest.$ac_ext <<_ACEOF
7244/* end confdefs.h. */
7245$ac_includes_default
7246int
7247main ()
7248{
7249static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
7257if { (ac_try="$ac_compile"
7258case "(($ac_try" in
7259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7260 *) ac_try_echo=$ac_try;;
7261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007263 (eval "$ac_compile") 2>conftest.er1
7264 ac_status=$?
7265 grep -v '^ *+' conftest.er1 >conftest.err
7266 rm -f conftest.er1
7267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007269 (exit $ac_status); } && {
7270 test -z "$ac_c_werror_flag" ||
7271 test ! -s conftest.err
7272 } && test -s conftest.$ac_objext; then
7273 cat >conftest.$ac_ext <<_ACEOF
7274/* confdefs.h. */
7275_ACEOF
7276cat confdefs.h >>conftest.$ac_ext
7277cat >>conftest.$ac_ext <<_ACEOF
7278/* end confdefs.h. */
7279$ac_includes_default
7280int
7281main ()
7282{
7283static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007284 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007285test_array [0] = 0
7286
7287 ;
7288 return 0;
7289}
7290_ACEOF
7291rm -f conftest.$ac_objext
7292if { (ac_try="$ac_compile"
7293case "(($ac_try" in
7294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7295 *) ac_try_echo=$ac_try;;
7296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007298 (eval "$ac_compile") 2>conftest.er1
7299 ac_status=$?
7300 grep -v '^ *+' conftest.er1 >conftest.err
7301 rm -f conftest.er1
7302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007304 (exit $ac_status); } && {
7305 test -z "$ac_c_werror_flag" ||
7306 test ! -s conftest.err
7307 } && test -s conftest.$ac_objext; then
7308 :
7309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007310 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007311sed 's/^/| /' conftest.$ac_ext >&5
7312
7313 case $ac_type in
7314 int32_t) ac_cv_c_int32_t=yes ;;
7315 *) ac_cv_c_int32_t=$ac_type ;;
7316esac
7317
7318fi
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007322 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007323sed 's/^/| /' conftest.$ac_ext >&5
7324
7325
7326fi
7327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329 test "$ac_cv_c_int32_t" != no && break
7330 done
7331fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007332{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7333echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007334 case $ac_cv_c_int32_t in #(
7335 no|yes) ;; #(
7336 *)
7337
7338cat >>confdefs.h <<_ACEOF
7339#define int32_t $ac_cv_c_int32_t
7340_ACEOF
7341;;
7342 esac
7343
7344
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007345 { echo "$as_me:$LINENO: checking for int64_t" >&5
7346echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007347if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007348 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007349else
7350 ac_cv_c_int64_t=no
7351 for ac_type in 'int64_t' 'int' 'long int' \
7352 'long long int' 'short int' 'signed char'; do
7353 cat >conftest.$ac_ext <<_ACEOF
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
7359$ac_includes_default
7360int
7361main ()
7362{
7363static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7364test_array [0] = 0
7365
7366 ;
7367 return 0;
7368}
7369_ACEOF
7370rm -f conftest.$ac_objext
7371if { (ac_try="$ac_compile"
7372case "(($ac_try" in
7373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7374 *) ac_try_echo=$ac_try;;
7375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007377 (eval "$ac_compile") 2>conftest.er1
7378 ac_status=$?
7379 grep -v '^ *+' conftest.er1 >conftest.err
7380 rm -f conftest.er1
7381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383 (exit $ac_status); } && {
7384 test -z "$ac_c_werror_flag" ||
7385 test ! -s conftest.err
7386 } && test -s conftest.$ac_objext; then
7387 cat >conftest.$ac_ext <<_ACEOF
7388/* confdefs.h. */
7389_ACEOF
7390cat confdefs.h >>conftest.$ac_ext
7391cat >>conftest.$ac_ext <<_ACEOF
7392/* end confdefs.h. */
7393$ac_includes_default
7394int
7395main ()
7396{
7397static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007398 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007399test_array [0] = 0
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405rm -f conftest.$ac_objext
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007412 (eval "$ac_compile") 2>conftest.er1
7413 ac_status=$?
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
7422 :
7423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007424 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007425sed 's/^/| /' conftest.$ac_ext >&5
7426
7427 case $ac_type in
7428 int64_t) ac_cv_c_int64_t=yes ;;
7429 *) ac_cv_c_int64_t=$ac_type ;;
7430esac
7431
7432fi
7433
7434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007436 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007437sed 's/^/| /' conftest.$ac_ext >&5
7438
7439
7440fi
7441
7442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7443 test "$ac_cv_c_int64_t" != no && break
7444 done
7445fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007446{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7447echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007448 case $ac_cv_c_int64_t in #(
7449 no|yes) ;; #(
7450 *)
7451
7452cat >>confdefs.h <<_ACEOF
7453#define int64_t $ac_cv_c_int64_t
7454_ACEOF
7455;;
7456 esac
7457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007458{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7459echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007461 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007463 cat >conftest.$ac_ext <<_ACEOF
7464/* confdefs.h. */
7465_ACEOF
7466cat confdefs.h >>conftest.$ac_ext
7467cat >>conftest.$ac_ext <<_ACEOF
7468/* end confdefs.h. */
7469$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007470typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007471int
7472main ()
7473{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007474if ((ac__type_new_ *) 0)
7475 return 0;
7476if (sizeof (ac__type_new_))
7477 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007478 ;
7479 return 0;
7480}
7481_ACEOF
7482rm -f conftest.$ac_objext
7483if { (ac_try="$ac_compile"
7484case "(($ac_try" in
7485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7486 *) ac_try_echo=$ac_try;;
7487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007489 (eval "$ac_compile") 2>conftest.er1
7490 ac_status=$?
7491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007495 (exit $ac_status); } && {
7496 test -z "$ac_c_werror_flag" ||
7497 test ! -s conftest.err
7498 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007499 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502sed 's/^/| /' conftest.$ac_ext >&5
7503
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007504 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506
7507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007508fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007509{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7510echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7511if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007512
7513cat >>confdefs.h <<\_ACEOF
7514#define HAVE_SSIZE_T 1
7515_ACEOF
7516
7517fi
7518
Jack Jansendd19cf82001-12-06 22:36:17 +00007519
Michael W. Hudson54241132001-12-07 15:38:26 +00007520# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007521# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007522{ echo "$as_me:$LINENO: checking for int" >&5
7523echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7524if test "${ac_cv_type_int+set}" = set; then
7525 echo $ECHO_N "(cached) $ECHO_C" >&6
7526else
7527 cat >conftest.$ac_ext <<_ACEOF
7528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
7533$ac_includes_default
7534typedef int ac__type_new_;
7535int
7536main ()
7537{
7538if ((ac__type_new_ *) 0)
7539 return 0;
7540if (sizeof (ac__type_new_))
7541 return 0;
7542 ;
7543 return 0;
7544}
7545_ACEOF
7546rm -f conftest.$ac_objext
7547if { (ac_try="$ac_compile"
7548case "(($ac_try" in
7549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7550 *) ac_try_echo=$ac_try;;
7551esac
7552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7553 (eval "$ac_compile") 2>conftest.er1
7554 ac_status=$?
7555 grep -v '^ *+' conftest.er1 >conftest.err
7556 rm -f conftest.er1
7557 cat conftest.err >&5
7558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7559 (exit $ac_status); } && {
7560 test -z "$ac_c_werror_flag" ||
7561 test ! -s conftest.err
7562 } && test -s conftest.$ac_objext; then
7563 ac_cv_type_int=yes
7564else
7565 echo "$as_me: failed program was:" >&5
7566sed 's/^/| /' conftest.$ac_ext >&5
7567
7568 ac_cv_type_int=no
7569fi
7570
7571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7572fi
7573{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7574echo "${ECHO_T}$ac_cv_type_int" >&6; }
7575
Martin v. Löwiseba40652007-08-30 20:10:57 +00007576# The cast to long int works around a bug in the HP C Compiler
7577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007580{ echo "$as_me:$LINENO: checking size of int" >&5
7581echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007582if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007583 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 if test "$cross_compiling" = yes; then
7586 # Depending upon the size, compute the lo and hi bounds.
7587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007588/* confdefs.h. */
7589_ACEOF
7590cat confdefs.h >>conftest.$ac_ext
7591cat >>conftest.$ac_ext <<_ACEOF
7592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007593$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007594 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007599test_array [0] = 0
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
7605rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007606if { (ac_try="$ac_compile"
7607case "(($ac_try" in
7608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7609 *) ac_try_echo=$ac_try;;
7610esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007614 grep -v '^ *+' conftest.er1 >conftest.err
7615 rm -f conftest.er1
7616 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618 (exit $ac_status); } && {
7619 test -z "$ac_c_werror_flag" ||
7620 test ! -s conftest.err
7621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_lo=0 ac_mid=0
7623 while :; do
7624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007625/* confdefs.h. */
7626_ACEOF
7627cat confdefs.h >>conftest.$ac_ext
7628cat >>conftest.$ac_ext <<_ACEOF
7629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007630$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007631 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007632int
7633main ()
7634{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007635static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007636test_array [0] = 0
7637
7638 ;
7639 return 0;
7640}
7641_ACEOF
7642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007643if { (ac_try="$ac_compile"
7644case "(($ac_try" in
7645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7646 *) ac_try_echo=$ac_try;;
7647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007659 ac_hi=$ac_mid; break
7660else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007662sed 's/^/| /' conftest.$ac_ext >&5
7663
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 ac_lo=`expr $ac_mid + 1`
7665 if test $ac_lo -le $ac_mid; then
7666 ac_lo= ac_hi=
7667 break
7668 fi
7669 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007671
7672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 done
7674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007676sed 's/^/| /' conftest.$ac_ext >&5
7677
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007685 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007686int
7687main ()
7688{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007690test_array [0] = 0
7691
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007697if { (ac_try="$ac_compile"
7698case "(($ac_try" in
7699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7700 *) ac_try_echo=$ac_try;;
7701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007705 grep -v '^ *+' conftest.er1 >conftest.err
7706 rm -f conftest.er1
7707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007709 (exit $ac_status); } && {
7710 test -z "$ac_c_werror_flag" ||
7711 test ! -s conftest.err
7712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007713 ac_hi=-1 ac_mid=-1
7714 while :; do
7715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007716/* confdefs.h. */
7717_ACEOF
7718cat confdefs.h >>conftest.$ac_ext
7719cat >>conftest.$ac_ext <<_ACEOF
7720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007721$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007727test_array [0] = 0
7728
7729 ;
7730 return 0;
7731}
7732_ACEOF
7733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734if { (ac_try="$ac_compile"
7735case "(($ac_try" in
7736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7737 *) ac_try_echo=$ac_try;;
7738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 grep -v '^ *+' conftest.er1 >conftest.err
7743 rm -f conftest.er1
7744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 (exit $ac_status); } && {
7747 test -z "$ac_c_werror_flag" ||
7748 test ! -s conftest.err
7749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_lo=$ac_mid; break
7751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007753sed 's/^/| /' conftest.$ac_ext >&5
7754
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755 ac_hi=`expr '(' $ac_mid ')' - 1`
7756 if test $ac_mid -le $ac_hi; then
7757 ac_lo= ac_hi=
7758 break
7759 fi
7760 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762
7763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 done
7765else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007767sed 's/^/| /' conftest.$ac_ext >&5
7768
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007774
7775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007776# Binary search between lo and hi bounds.
7777while test "x$ac_lo" != "x$ac_hi"; do
7778 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007785$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007786 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
7789{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007791test_array [0] = 0
7792
7793 ;
7794 return 0;
7795}
7796_ACEOF
7797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798if { (ac_try="$ac_compile"
7799case "(($ac_try" in
7800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7801 *) ac_try_echo=$ac_try;;
7802esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 grep -v '^ *+' conftest.er1 >conftest.err
7807 rm -f conftest.er1
7808 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 (exit $ac_status); } && {
7811 test -z "$ac_c_werror_flag" ||
7812 test ! -s conftest.err
7813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ac_hi=$ac_mid
7815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007817sed 's/^/| /' conftest.$ac_ext >&5
7818
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821
7822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007823done
7824case $ac_lo in
7825?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007827 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007828See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007829echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007831 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 else
7833 ac_cv_sizeof_int=0
7834 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007835esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007836else
Martin v. Löwis11437992002-04-12 09:54:03 +00007837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* confdefs.h. */
7839_ACEOF
7840cat confdefs.h >>conftest.$ac_ext
7841cat >>conftest.$ac_ext <<_ACEOF
7842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007843$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007844 typedef int ac__type_sizeof_;
7845static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7846static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007847#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007848#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007851{
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
7853 FILE *f = fopen ("conftest.val", "w");
7854 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007856 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007859 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 }
7863 else
7864 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007866 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
7872 ;
7873 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007874}
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
7876rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007877if { (ac_try="$ac_link"
7878case "(($ac_try" in
7879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7880 *) ac_try_echo=$ac_try;;
7881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887 { (case "(($ac_try" in
7888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7889 *) ac_try_echo=$ac_try;;
7890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007893 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 (exit $ac_status); }; }; then
7896 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007898 echo "$as_me: program exited with status $ac_status" >&5
7899echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
Martin v. Löwis11437992002-04-12 09:54:03 +00007902( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007904 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007905See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007906echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 else
7910 ac_cv_sizeof_int=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913rm -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 +00007914fi
7915rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007917{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7918echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007919
7920
7921
Martin v. Löwis11437992002-04-12 09:54:03 +00007922cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007923#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007924_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925
7926
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007927{ echo "$as_me:$LINENO: checking for long" >&5
7928echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7929if test "${ac_cv_type_long+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931else
7932 cat >conftest.$ac_ext <<_ACEOF
7933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
7938$ac_includes_default
7939typedef long ac__type_new_;
7940int
7941main ()
7942{
7943if ((ac__type_new_ *) 0)
7944 return 0;
7945if (sizeof (ac__type_new_))
7946 return 0;
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951rm -f conftest.$ac_objext
7952if { (ac_try="$ac_compile"
7953case "(($ac_try" in
7954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7955 *) ac_try_echo=$ac_try;;
7956esac
7957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7958 (eval "$ac_compile") 2>conftest.er1
7959 ac_status=$?
7960 grep -v '^ *+' conftest.er1 >conftest.err
7961 rm -f conftest.er1
7962 cat conftest.err >&5
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } && {
7965 test -z "$ac_c_werror_flag" ||
7966 test ! -s conftest.err
7967 } && test -s conftest.$ac_objext; then
7968 ac_cv_type_long=yes
7969else
7970 echo "$as_me: failed program was:" >&5
7971sed 's/^/| /' conftest.$ac_ext >&5
7972
7973 ac_cv_type_long=no
7974fi
7975
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977fi
7978{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7979echo "${ECHO_T}$ac_cv_type_long" >&6; }
7980
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981# The cast to long int works around a bug in the HP C Compiler
7982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7984# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007985{ echo "$as_me:$LINENO: checking size of long" >&5
7986echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007987if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 if test "$cross_compiling" = yes; then
7991 # Depending upon the size, compute the lo and hi bounds.
7992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008004test_array [0] = 0
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008011if { (ac_try="$ac_compile"
8012case "(($ac_try" in
8013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8014 *) ac_try_echo=$ac_try;;
8015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 grep -v '^ *+' conftest.er1 >conftest.err
8020 rm -f conftest.er1
8021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 (exit $ac_status); } && {
8024 test -z "$ac_c_werror_flag" ||
8025 test ! -s conftest.err
8026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008027 ac_lo=0 ac_mid=0
8028 while :; do
8029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008036 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008041test_array [0] = 0
8042
8043 ;
8044 return 0;
8045}
8046_ACEOF
8047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008048if { (ac_try="$ac_compile"
8049case "(($ac_try" in
8050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8051 *) ac_try_echo=$ac_try;;
8052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008056 grep -v '^ *+' conftest.er1 >conftest.err
8057 rm -f conftest.er1
8058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 (exit $ac_status); } && {
8061 test -z "$ac_c_werror_flag" ||
8062 test ! -s conftest.err
8063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008064 ac_hi=$ac_mid; break
8065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008067sed 's/^/| /' conftest.$ac_ext >&5
8068
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 ac_lo=`expr $ac_mid + 1`
8070 if test $ac_lo -le $ac_mid; then
8071 ac_lo= ac_hi=
8072 break
8073 fi
8074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008076
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 done
8079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008081sed 's/^/| /' conftest.$ac_ext >&5
8082
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008084/* confdefs.h. */
8085_ACEOF
8086cat confdefs.h >>conftest.$ac_ext
8087cat >>conftest.$ac_ext <<_ACEOF
8088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008089$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008090 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008091int
8092main ()
8093{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008095test_array [0] = 0
8096
8097 ;
8098 return 0;
8099}
8100_ACEOF
8101rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102if { (ac_try="$ac_compile"
8103case "(($ac_try" in
8104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8105 *) ac_try_echo=$ac_try;;
8106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008110 grep -v '^ *+' conftest.er1 >conftest.err
8111 rm -f conftest.er1
8112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008114 (exit $ac_status); } && {
8115 test -z "$ac_c_werror_flag" ||
8116 test ! -s conftest.err
8117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 ac_hi=-1 ac_mid=-1
8119 while :; do
8120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008121/* confdefs.h. */
8122_ACEOF
8123cat confdefs.h >>conftest.$ac_ext
8124cat >>conftest.$ac_ext <<_ACEOF
8125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008126$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008128int
8129main ()
8130{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008131static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008132test_array [0] = 0
8133
8134 ;
8135 return 0;
8136}
8137_ACEOF
8138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008139if { (ac_try="$ac_compile"
8140case "(($ac_try" in
8141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8142 *) ac_try_echo=$ac_try;;
8143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008147 grep -v '^ *+' conftest.er1 >conftest.err
8148 rm -f conftest.er1
8149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 (exit $ac_status); } && {
8152 test -z "$ac_c_werror_flag" ||
8153 test ! -s conftest.err
8154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_lo=$ac_mid; break
8156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008158sed 's/^/| /' conftest.$ac_ext >&5
8159
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160 ac_hi=`expr '(' $ac_mid ')' - 1`
8161 if test $ac_mid -le $ac_hi; then
8162 ac_lo= ac_hi=
8163 break
8164 fi
8165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167
8168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 done
8170else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008172sed 's/^/| /' conftest.$ac_ext >&5
8173
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008181# Binary search between lo and hi bounds.
8182while test "x$ac_lo" != "x$ac_hi"; do
8183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008190$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008191 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008196test_array [0] = 0
8197
8198 ;
8199 return 0;
8200}
8201_ACEOF
8202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008203if { (ac_try="$ac_compile"
8204case "(($ac_try" in
8205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8206 *) ac_try_echo=$ac_try;;
8207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008211 grep -v '^ *+' conftest.er1 >conftest.err
8212 rm -f conftest.er1
8213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 (exit $ac_status); } && {
8216 test -z "$ac_c_werror_flag" ||
8217 test ! -s conftest.err
8218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 ac_hi=$ac_mid
8220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008226
8227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008228done
8229case $ac_lo in
8230?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008232 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008233See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008234echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008236 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 else
8238 ac_cv_sizeof_long=0
8239 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008240esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241else
Martin v. Löwis11437992002-04-12 09:54:03 +00008242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008249 typedef long ac__type_sizeof_;
8250static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8251static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008252#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008253#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008256{
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
8258 FILE *f = fopen ("conftest.val", "w");
8259 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008261 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008264 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008267 }
8268 else
8269 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008271 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
8277 ;
8278 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008279}
Martin v. Löwis11437992002-04-12 09:54:03 +00008280_ACEOF
8281rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008282if { (ac_try="$ac_link"
8283case "(($ac_try" in
8284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8285 *) ac_try_echo=$ac_try;;
8286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292 { (case "(($ac_try" in
8293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8294 *) ac_try_echo=$ac_try;;
8295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 (exit $ac_status); }; }; then
8301 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008303 echo "$as_me: program exited with status $ac_status" >&5
8304echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008305sed 's/^/| /' conftest.$ac_ext >&5
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008309 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008310See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008311echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314 else
8315 ac_cv_sizeof_long=0
8316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318rm -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 +00008319fi
8320rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008322{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8323echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008324
8325
8326
Martin v. Löwis11437992002-04-12 09:54:03 +00008327cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008328#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330
8331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008332{ echo "$as_me:$LINENO: checking for void *" >&5
8333echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8334if test "${ac_cv_type_void_p+set}" = set; then
8335 echo $ECHO_N "(cached) $ECHO_C" >&6
8336else
8337 cat >conftest.$ac_ext <<_ACEOF
8338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
8343$ac_includes_default
8344typedef void * ac__type_new_;
8345int
8346main ()
8347{
8348if ((ac__type_new_ *) 0)
8349 return 0;
8350if (sizeof (ac__type_new_))
8351 return 0;
8352 ;
8353 return 0;
8354}
8355_ACEOF
8356rm -f conftest.$ac_objext
8357if { (ac_try="$ac_compile"
8358case "(($ac_try" in
8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8360 *) ac_try_echo=$ac_try;;
8361esac
8362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8363 (eval "$ac_compile") 2>conftest.er1
8364 ac_status=$?
8365 grep -v '^ *+' conftest.er1 >conftest.err
8366 rm -f conftest.er1
8367 cat conftest.err >&5
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); } && {
8370 test -z "$ac_c_werror_flag" ||
8371 test ! -s conftest.err
8372 } && test -s conftest.$ac_objext; then
8373 ac_cv_type_void_p=yes
8374else
8375 echo "$as_me: failed program was:" >&5
8376sed 's/^/| /' conftest.$ac_ext >&5
8377
8378 ac_cv_type_void_p=no
8379fi
8380
8381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8382fi
8383{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8384echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8385
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386# The cast to long int works around a bug in the HP C Compiler
8387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8389# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008390{ echo "$as_me:$LINENO: checking size of void *" >&5
8391echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008392if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008393 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395 if test "$cross_compiling" = yes; then
8396 # Depending upon the size, compute the lo and hi bounds.
8397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008398/* confdefs.h. */
8399_ACEOF
8400cat confdefs.h >>conftest.$ac_ext
8401cat >>conftest.$ac_ext <<_ACEOF
8402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008403$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
8407{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008409test_array [0] = 0
8410
8411 ;
8412 return 0;
8413}
8414_ACEOF
8415rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008416if { (ac_try="$ac_compile"
8417case "(($ac_try" in
8418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8419 *) ac_try_echo=$ac_try;;
8420esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 grep -v '^ *+' conftest.er1 >conftest.err
8425 rm -f conftest.er1
8426 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 (exit $ac_status); } && {
8429 test -z "$ac_c_werror_flag" ||
8430 test ! -s conftest.err
8431 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008432 ac_lo=0 ac_mid=0
8433 while :; do
8434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* confdefs.h. */
8436_ACEOF
8437cat confdefs.h >>conftest.$ac_ext
8438cat >>conftest.$ac_ext <<_ACEOF
8439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008440$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008441 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008442int
8443main ()
8444{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008445static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008446test_array [0] = 0
8447
8448 ;
8449 return 0;
8450}
8451_ACEOF
8452rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008453if { (ac_try="$ac_compile"
8454case "(($ac_try" in
8455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8456 *) ac_try_echo=$ac_try;;
8457esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008459 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008461 grep -v '^ *+' conftest.er1 >conftest.err
8462 rm -f conftest.er1
8463 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 (exit $ac_status); } && {
8466 test -z "$ac_c_werror_flag" ||
8467 test ! -s conftest.err
8468 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 ac_hi=$ac_mid; break
8470else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008472sed 's/^/| /' conftest.$ac_ext >&5
8473
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 ac_lo=`expr $ac_mid + 1`
8475 if test $ac_lo -le $ac_mid; then
8476 ac_lo= ac_hi=
8477 break
8478 fi
8479 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008481
8482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 done
8484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008486sed 's/^/| /' conftest.$ac_ext >&5
8487
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008489/* confdefs.h. */
8490_ACEOF
8491cat confdefs.h >>conftest.$ac_ext
8492cat >>conftest.$ac_ext <<_ACEOF
8493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008494$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008495 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008496int
8497main ()
8498{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008500test_array [0] = 0
8501
8502 ;
8503 return 0;
8504}
8505_ACEOF
8506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008507if { (ac_try="$ac_compile"
8508case "(($ac_try" in
8509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8510 *) ac_try_echo=$ac_try;;
8511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008515 grep -v '^ *+' conftest.er1 >conftest.err
8516 rm -f conftest.er1
8517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519 (exit $ac_status); } && {
8520 test -z "$ac_c_werror_flag" ||
8521 test ! -s conftest.err
8522 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_hi=-1 ac_mid=-1
8524 while :; do
8525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* confdefs.h. */
8527_ACEOF
8528cat confdefs.h >>conftest.$ac_ext
8529cat >>conftest.$ac_ext <<_ACEOF
8530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008533int
8534main ()
8535{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008537test_array [0] = 0
8538
8539 ;
8540 return 0;
8541}
8542_ACEOF
8543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544if { (ac_try="$ac_compile"
8545case "(($ac_try" in
8546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8547 *) ac_try_echo=$ac_try;;
8548esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008552 grep -v '^ *+' conftest.er1 >conftest.err
8553 rm -f conftest.er1
8554 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 (exit $ac_status); } && {
8557 test -z "$ac_c_werror_flag" ||
8558 test ! -s conftest.err
8559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_lo=$ac_mid; break
8561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008563sed 's/^/| /' conftest.$ac_ext >&5
8564
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565 ac_hi=`expr '(' $ac_mid ')' - 1`
8566 if test $ac_mid -le $ac_hi; then
8567 ac_lo= ac_hi=
8568 break
8569 fi
8570 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572
8573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 done
8575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008584
8585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008586# Binary search between lo and hi bounds.
8587while test "x$ac_lo" != "x$ac_hi"; do
8588 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008590/* confdefs.h. */
8591_ACEOF
8592cat confdefs.h >>conftest.$ac_ext
8593cat >>conftest.$ac_ext <<_ACEOF
8594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008596 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
8599{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008601test_array [0] = 0
8602
8603 ;
8604 return 0;
8605}
8606_ACEOF
8607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008608if { (ac_try="$ac_compile"
8609case "(($ac_try" in
8610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8611 *) ac_try_echo=$ac_try;;
8612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008616 grep -v '^ *+' conftest.er1 >conftest.err
8617 rm -f conftest.er1
8618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 (exit $ac_status); } && {
8621 test -z "$ac_c_werror_flag" ||
8622 test ! -s conftest.err
8623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ac_hi=$ac_mid
8625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008627sed 's/^/| /' conftest.$ac_ext >&5
8628
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633done
8634case $ac_lo in
8635?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008637 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008638See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008639echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008641 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 else
8643 ac_cv_sizeof_void_p=0
8644 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008645esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008646else
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008654 typedef void * ac__type_sizeof_;
8655static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8656static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008657#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008658#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008661{
Martin v. Löwis11437992002-04-12 09:54:03 +00008662
8663 FILE *f = fopen ("conftest.val", "w");
8664 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008666 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008669 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 }
8673 else
8674 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008676 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008680 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008681
8682 ;
8683 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008684}
Martin v. Löwis11437992002-04-12 09:54:03 +00008685_ACEOF
8686rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008687if { (ac_try="$ac_link"
8688case "(($ac_try" in
8689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8690 *) ac_try_echo=$ac_try;;
8691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697 { (case "(($ac_try" in
8698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8699 *) ac_try_echo=$ac_try;;
8700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 (exit $ac_status); }; }; then
8706 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008707else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008708 echo "$as_me: program exited with status $ac_status" >&5
8709echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008710sed 's/^/| /' conftest.$ac_ext >&5
8711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008714 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008715See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008716echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 else
8720 ac_cv_sizeof_void_p=0
8721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723rm -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 +00008724fi
8725rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008726fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008727{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8728echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008729
8730
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008733#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008734_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735
8736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008737{ echo "$as_me:$LINENO: checking for short" >&5
8738echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8739if test "${ac_cv_type_short+set}" = set; then
8740 echo $ECHO_N "(cached) $ECHO_C" >&6
8741else
8742 cat >conftest.$ac_ext <<_ACEOF
8743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
8748$ac_includes_default
8749typedef short ac__type_new_;
8750int
8751main ()
8752{
8753if ((ac__type_new_ *) 0)
8754 return 0;
8755if (sizeof (ac__type_new_))
8756 return 0;
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761rm -f conftest.$ac_objext
8762if { (ac_try="$ac_compile"
8763case "(($ac_try" in
8764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8765 *) ac_try_echo=$ac_try;;
8766esac
8767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8768 (eval "$ac_compile") 2>conftest.er1
8769 ac_status=$?
8770 grep -v '^ *+' conftest.er1 >conftest.err
8771 rm -f conftest.er1
8772 cat conftest.err >&5
8773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774 (exit $ac_status); } && {
8775 test -z "$ac_c_werror_flag" ||
8776 test ! -s conftest.err
8777 } && test -s conftest.$ac_objext; then
8778 ac_cv_type_short=yes
8779else
8780 echo "$as_me: failed program was:" >&5
8781sed 's/^/| /' conftest.$ac_ext >&5
8782
8783 ac_cv_type_short=no
8784fi
8785
8786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8787fi
8788{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8789echo "${ECHO_T}$ac_cv_type_short" >&6; }
8790
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791# The cast to long int works around a bug in the HP C Compiler
8792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8794# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008795{ echo "$as_me:$LINENO: checking size of short" >&5
8796echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 if test "$cross_compiling" = yes; then
8801 # Depending upon the size, compute the lo and hi bounds.
8802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* confdefs.h. */
8804_ACEOF
8805cat confdefs.h >>conftest.$ac_ext
8806cat >>conftest.$ac_ext <<_ACEOF
8807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
8812{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008814test_array [0] = 0
8815
8816 ;
8817 return 0;
8818}
8819_ACEOF
8820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008821if { (ac_try="$ac_compile"
8822case "(($ac_try" in
8823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8824 *) ac_try_echo=$ac_try;;
8825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008829 grep -v '^ *+' conftest.er1 >conftest.err
8830 rm -f conftest.er1
8831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 (exit $ac_status); } && {
8834 test -z "$ac_c_werror_flag" ||
8835 test ! -s conftest.err
8836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_lo=0 ac_mid=0
8838 while :; do
8839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* confdefs.h. */
8841_ACEOF
8842cat confdefs.h >>conftest.$ac_ext
8843cat >>conftest.$ac_ext <<_ACEOF
8844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008846 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008851test_array [0] = 0
8852
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008858if { (ac_try="$ac_compile"
8859case "(($ac_try" in
8860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8861 *) ac_try_echo=$ac_try;;
8862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008864 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008866 grep -v '^ *+' conftest.er1 >conftest.err
8867 rm -f conftest.er1
8868 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 (exit $ac_status); } && {
8871 test -z "$ac_c_werror_flag" ||
8872 test ! -s conftest.err
8873 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_hi=$ac_mid; break
8875else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008877sed 's/^/| /' conftest.$ac_ext >&5
8878
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 ac_lo=`expr $ac_mid + 1`
8880 if test $ac_lo -le $ac_mid; then
8881 ac_lo= ac_hi=
8882 break
8883 fi
8884 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886
8887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 done
8889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008891sed 's/^/| /' conftest.$ac_ext >&5
8892
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* confdefs.h. */
8895_ACEOF
8896cat confdefs.h >>conftest.$ac_ext
8897cat >>conftest.$ac_ext <<_ACEOF
8898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008899$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008900 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008905test_array [0] = 0
8906
8907 ;
8908 return 0;
8909}
8910_ACEOF
8911rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008912if { (ac_try="$ac_compile"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008920 grep -v '^ *+' conftest.er1 >conftest.err
8921 rm -f conftest.er1
8922 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008924 (exit $ac_status); } && {
8925 test -z "$ac_c_werror_flag" ||
8926 test ! -s conftest.err
8927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ac_hi=-1 ac_mid=-1
8929 while :; do
8930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* confdefs.h. */
8932_ACEOF
8933cat confdefs.h >>conftest.$ac_ext
8934cat >>conftest.$ac_ext <<_ACEOF
8935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008936$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008938int
8939main ()
8940{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008942test_array [0] = 0
8943
8944 ;
8945 return 0;
8946}
8947_ACEOF
8948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949if { (ac_try="$ac_compile"
8950case "(($ac_try" in
8951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8952 *) ac_try_echo=$ac_try;;
8953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 (exit $ac_status); } && {
8962 test -z "$ac_c_werror_flag" ||
8963 test ! -s conftest.err
8964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ac_lo=$ac_mid; break
8966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008968sed 's/^/| /' conftest.$ac_ext >&5
8969
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970 ac_hi=`expr '(' $ac_mid ')' - 1`
8971 if test $ac_mid -le $ac_hi; then
8972 ac_lo= ac_hi=
8973 break
8974 fi
8975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 done
8980else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008982sed 's/^/| /' conftest.$ac_ext >&5
8983
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989
8990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991# Binary search between lo and hi bounds.
8992while test "x$ac_lo" != "x$ac_hi"; do
8993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* confdefs.h. */
8996_ACEOF
8997cat confdefs.h >>conftest.$ac_ext
8998cat >>conftest.$ac_ext <<_ACEOF
8999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009001 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009006test_array [0] = 0
9007
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013if { (ac_try="$ac_compile"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_hi=$ac_mid
9030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009032sed 's/^/| /' conftest.$ac_ext >&5
9033
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036
9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009038done
9039case $ac_lo in
9040?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009042 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009043See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009044echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009046 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 else
9048 ac_cv_sizeof_short=0
9049 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009050esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009051else
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* confdefs.h. */
9054_ACEOF
9055cat confdefs.h >>conftest.$ac_ext
9056cat >>conftest.$ac_ext <<_ACEOF
9057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009059 typedef short ac__type_sizeof_;
9060static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9061static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009062#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009063#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009066{
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
9068 FILE *f = fopen ("conftest.val", "w");
9069 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009071 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009074 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 }
9078 else
9079 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009081 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009085 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086
9087 ;
9088 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009089}
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
9091rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092if { (ac_try="$ac_link"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102 { (case "(($ac_try" in
9103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9104 *) ac_try_echo=$ac_try;;
9105esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 (exit $ac_status); }; }; then
9111 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009113 echo "$as_me: program exited with status $ac_status" >&5
9114echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009115sed 's/^/| /' conftest.$ac_ext >&5
9116
Martin v. Löwis11437992002-04-12 09:54:03 +00009117( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009120See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009121echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124 else
9125 ac_cv_sizeof_short=0
9126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128rm -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 +00009129fi
9130rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009132{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9133echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009134
9135
9136
Martin v. Löwis11437992002-04-12 09:54:03 +00009137cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009138#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009139_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140
9141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009142{ echo "$as_me:$LINENO: checking for float" >&5
9143echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9144if test "${ac_cv_type_float+set}" = set; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146else
9147 cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
9153$ac_includes_default
9154typedef float ac__type_new_;
9155int
9156main ()
9157{
9158if ((ac__type_new_ *) 0)
9159 return 0;
9160if (sizeof (ac__type_new_))
9161 return 0;
9162 ;
9163 return 0;
9164}
9165_ACEOF
9166rm -f conftest.$ac_objext
9167if { (ac_try="$ac_compile"
9168case "(($ac_try" in
9169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9170 *) ac_try_echo=$ac_try;;
9171esac
9172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9173 (eval "$ac_compile") 2>conftest.er1
9174 ac_status=$?
9175 grep -v '^ *+' conftest.er1 >conftest.err
9176 rm -f conftest.er1
9177 cat conftest.err >&5
9178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9179 (exit $ac_status); } && {
9180 test -z "$ac_c_werror_flag" ||
9181 test ! -s conftest.err
9182 } && test -s conftest.$ac_objext; then
9183 ac_cv_type_float=yes
9184else
9185 echo "$as_me: failed program was:" >&5
9186sed 's/^/| /' conftest.$ac_ext >&5
9187
9188 ac_cv_type_float=no
9189fi
9190
9191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9192fi
9193{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9194echo "${ECHO_T}$ac_cv_type_float" >&6; }
9195
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196# The cast to long int works around a bug in the HP C Compiler
9197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9199# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009200{ echo "$as_me:$LINENO: checking size of float" >&5
9201echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009204else
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 if test "$cross_compiling" = yes; then
9206 # Depending upon the size, compute the lo and hi bounds.
9207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009208/* confdefs.h. */
9209_ACEOF
9210cat confdefs.h >>conftest.$ac_ext
9211cat >>conftest.$ac_ext <<_ACEOF
9212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009213$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009215int
9216main ()
9217{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009218static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009219test_array [0] = 0
9220
9221 ;
9222 return 0;
9223}
9224_ACEOF
9225rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226if { (ac_try="$ac_compile"
9227case "(($ac_try" in
9228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9229 *) ac_try_echo=$ac_try;;
9230esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009234 grep -v '^ *+' conftest.er1 >conftest.err
9235 rm -f conftest.er1
9236 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238 (exit $ac_status); } && {
9239 test -z "$ac_c_werror_flag" ||
9240 test ! -s conftest.err
9241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009242 ac_lo=0 ac_mid=0
9243 while :; do
9244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009251 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009252int
9253main ()
9254{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009255static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009256test_array [0] = 0
9257
9258 ;
9259 return 0;
9260}
9261_ACEOF
9262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 ac_hi=$ac_mid; break
9280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009282sed 's/^/| /' conftest.$ac_ext >&5
9283
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 ac_lo=`expr $ac_mid + 1`
9285 if test $ac_lo -le $ac_mid; then
9286 ac_lo= ac_hi=
9287 break
9288 fi
9289 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 done
9294else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* confdefs.h. */
9300_ACEOF
9301cat confdefs.h >>conftest.$ac_ext
9302cat >>conftest.$ac_ext <<_ACEOF
9303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009304$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009305 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009306int
9307main ()
9308{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009310test_array [0] = 0
9311
9312 ;
9313 return 0;
9314}
9315_ACEOF
9316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009317if { (ac_try="$ac_compile"
9318case "(($ac_try" in
9319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9320 *) ac_try_echo=$ac_try;;
9321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009325 grep -v '^ *+' conftest.er1 >conftest.err
9326 rm -f conftest.er1
9327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329 (exit $ac_status); } && {
9330 test -z "$ac_c_werror_flag" ||
9331 test ! -s conftest.err
9332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_hi=-1 ac_mid=-1
9334 while :; do
9335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009336/* confdefs.h. */
9337_ACEOF
9338cat confdefs.h >>conftest.$ac_ext
9339cat >>conftest.$ac_ext <<_ACEOF
9340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009341$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009343int
9344main ()
9345{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009347test_array [0] = 0
9348
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354if { (ac_try="$ac_compile"
9355case "(($ac_try" in
9356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9357 *) ac_try_echo=$ac_try;;
9358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009362 grep -v '^ *+' conftest.er1 >conftest.err
9363 rm -f conftest.er1
9364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 (exit $ac_status); } && {
9367 test -z "$ac_c_werror_flag" ||
9368 test ! -s conftest.err
9369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_lo=$ac_mid; break
9371else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009373sed 's/^/| /' conftest.$ac_ext >&5
9374
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375 ac_hi=`expr '(' $ac_mid ')' - 1`
9376 if test $ac_mid -le $ac_hi; then
9377 ac_lo= ac_hi=
9378 break
9379 fi
9380 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382
9383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 done
9385else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009387sed 's/^/| /' conftest.$ac_ext >&5
9388
Martin v. Löwiseba40652007-08-30 20:10:57 +00009389 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009394
9395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009396# Binary search between lo and hi bounds.
9397while test "x$ac_lo" != "x$ac_hi"; do
9398 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009400/* confdefs.h. */
9401_ACEOF
9402cat confdefs.h >>conftest.$ac_ext
9403cat >>conftest.$ac_ext <<_ACEOF
9404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009405$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009406 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
9409{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009411test_array [0] = 0
9412
9413 ;
9414 return 0;
9415}
9416_ACEOF
9417rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009418if { (ac_try="$ac_compile"
9419case "(($ac_try" in
9420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9421 *) ac_try_echo=$ac_try;;
9422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009426 grep -v '^ *+' conftest.er1 >conftest.err
9427 rm -f conftest.er1
9428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 (exit $ac_status); } && {
9431 test -z "$ac_c_werror_flag" ||
9432 test ! -s conftest.err
9433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_hi=$ac_mid
9435else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009437sed 's/^/| /' conftest.$ac_ext >&5
9438
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441
9442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009443done
9444case $ac_lo in
9445?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009447 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009448See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009449echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009451 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 else
9453 ac_cv_sizeof_float=0
9454 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009455esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009456else
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009464 typedef float ac__type_sizeof_;
9465static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9466static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009467#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009468#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009471{
Martin v. Löwis11437992002-04-12 09:54:03 +00009472
9473 FILE *f = fopen ("conftest.val", "w");
9474 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009476 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009482 }
9483 else
9484 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009486 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009489 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
9492 ;
9493 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009494}
Martin v. Löwis11437992002-04-12 09:54:03 +00009495_ACEOF
9496rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009497if { (ac_try="$ac_link"
9498case "(($ac_try" in
9499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9500 *) ac_try_echo=$ac_try;;
9501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507 { (case "(($ac_try" in
9508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9509 *) ac_try_echo=$ac_try;;
9510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 (exit $ac_status); }; }; then
9516 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009518 echo "$as_me: program exited with status $ac_status" >&5
9519echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009520sed 's/^/| /' conftest.$ac_ext >&5
9521
Martin v. Löwis11437992002-04-12 09:54:03 +00009522( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009524 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009525See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009526echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529 else
9530 ac_cv_sizeof_float=0
9531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533rm -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 +00009534fi
9535rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009537{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9538echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009539
9540
9541
Martin v. Löwis11437992002-04-12 09:54:03 +00009542cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009543#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009544_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545
9546
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009547{ echo "$as_me:$LINENO: checking for double" >&5
9548echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9549if test "${ac_cv_type_double+set}" = set; then
9550 echo $ECHO_N "(cached) $ECHO_C" >&6
9551else
9552 cat >conftest.$ac_ext <<_ACEOF
9553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
9558$ac_includes_default
9559typedef double ac__type_new_;
9560int
9561main ()
9562{
9563if ((ac__type_new_ *) 0)
9564 return 0;
9565if (sizeof (ac__type_new_))
9566 return 0;
9567 ;
9568 return 0;
9569}
9570_ACEOF
9571rm -f conftest.$ac_objext
9572if { (ac_try="$ac_compile"
9573case "(($ac_try" in
9574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575 *) ac_try_echo=$ac_try;;
9576esac
9577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578 (eval "$ac_compile") 2>conftest.er1
9579 ac_status=$?
9580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9584 (exit $ac_status); } && {
9585 test -z "$ac_c_werror_flag" ||
9586 test ! -s conftest.err
9587 } && test -s conftest.$ac_objext; then
9588 ac_cv_type_double=yes
9589else
9590 echo "$as_me: failed program was:" >&5
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
9593 ac_cv_type_double=no
9594fi
9595
9596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597fi
9598{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9599echo "${ECHO_T}$ac_cv_type_double" >&6; }
9600
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601# The cast to long int works around a bug in the HP C Compiler
9602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9604# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009605{ echo "$as_me:$LINENO: checking size of double" >&5
9606echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009607if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009609else
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 if test "$cross_compiling" = yes; then
9611 # Depending upon the size, compute the lo and hi bounds.
9612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009613/* confdefs.h. */
9614_ACEOF
9615cat confdefs.h >>conftest.$ac_ext
9616cat >>conftest.$ac_ext <<_ACEOF
9617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009620int
9621main ()
9622{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009624test_array [0] = 0
9625
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631if { (ac_try="$ac_compile"
9632case "(($ac_try" in
9633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9634 *) ac_try_echo=$ac_try;;
9635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009639 grep -v '^ *+' conftest.er1 >conftest.err
9640 rm -f conftest.er1
9641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643 (exit $ac_status); } && {
9644 test -z "$ac_c_werror_flag" ||
9645 test ! -s conftest.err
9646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_lo=0 ac_mid=0
9648 while :; do
9649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* confdefs.h. */
9651_ACEOF
9652cat confdefs.h >>conftest.$ac_ext
9653cat >>conftest.$ac_ext <<_ACEOF
9654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009656 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009657int
9658main ()
9659{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009661test_array [0] = 0
9662
9663 ;
9664 return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009676 grep -v '^ *+' conftest.er1 >conftest.err
9677 rm -f conftest.er1
9678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 (exit $ac_status); } && {
9681 test -z "$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 ac_hi=$ac_mid; break
9685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009687sed 's/^/| /' conftest.$ac_ext >&5
9688
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 ac_lo=`expr $ac_mid + 1`
9690 if test $ac_lo -le $ac_mid; then
9691 ac_lo= ac_hi=
9692 break
9693 fi
9694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009696
9697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 done
9699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009701sed 's/^/| /' conftest.$ac_ext >&5
9702
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* confdefs.h. */
9705_ACEOF
9706cat confdefs.h >>conftest.$ac_ext
9707cat >>conftest.$ac_ext <<_ACEOF
9708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009710 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009715test_array [0] = 0
9716
9717 ;
9718 return 0;
9719}
9720_ACEOF
9721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009722if { (ac_try="$ac_compile"
9723case "(($ac_try" in
9724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9725 *) ac_try_echo=$ac_try;;
9726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009730 grep -v '^ *+' conftest.er1 >conftest.err
9731 rm -f conftest.er1
9732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009734 (exit $ac_status); } && {
9735 test -z "$ac_c_werror_flag" ||
9736 test ! -s conftest.err
9737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_hi=-1 ac_mid=-1
9739 while :; do
9740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* confdefs.h. */
9742_ACEOF
9743cat confdefs.h >>conftest.$ac_ext
9744cat >>conftest.$ac_ext <<_ACEOF
9745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009746$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009752test_array [0] = 0
9753
9754 ;
9755 return 0;
9756}
9757_ACEOF
9758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759if { (ac_try="$ac_compile"
9760case "(($ac_try" in
9761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9762 *) ac_try_echo=$ac_try;;
9763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009767 grep -v '^ *+' conftest.er1 >conftest.err
9768 rm -f conftest.er1
9769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 (exit $ac_status); } && {
9772 test -z "$ac_c_werror_flag" ||
9773 test ! -s conftest.err
9774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_lo=$ac_mid; break
9776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009778sed 's/^/| /' conftest.$ac_ext >&5
9779
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780 ac_hi=`expr '(' $ac_mid ')' - 1`
9781 if test $ac_mid -le $ac_hi; then
9782 ac_lo= ac_hi=
9783 break
9784 fi
9785 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787
9788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 done
9790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009792sed 's/^/| /' conftest.$ac_ext >&5
9793
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009799
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801# Binary search between lo and hi bounds.
9802while test "x$ac_lo" != "x$ac_hi"; do
9803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009805/* confdefs.h. */
9806_ACEOF
9807cat confdefs.h >>conftest.$ac_ext
9808cat >>conftest.$ac_ext <<_ACEOF
9809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009810$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009811 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
9814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009816test_array [0] = 0
9817
9818 ;
9819 return 0;
9820}
9821_ACEOF
9822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823if { (ac_try="$ac_compile"
9824case "(($ac_try" in
9825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9826 *) ac_try_echo=$ac_try;;
9827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009831 grep -v '^ *+' conftest.er1 >conftest.err
9832 rm -f conftest.er1
9833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 (exit $ac_status); } && {
9836 test -z "$ac_c_werror_flag" ||
9837 test ! -s conftest.err
9838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ac_hi=$ac_mid
9840else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009842sed 's/^/| /' conftest.$ac_ext >&5
9843
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009846
9847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848done
9849case $ac_lo in
9850?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009853See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009854echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009856 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 else
9858 ac_cv_sizeof_double=0
9859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009860esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009861else
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009863/* confdefs.h. */
9864_ACEOF
9865cat confdefs.h >>conftest.$ac_ext
9866cat >>conftest.$ac_ext <<_ACEOF
9867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009868$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009869 typedef double ac__type_sizeof_;
9870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009874int
9875main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009876{
Martin v. Löwis11437992002-04-12 09:54:03 +00009877
9878 FILE *f = fopen ("conftest.val", "w");
9879 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 }
9888 else
9889 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009896
9897 ;
9898 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009899}
Martin v. Löwis11437992002-04-12 09:54:03 +00009900_ACEOF
9901rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009902if { (ac_try="$ac_link"
9903case "(($ac_try" in
9904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905 *) ac_try_echo=$ac_try;;
9906esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912 { (case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;;
9915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 (exit $ac_status); }; }; then
9921 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009923 echo "$as_me: program exited with status $ac_status" >&5
9924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009925sed 's/^/| /' conftest.$ac_ext >&5
9926
Martin v. Löwis11437992002-04-12 09:54:03 +00009927( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009930See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009931echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 else
9935 ac_cv_sizeof_double=0
9936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938rm -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 +00009939fi
9940rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9943echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944
9945
9946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009948#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009949_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950
9951
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009952{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9953echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9954if test "${ac_cv_type_fpos_t+set}" = set; then
9955 echo $ECHO_N "(cached) $ECHO_C" >&6
9956else
9957 cat >conftest.$ac_ext <<_ACEOF
9958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
9963$ac_includes_default
9964typedef fpos_t ac__type_new_;
9965int
9966main ()
9967{
9968if ((ac__type_new_ *) 0)
9969 return 0;
9970if (sizeof (ac__type_new_))
9971 return 0;
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext
9977if { (ac_try="$ac_compile"
9978case "(($ac_try" in
9979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9980 *) ac_try_echo=$ac_try;;
9981esac
9982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9983 (eval "$ac_compile") 2>conftest.er1
9984 ac_status=$?
9985 grep -v '^ *+' conftest.er1 >conftest.err
9986 rm -f conftest.er1
9987 cat conftest.err >&5
9988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9989 (exit $ac_status); } && {
9990 test -z "$ac_c_werror_flag" ||
9991 test ! -s conftest.err
9992 } && test -s conftest.$ac_objext; then
9993 ac_cv_type_fpos_t=yes
9994else
9995 echo "$as_me: failed program was:" >&5
9996sed 's/^/| /' conftest.$ac_ext >&5
9997
9998 ac_cv_type_fpos_t=no
9999fi
10000
10001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10002fi
10003{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10004echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10005
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006# The cast to long int works around a bug in the HP C Compiler
10007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10009# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010010{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10011echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010012if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010014else
Martin v. Löwis11437992002-04-12 09:54:03 +000010015 if test "$cross_compiling" = yes; then
10016 # Depending upon the size, compute the lo and hi bounds.
10017cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010018/* confdefs.h. */
10019_ACEOF
10020cat confdefs.h >>conftest.$ac_ext
10021cat >>conftest.$ac_ext <<_ACEOF
10022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010023$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025int
10026main ()
10027{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010028static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010029test_array [0] = 0
10030
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010036if { (ac_try="$ac_compile"
10037case "(($ac_try" in
10038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10039 *) ac_try_echo=$ac_try;;
10040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010042 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010044 grep -v '^ *+' conftest.er1 >conftest.err
10045 rm -f conftest.er1
10046 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048 (exit $ac_status); } && {
10049 test -z "$ac_c_werror_flag" ||
10050 test ! -s conftest.err
10051 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 ac_lo=0 ac_mid=0
10053 while :; do
10054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010055/* confdefs.h. */
10056_ACEOF
10057cat confdefs.h >>conftest.$ac_ext
10058cat >>conftest.$ac_ext <<_ACEOF
10059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010060$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010061 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010062int
10063main ()
10064{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010066test_array [0] = 0
10067
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010081 grep -v '^ *+' conftest.er1 >conftest.err
10082 rm -f conftest.er1
10083 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 (exit $ac_status); } && {
10086 test -z "$ac_c_werror_flag" ||
10087 test ! -s conftest.err
10088 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010089 ac_hi=$ac_mid; break
10090else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010092sed 's/^/| /' conftest.$ac_ext >&5
10093
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 ac_lo=`expr $ac_mid + 1`
10095 if test $ac_lo -le $ac_mid; then
10096 ac_lo= ac_hi=
10097 break
10098 fi
10099 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010101
10102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 done
10104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010106sed 's/^/| /' conftest.$ac_ext >&5
10107
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* confdefs.h. */
10110_ACEOF
10111cat confdefs.h >>conftest.$ac_ext
10112cat >>conftest.$ac_ext <<_ACEOF
10113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010114$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010115 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010120test_array [0] = 0
10121
10122 ;
10123 return 0;
10124}
10125_ACEOF
10126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010127if { (ac_try="$ac_compile"
10128case "(($ac_try" in
10129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10130 *) ac_try_echo=$ac_try;;
10131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010135 grep -v '^ *+' conftest.er1 >conftest.err
10136 rm -f conftest.er1
10137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139 (exit $ac_status); } && {
10140 test -z "$ac_c_werror_flag" ||
10141 test ! -s conftest.err
10142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ac_hi=-1 ac_mid=-1
10144 while :; do
10145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010146/* confdefs.h. */
10147_ACEOF
10148cat confdefs.h >>conftest.$ac_ext
10149cat >>conftest.$ac_ext <<_ACEOF
10150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010151$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010157test_array [0] = 0
10158
10159 ;
10160 return 0;
10161}
10162_ACEOF
10163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164if { (ac_try="$ac_compile"
10165case "(($ac_try" in
10166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10167 *) ac_try_echo=$ac_try;;
10168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010172 grep -v '^ *+' conftest.er1 >conftest.err
10173 rm -f conftest.er1
10174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 (exit $ac_status); } && {
10177 test -z "$ac_c_werror_flag" ||
10178 test ! -s conftest.err
10179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_lo=$ac_mid; break
10181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010183sed 's/^/| /' conftest.$ac_ext >&5
10184
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185 ac_hi=`expr '(' $ac_mid ')' - 1`
10186 if test $ac_mid -le $ac_hi; then
10187 ac_lo= ac_hi=
10188 break
10189 fi
10190 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192
10193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 done
10195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010197sed 's/^/| /' conftest.$ac_ext >&5
10198
Martin v. Löwiseba40652007-08-30 20:10:57 +000010199 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201
10202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010204
10205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010206# Binary search between lo and hi bounds.
10207while test "x$ac_lo" != "x$ac_hi"; do
10208 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10209 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010210/* confdefs.h. */
10211_ACEOF
10212cat confdefs.h >>conftest.$ac_ext
10213cat >>conftest.$ac_ext <<_ACEOF
10214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010216 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
10219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010221test_array [0] = 0
10222
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228if { (ac_try="$ac_compile"
10229case "(($ac_try" in
10230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10231 *) ac_try_echo=$ac_try;;
10232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010236 grep -v '^ *+' conftest.er1 >conftest.err
10237 rm -f conftest.er1
10238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 (exit $ac_status); } && {
10241 test -z "$ac_c_werror_flag" ||
10242 test ! -s conftest.err
10243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_hi=$ac_mid
10245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010247sed 's/^/| /' conftest.$ac_ext >&5
10248
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010251
10252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010253done
10254case $ac_lo in
10255?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010258See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010259echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010261 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010262 else
10263 ac_cv_sizeof_fpos_t=0
10264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010265esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010266else
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010268/* confdefs.h. */
10269_ACEOF
10270cat confdefs.h >>conftest.$ac_ext
10271cat >>conftest.$ac_ext <<_ACEOF
10272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010273$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010274 typedef fpos_t ac__type_sizeof_;
10275static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10276static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010277#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010278#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010279int
10280main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010281{
Martin v. Löwis11437992002-04-12 09:54:03 +000010282
10283 FILE *f = fopen ("conftest.val", "w");
10284 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010286 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010289 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010290 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010292 }
10293 else
10294 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010296 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
10302 ;
10303 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010304}
Martin v. Löwis11437992002-04-12 09:54:03 +000010305_ACEOF
10306rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307if { (ac_try="$ac_link"
10308case "(($ac_try" in
10309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10310 *) ac_try_echo=$ac_try;;
10311esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317 { (case "(($ac_try" in
10318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10319 *) ac_try_echo=$ac_try;;
10320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010323 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 (exit $ac_status); }; }; then
10326 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010328 echo "$as_me: program exited with status $ac_status" >&5
10329echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010330sed 's/^/| /' conftest.$ac_ext >&5
10331
Martin v. Löwis11437992002-04-12 09:54:03 +000010332( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010334 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010335See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010336echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010339 else
10340 ac_cv_sizeof_fpos_t=0
10341 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343rm -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 +000010344fi
10345rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010347{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10348echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010349
10350
10351
Martin v. Löwis11437992002-04-12 09:54:03 +000010352cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010353#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010354_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355
Michael W. Hudson54241132001-12-07 15:38:26 +000010356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010357{ echo "$as_me:$LINENO: checking for size_t" >&5
10358echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10359if test "${ac_cv_type_size_t+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362 cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
10369typedef size_t ac__type_new_;
10370int
10371main ()
10372{
10373if ((ac__type_new_ *) 0)
10374 return 0;
10375if (sizeof (ac__type_new_))
10376 return 0;
10377 ;
10378 return 0;
10379}
10380_ACEOF
10381rm -f conftest.$ac_objext
10382if { (ac_try="$ac_compile"
10383case "(($ac_try" in
10384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10385 *) ac_try_echo=$ac_try;;
10386esac
10387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10388 (eval "$ac_compile") 2>conftest.er1
10389 ac_status=$?
10390 grep -v '^ *+' conftest.er1 >conftest.err
10391 rm -f conftest.er1
10392 cat conftest.err >&5
10393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10394 (exit $ac_status); } && {
10395 test -z "$ac_c_werror_flag" ||
10396 test ! -s conftest.err
10397 } && test -s conftest.$ac_objext; then
10398 ac_cv_type_size_t=yes
10399else
10400 echo "$as_me: failed program was:" >&5
10401sed 's/^/| /' conftest.$ac_ext >&5
10402
10403 ac_cv_type_size_t=no
10404fi
10405
10406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407fi
10408{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10409echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10410
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411# The cast to long int works around a bug in the HP C Compiler
10412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10414# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010415{ echo "$as_me:$LINENO: checking size of size_t" >&5
10416echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010420 if test "$cross_compiling" = yes; then
10421 # Depending upon the size, compute the lo and hi bounds.
10422cat >conftest.$ac_ext <<_ACEOF
10423/* confdefs.h. */
10424_ACEOF
10425cat confdefs.h >>conftest.$ac_ext
10426cat >>conftest.$ac_ext <<_ACEOF
10427/* end confdefs.h. */
10428$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430int
10431main ()
10432{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010433static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434test_array [0] = 0
10435
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441if { (ac_try="$ac_compile"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_status=$?
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010457 ac_lo=0 ac_mid=0
10458 while :; do
10459 cat >conftest.$ac_ext <<_ACEOF
10460/* confdefs.h. */
10461_ACEOF
10462cat confdefs.h >>conftest.$ac_ext
10463cat >>conftest.$ac_ext <<_ACEOF
10464/* end confdefs.h. */
10465$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010466 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010467int
10468main ()
10469{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010470static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471test_array [0] = 0
10472
10473 ;
10474 return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010478if { (ac_try="$ac_compile"
10479case "(($ac_try" in
10480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10481 *) ac_try_echo=$ac_try;;
10482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 ac_status=$?
10486 grep -v '^ *+' conftest.er1 >conftest.err
10487 rm -f conftest.er1
10488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010490 (exit $ac_status); } && {
10491 test -z "$ac_c_werror_flag" ||
10492 test ! -s conftest.err
10493 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010494 ac_hi=$ac_mid; break
10495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010496 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010497sed 's/^/| /' conftest.$ac_ext >&5
10498
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499 ac_lo=`expr $ac_mid + 1`
10500 if test $ac_lo -le $ac_mid; then
10501 ac_lo= ac_hi=
10502 break
10503 fi
10504 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010506
10507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 done
10509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010510 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511sed 's/^/| /' conftest.$ac_ext >&5
10512
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514/* confdefs.h. */
10515_ACEOF
10516cat confdefs.h >>conftest.$ac_ext
10517cat >>conftest.$ac_ext <<_ACEOF
10518/* end confdefs.h. */
10519$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010520 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521int
10522main ()
10523{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525test_array [0] = 0
10526
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010532if { (ac_try="$ac_compile"
10533case "(($ac_try" in
10534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10535 *) ac_try_echo=$ac_try;;
10536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_status=$?
10540 grep -v '^ *+' conftest.er1 >conftest.err
10541 rm -f conftest.er1
10542 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010544 (exit $ac_status); } && {
10545 test -z "$ac_c_werror_flag" ||
10546 test ! -s conftest.err
10547 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010548 ac_hi=-1 ac_mid=-1
10549 while :; do
10550 cat >conftest.$ac_ext <<_ACEOF
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
10556$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558int
10559main ()
10560{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562test_array [0] = 0
10563
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569if { (ac_try="$ac_compile"
10570case "(($ac_try" in
10571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10572 *) ac_try_echo=$ac_try;;
10573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_status=$?
10577 grep -v '^ *+' conftest.er1 >conftest.err
10578 rm -f conftest.er1
10579 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 (exit $ac_status); } && {
10582 test -z "$ac_c_werror_flag" ||
10583 test ! -s conftest.err
10584 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585 ac_lo=$ac_mid; break
10586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010587 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588sed 's/^/| /' conftest.$ac_ext >&5
10589
Martin v. Löwiseba40652007-08-30 20:10:57 +000010590 ac_hi=`expr '(' $ac_mid ')' - 1`
10591 if test $ac_mid -le $ac_hi; then
10592 ac_lo= ac_hi=
10593 break
10594 fi
10595 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597
10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 done
10600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010601 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602sed 's/^/| /' conftest.$ac_ext >&5
10603
Martin v. Löwiseba40652007-08-30 20:10:57 +000010604 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010609
10610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611# Binary search between lo and hi bounds.
10612while test "x$ac_lo" != "x$ac_hi"; do
10613 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10614 cat >conftest.$ac_ext <<_ACEOF
10615/* confdefs.h. */
10616_ACEOF
10617cat confdefs.h >>conftest.$ac_ext
10618cat >>conftest.$ac_ext <<_ACEOF
10619/* end confdefs.h. */
10620$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010621 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622int
10623main ()
10624{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626test_array [0] = 0
10627
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010633if { (ac_try="$ac_compile"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_status=$?
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649 ac_hi=$ac_mid
10650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010651 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656
10657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010658done
10659case $ac_lo in
10660?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010664echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010666 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010667 else
10668 ac_cv_sizeof_size_t=0
10669 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670esac
10671else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672 cat >conftest.$ac_ext <<_ACEOF
10673/* confdefs.h. */
10674_ACEOF
10675cat confdefs.h >>conftest.$ac_ext
10676cat >>conftest.$ac_ext <<_ACEOF
10677/* end confdefs.h. */
10678$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010679 typedef size_t ac__type_sizeof_;
10680static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10681static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682#include <stdio.h>
10683#include <stdlib.h>
10684int
10685main ()
10686{
10687
10688 FILE *f = fopen ("conftest.val", "w");
10689 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010690 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010691 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010694 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010695 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697 }
10698 else
10699 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010701 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706
10707 ;
10708 return 0;
10709}
10710_ACEOF
10711rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712if { (ac_try="$ac_link"
10713case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 { (case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 (exit $ac_status); }; }; then
10731 ac_cv_sizeof_size_t=`cat conftest.val`
10732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010733 echo "$as_me: program exited with status $ac_status" >&5
10734echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010739 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010741echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744 else
10745 ac_cv_sizeof_size_t=0
10746 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748rm -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 +000010749fi
10750rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010752{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10753echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010754
10755
10756
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757cat >>confdefs.h <<_ACEOF
10758#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10759_ACEOF
10760
10761
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010762{ echo "$as_me:$LINENO: checking for pid_t" >&5
10763echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10764if test "${ac_cv_type_pid_t+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10766else
10767 cat >conftest.$ac_ext <<_ACEOF
10768/* confdefs.h. */
10769_ACEOF
10770cat confdefs.h >>conftest.$ac_ext
10771cat >>conftest.$ac_ext <<_ACEOF
10772/* end confdefs.h. */
10773$ac_includes_default
10774typedef pid_t ac__type_new_;
10775int
10776main ()
10777{
10778if ((ac__type_new_ *) 0)
10779 return 0;
10780if (sizeof (ac__type_new_))
10781 return 0;
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext
10787if { (ac_try="$ac_compile"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793 (eval "$ac_compile") 2>conftest.er1
10794 ac_status=$?
10795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
10798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
10802 } && test -s conftest.$ac_objext; then
10803 ac_cv_type_pid_t=yes
10804else
10805 echo "$as_me: failed program was:" >&5
10806sed 's/^/| /' conftest.$ac_ext >&5
10807
10808 ac_cv_type_pid_t=no
10809fi
10810
10811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10812fi
10813{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10814echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10815
Christian Heimes951cc0f2008-01-31 23:08:23 +000010816# The cast to long int works around a bug in the HP C Compiler
10817# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10818# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10819# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010820{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10821echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010822if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010824else
10825 if test "$cross_compiling" = yes; then
10826 # Depending upon the size, compute the lo and hi bounds.
10827cat >conftest.$ac_ext <<_ACEOF
10828/* confdefs.h. */
10829_ACEOF
10830cat confdefs.h >>conftest.$ac_ext
10831cat >>conftest.$ac_ext <<_ACEOF
10832/* end confdefs.h. */
10833$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010835int
10836main ()
10837{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010838static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010839test_array [0] = 0
10840
10841 ;
10842 return 0;
10843}
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (ac_try="$ac_compile"
10847case "(($ac_try" in
10848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10849 *) ac_try_echo=$ac_try;;
10850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010852 (eval "$ac_compile") 2>conftest.er1
10853 ac_status=$?
10854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010858 (exit $ac_status); } && {
10859 test -z "$ac_c_werror_flag" ||
10860 test ! -s conftest.err
10861 } && test -s conftest.$ac_objext; then
10862 ac_lo=0 ac_mid=0
10863 while :; do
10864 cat >conftest.$ac_ext <<_ACEOF
10865/* confdefs.h. */
10866_ACEOF
10867cat confdefs.h >>conftest.$ac_ext
10868cat >>conftest.$ac_ext <<_ACEOF
10869/* end confdefs.h. */
10870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010871 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010872int
10873main ()
10874{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010876test_array [0] = 0
10877
10878 ;
10879 return 0;
10880}
10881_ACEOF
10882rm -f conftest.$ac_objext
10883if { (ac_try="$ac_compile"
10884case "(($ac_try" in
10885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10886 *) ac_try_echo=$ac_try;;
10887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010889 (eval "$ac_compile") 2>conftest.er1
10890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
10899 ac_hi=$ac_mid; break
10900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010901 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010902sed 's/^/| /' conftest.$ac_ext >&5
10903
10904 ac_lo=`expr $ac_mid + 1`
10905 if test $ac_lo -le $ac_mid; then
10906 ac_lo= ac_hi=
10907 break
10908 fi
10909 ac_mid=`expr 2 '*' $ac_mid + 1`
10910fi
10911
10912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10913 done
10914else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010915 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 cat >conftest.$ac_ext <<_ACEOF
10919/* confdefs.h. */
10920_ACEOF
10921cat confdefs.h >>conftest.$ac_ext
10922cat >>conftest.$ac_ext <<_ACEOF
10923/* end confdefs.h. */
10924$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010925 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010926int
10927main ()
10928{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930test_array [0] = 0
10931
10932 ;
10933 return 0;
10934}
10935_ACEOF
10936rm -f conftest.$ac_objext
10937if { (ac_try="$ac_compile"
10938case "(($ac_try" in
10939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10940 *) ac_try_echo=$ac_try;;
10941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010943 (eval "$ac_compile") 2>conftest.er1
10944 ac_status=$?
10945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010949 (exit $ac_status); } && {
10950 test -z "$ac_c_werror_flag" ||
10951 test ! -s conftest.err
10952 } && test -s conftest.$ac_objext; then
10953 ac_hi=-1 ac_mid=-1
10954 while :; do
10955 cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h. */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
10960/* end confdefs.h. */
10961$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963int
10964main ()
10965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967test_array [0] = 0
10968
10969 ;
10970 return 0;
10971}
10972_ACEOF
10973rm -f conftest.$ac_objext
10974if { (ac_try="$ac_compile"
10975case "(($ac_try" in
10976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10977 *) ac_try_echo=$ac_try;;
10978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010980 (eval "$ac_compile") 2>conftest.er1
10981 ac_status=$?
10982 grep -v '^ *+' conftest.er1 >conftest.err
10983 rm -f conftest.er1
10984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010986 (exit $ac_status); } && {
10987 test -z "$ac_c_werror_flag" ||
10988 test ! -s conftest.err
10989 } && test -s conftest.$ac_objext; then
10990 ac_lo=$ac_mid; break
10991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010992 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010993sed 's/^/| /' conftest.$ac_ext >&5
10994
10995 ac_hi=`expr '(' $ac_mid ')' - 1`
10996 if test $ac_mid -le $ac_hi; then
10997 ac_lo= ac_hi=
10998 break
10999 fi
11000 ac_mid=`expr 2 '*' $ac_mid`
11001fi
11002
11003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004 done
11005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011006 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011007sed 's/^/| /' conftest.$ac_ext >&5
11008
11009 ac_lo= ac_hi=
11010fi
11011
11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013fi
11014
11015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016# Binary search between lo and hi bounds.
11017while test "x$ac_lo" != "x$ac_hi"; do
11018 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11019 cat >conftest.$ac_ext <<_ACEOF
11020/* confdefs.h. */
11021_ACEOF
11022cat confdefs.h >>conftest.$ac_ext
11023cat >>conftest.$ac_ext <<_ACEOF
11024/* end confdefs.h. */
11025$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011026 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011027int
11028main ()
11029{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011031test_array [0] = 0
11032
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037rm -f conftest.$ac_objext
11038if { (ac_try="$ac_compile"
11039case "(($ac_try" in
11040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11041 *) ac_try_echo=$ac_try;;
11042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011044 (eval "$ac_compile") 2>conftest.er1
11045 ac_status=$?
11046 grep -v '^ *+' conftest.er1 >conftest.err
11047 rm -f conftest.er1
11048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011050 (exit $ac_status); } && {
11051 test -z "$ac_c_werror_flag" ||
11052 test ! -s conftest.err
11053 } && test -s conftest.$ac_objext; then
11054 ac_hi=$ac_mid
11055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011056 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011057sed 's/^/| /' conftest.$ac_ext >&5
11058
11059 ac_lo=`expr '(' $ac_mid ')' + 1`
11060fi
11061
11062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11063done
11064case $ac_lo in
11065?*) ac_cv_sizeof_pid_t=$ac_lo;;
11066'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011068See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011069echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011070See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011071 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072 else
11073 ac_cv_sizeof_pid_t=0
11074 fi ;;
11075esac
11076else
11077 cat >conftest.$ac_ext <<_ACEOF
11078/* confdefs.h. */
11079_ACEOF
11080cat confdefs.h >>conftest.$ac_ext
11081cat >>conftest.$ac_ext <<_ACEOF
11082/* end confdefs.h. */
11083$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011084 typedef pid_t ac__type_sizeof_;
11085static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11086static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011087#include <stdio.h>
11088#include <stdlib.h>
11089int
11090main ()
11091{
11092
11093 FILE *f = fopen ("conftest.val", "w");
11094 if (! f)
11095 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011096 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011097 {
11098 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011099 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011100 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 }
11103 else
11104 {
11105 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011106 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011107 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109 }
11110 return ferror (f) || fclose (f) != 0;
11111
11112 ;
11113 return 0;
11114}
11115_ACEOF
11116rm -f conftest$ac_exeext
11117if { (ac_try="$ac_link"
11118case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123 (eval "$ac_link") 2>&5
11124 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11127 { (case "(($ac_try" in
11128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11129 *) ac_try_echo=$ac_try;;
11130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011132 (eval "$ac_try") 2>&5
11133 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011135 (exit $ac_status); }; }; then
11136 ac_cv_sizeof_pid_t=`cat conftest.val`
11137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011138 echo "$as_me: program exited with status $ac_status" >&5
11139echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140sed 's/^/| /' conftest.$ac_ext >&5
11141
11142( exit $ac_status )
11143if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011144 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011146echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011147See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149 else
11150 ac_cv_sizeof_pid_t=0
11151 fi
11152fi
11153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11154fi
11155rm -f conftest.val
11156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011157{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11158echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011159
11160
11161
11162cat >>confdefs.h <<_ACEOF
11163#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11164_ACEOF
11165
11166
Michael W. Hudson54241132001-12-07 15:38:26 +000011167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011168{ echo "$as_me:$LINENO: checking for long long support" >&5
11169echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011170have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011177
Martin v. Löwis11437992002-04-12 09:54:03 +000011178int
11179main ()
11180{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011181long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011195 grep -v '^ *+' conftest.er1 >conftest.err
11196 rm -f conftest.er1
11197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 (exit $ac_status); } && {
11200 test -z "$ac_c_werror_flag" ||
11201 test ! -s conftest.err
11202 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011203
11204
11205cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011206#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011207_ACEOF
11208
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011209 have_long_long=yes
11210
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011213sed 's/^/| /' conftest.$ac_ext >&5
11214
Martin v. Löwiseba40652007-08-30 20:10:57 +000011215
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011217
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011219{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11220echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011221if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011222{ echo "$as_me:$LINENO: checking for long long" >&5
11223echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11224if test "${ac_cv_type_long_long+set}" = set; then
11225 echo $ECHO_N "(cached) $ECHO_C" >&6
11226else
11227 cat >conftest.$ac_ext <<_ACEOF
11228/* confdefs.h. */
11229_ACEOF
11230cat confdefs.h >>conftest.$ac_ext
11231cat >>conftest.$ac_ext <<_ACEOF
11232/* end confdefs.h. */
11233$ac_includes_default
11234typedef long long ac__type_new_;
11235int
11236main ()
11237{
11238if ((ac__type_new_ *) 0)
11239 return 0;
11240if (sizeof (ac__type_new_))
11241 return 0;
11242 ;
11243 return 0;
11244}
11245_ACEOF
11246rm -f conftest.$ac_objext
11247if { (ac_try="$ac_compile"
11248case "(($ac_try" in
11249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11250 *) ac_try_echo=$ac_try;;
11251esac
11252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11253 (eval "$ac_compile") 2>conftest.er1
11254 ac_status=$?
11255 grep -v '^ *+' conftest.er1 >conftest.err
11256 rm -f conftest.er1
11257 cat conftest.err >&5
11258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11259 (exit $ac_status); } && {
11260 test -z "$ac_c_werror_flag" ||
11261 test ! -s conftest.err
11262 } && test -s conftest.$ac_objext; then
11263 ac_cv_type_long_long=yes
11264else
11265 echo "$as_me: failed program was:" >&5
11266sed 's/^/| /' conftest.$ac_ext >&5
11267
11268 ac_cv_type_long_long=no
11269fi
11270
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272fi
11273{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11274echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11275
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276# The cast to long int works around a bug in the HP C Compiler
11277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11279# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011280{ echo "$as_me:$LINENO: checking size of long long" >&5
11281echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011282if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011284else
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 if test "$cross_compiling" = yes; then
11286 # Depending upon the size, compute the lo and hi bounds.
11287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011293$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011295int
11296main ()
11297{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011298static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011299test_array [0] = 0
11300
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011306if { (ac_try="$ac_compile"
11307case "(($ac_try" in
11308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11309 *) ac_try_echo=$ac_try;;
11310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011314 grep -v '^ *+' conftest.er1 >conftest.err
11315 rm -f conftest.er1
11316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011318 (exit $ac_status); } && {
11319 test -z "$ac_c_werror_flag" ||
11320 test ! -s conftest.err
11321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ac_lo=0 ac_mid=0
11323 while :; do
11324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011330$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011331 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011335static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011336test_array [0] = 0
11337
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011343if { (ac_try="$ac_compile"
11344case "(($ac_try" in
11345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11346 *) ac_try_echo=$ac_try;;
11347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011359 ac_hi=$ac_mid; break
11360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Martin v. Löwiseba40652007-08-30 20:10:57 +000011364 ac_lo=`expr $ac_mid + 1`
11365 if test $ac_lo -le $ac_mid; then
11366 ac_lo= ac_hi=
11367 break
11368 fi
11369 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011371
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 done
11374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* confdefs.h. */
11380_ACEOF
11381cat confdefs.h >>conftest.$ac_ext
11382cat >>conftest.$ac_ext <<_ACEOF
11383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011385 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011386int
11387main ()
11388{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011390test_array [0] = 0
11391
11392 ;
11393 return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011397if { (ac_try="$ac_compile"
11398case "(($ac_try" in
11399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11400 *) ac_try_echo=$ac_try;;
11401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011405 grep -v '^ *+' conftest.er1 >conftest.err
11406 rm -f conftest.er1
11407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 (exit $ac_status); } && {
11410 test -z "$ac_c_werror_flag" ||
11411 test ! -s conftest.err
11412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_hi=-1 ac_mid=-1
11414 while :; do
11415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* confdefs.h. */
11417_ACEOF
11418cat confdefs.h >>conftest.$ac_ext
11419cat >>conftest.$ac_ext <<_ACEOF
11420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011427test_array [0] = 0
11428
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434if { (ac_try="$ac_compile"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011442 grep -v '^ *+' conftest.er1 >conftest.err
11443 rm -f conftest.er1
11444 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 (exit $ac_status); } && {
11447 test -z "$ac_c_werror_flag" ||
11448 test ! -s conftest.err
11449 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 ac_lo=$ac_mid; break
11451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011453sed 's/^/| /' conftest.$ac_ext >&5
11454
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455 ac_hi=`expr '(' $ac_mid ')' - 1`
11456 if test $ac_mid -le $ac_hi; then
11457 ac_lo= ac_hi=
11458 break
11459 fi
11460 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 done
11465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011467sed 's/^/| /' conftest.$ac_ext >&5
11468
Martin v. Löwiseba40652007-08-30 20:10:57 +000011469 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471
11472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011474
11475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011476# Binary search between lo and hi bounds.
11477while test "x$ac_lo" != "x$ac_hi"; do
11478 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* confdefs.h. */
11481_ACEOF
11482cat confdefs.h >>conftest.$ac_ext
11483cat >>conftest.$ac_ext <<_ACEOF
11484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011486 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011491test_array [0] = 0
11492
11493 ;
11494 return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011498if { (ac_try="$ac_compile"
11499case "(($ac_try" in
11500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11501 *) ac_try_echo=$ac_try;;
11502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 grep -v '^ *+' conftest.er1 >conftest.err
11507 rm -f conftest.er1
11508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 (exit $ac_status); } && {
11511 test -z "$ac_c_werror_flag" ||
11512 test ! -s conftest.err
11513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ac_hi=$ac_mid
11515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011521
11522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523done
11524case $ac_lo in
11525?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011526'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011527 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011528See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011529echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011531 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011532 else
11533 ac_cv_sizeof_long_long=0
11534 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011535esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011536else
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011538/* confdefs.h. */
11539_ACEOF
11540cat confdefs.h >>conftest.$ac_ext
11541cat >>conftest.$ac_ext <<_ACEOF
11542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011543$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011544 typedef long long ac__type_sizeof_;
11545static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11546static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011547#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011548#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011551{
Martin v. Löwis11437992002-04-12 09:54:03 +000011552
11553 FILE *f = fopen ("conftest.val", "w");
11554 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011556 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011559 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011560 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011562 }
11563 else
11564 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011566 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011567 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011577if { (ac_try="$ac_link"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587 { (case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 (exit $ac_status); }; }; then
11596 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011598 echo "$as_me: program exited with status $ac_status" >&5
11599echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwis11437992002-04-12 09:54:03 +000011602( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011603if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011604 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011605See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011606echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609 else
11610 ac_cv_sizeof_long_long=0
11611 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011612fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613rm -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 +000011614fi
11615rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011617{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11618echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011619
11620
11621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011623#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011624_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625
Michael W. Hudson54241132001-12-07 15:38:26 +000011626
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627fi
11628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011629{ echo "$as_me:$LINENO: checking for long double support" >&5
11630echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011631have_long_double=no
11632cat >conftest.$ac_ext <<_ACEOF
11633/* confdefs.h. */
11634_ACEOF
11635cat confdefs.h >>conftest.$ac_ext
11636cat >>conftest.$ac_ext <<_ACEOF
11637/* end confdefs.h. */
11638
11639int
11640main ()
11641{
11642long double x; x = (long double)0.;
11643 ;
11644 return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (ac_try="$ac_compile"
11649case "(($ac_try" in
11650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11651 *) ac_try_echo=$ac_try;;
11652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011654 (eval "$ac_compile") 2>conftest.er1
11655 ac_status=$?
11656 grep -v '^ *+' conftest.er1 >conftest.err
11657 rm -f conftest.er1
11658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011660 (exit $ac_status); } && {
11661 test -z "$ac_c_werror_flag" ||
11662 test ! -s conftest.err
11663 } && test -s conftest.$ac_objext; then
11664
11665
11666cat >>confdefs.h <<\_ACEOF
11667#define HAVE_LONG_DOUBLE 1
11668_ACEOF
11669
11670 have_long_double=yes
11671
11672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011673 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011674sed 's/^/| /' conftest.$ac_ext >&5
11675
11676
11677fi
11678
11679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011680{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11681echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011682if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011683{ echo "$as_me:$LINENO: checking for long double" >&5
11684echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11685if test "${ac_cv_type_long_double+set}" = set; then
11686 echo $ECHO_N "(cached) $ECHO_C" >&6
11687else
11688 cat >conftest.$ac_ext <<_ACEOF
11689/* confdefs.h. */
11690_ACEOF
11691cat confdefs.h >>conftest.$ac_ext
11692cat >>conftest.$ac_ext <<_ACEOF
11693/* end confdefs.h. */
11694$ac_includes_default
11695typedef long double ac__type_new_;
11696int
11697main ()
11698{
11699if ((ac__type_new_ *) 0)
11700 return 0;
11701if (sizeof (ac__type_new_))
11702 return 0;
11703 ;
11704 return 0;
11705}
11706_ACEOF
11707rm -f conftest.$ac_objext
11708if { (ac_try="$ac_compile"
11709case "(($ac_try" in
11710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11711 *) ac_try_echo=$ac_try;;
11712esac
11713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11714 (eval "$ac_compile") 2>conftest.er1
11715 ac_status=$?
11716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
11719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11720 (exit $ac_status); } && {
11721 test -z "$ac_c_werror_flag" ||
11722 test ! -s conftest.err
11723 } && test -s conftest.$ac_objext; then
11724 ac_cv_type_long_double=yes
11725else
11726 echo "$as_me: failed program was:" >&5
11727sed 's/^/| /' conftest.$ac_ext >&5
11728
11729 ac_cv_type_long_double=no
11730fi
11731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733fi
11734{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11735echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11736
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011737# The cast to long int works around a bug in the HP C Compiler
11738# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11739# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11740# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011741{ echo "$as_me:$LINENO: checking size of long double" >&5
11742echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011743if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011744 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011745else
11746 if test "$cross_compiling" = yes; then
11747 # Depending upon the size, compute the lo and hi bounds.
11748cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011756int
11757main ()
11758{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011759static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011760test_array [0] = 0
11761
11762 ;
11763 return 0;
11764}
11765_ACEOF
11766rm -f conftest.$ac_objext
11767if { (ac_try="$ac_compile"
11768case "(($ac_try" in
11769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11770 *) ac_try_echo=$ac_try;;
11771esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011773 (eval "$ac_compile") 2>conftest.er1
11774 ac_status=$?
11775 grep -v '^ *+' conftest.er1 >conftest.err
11776 rm -f conftest.er1
11777 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011779 (exit $ac_status); } && {
11780 test -z "$ac_c_werror_flag" ||
11781 test ! -s conftest.err
11782 } && test -s conftest.$ac_objext; then
11783 ac_lo=0 ac_mid=0
11784 while :; do
11785 cat >conftest.$ac_ext <<_ACEOF
11786/* confdefs.h. */
11787_ACEOF
11788cat confdefs.h >>conftest.$ac_ext
11789cat >>conftest.$ac_ext <<_ACEOF
11790/* end confdefs.h. */
11791$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011792 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011793int
11794main ()
11795{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011796static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011797test_array [0] = 0
11798
11799 ;
11800 return 0;
11801}
11802_ACEOF
11803rm -f conftest.$ac_objext
11804if { (ac_try="$ac_compile"
11805case "(($ac_try" in
11806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11807 *) ac_try_echo=$ac_try;;
11808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011810 (eval "$ac_compile") 2>conftest.er1
11811 ac_status=$?
11812 grep -v '^ *+' conftest.er1 >conftest.err
11813 rm -f conftest.er1
11814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011816 (exit $ac_status); } && {
11817 test -z "$ac_c_werror_flag" ||
11818 test ! -s conftest.err
11819 } && test -s conftest.$ac_objext; then
11820 ac_hi=$ac_mid; break
11821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011822 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011823sed 's/^/| /' conftest.$ac_ext >&5
11824
11825 ac_lo=`expr $ac_mid + 1`
11826 if test $ac_lo -le $ac_mid; then
11827 ac_lo= ac_hi=
11828 break
11829 fi
11830 ac_mid=`expr 2 '*' $ac_mid + 1`
11831fi
11832
11833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11834 done
11835else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011836 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837sed 's/^/| /' conftest.$ac_ext >&5
11838
11839 cat >conftest.$ac_ext <<_ACEOF
11840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
11845$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011846 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011847int
11848main ()
11849{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851test_array [0] = 0
11852
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857rm -f conftest.$ac_objext
11858if { (ac_try="$ac_compile"
11859case "(($ac_try" in
11860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11861 *) ac_try_echo=$ac_try;;
11862esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011864 (eval "$ac_compile") 2>conftest.er1
11865 ac_status=$?
11866 grep -v '^ *+' conftest.er1 >conftest.err
11867 rm -f conftest.er1
11868 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011870 (exit $ac_status); } && {
11871 test -z "$ac_c_werror_flag" ||
11872 test ! -s conftest.err
11873 } && test -s conftest.$ac_objext; then
11874 ac_hi=-1 ac_mid=-1
11875 while :; do
11876 cat >conftest.$ac_ext <<_ACEOF
11877/* confdefs.h. */
11878_ACEOF
11879cat confdefs.h >>conftest.$ac_ext
11880cat >>conftest.$ac_ext <<_ACEOF
11881/* end confdefs.h. */
11882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884int
11885main ()
11886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011887static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011888test_array [0] = 0
11889
11890 ;
11891 return 0;
11892}
11893_ACEOF
11894rm -f conftest.$ac_objext
11895if { (ac_try="$ac_compile"
11896case "(($ac_try" in
11897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11898 *) ac_try_echo=$ac_try;;
11899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011901 (eval "$ac_compile") 2>conftest.er1
11902 ac_status=$?
11903 grep -v '^ *+' conftest.er1 >conftest.err
11904 rm -f conftest.er1
11905 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011907 (exit $ac_status); } && {
11908 test -z "$ac_c_werror_flag" ||
11909 test ! -s conftest.err
11910 } && test -s conftest.$ac_objext; then
11911 ac_lo=$ac_mid; break
11912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011913 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011914sed 's/^/| /' conftest.$ac_ext >&5
11915
11916 ac_hi=`expr '(' $ac_mid ')' - 1`
11917 if test $ac_mid -le $ac_hi; then
11918 ac_lo= ac_hi=
11919 break
11920 fi
11921 ac_mid=`expr 2 '*' $ac_mid`
11922fi
11923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925 done
11926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011927 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
11930 ac_lo= ac_hi=
11931fi
11932
11933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11934fi
11935
11936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937# Binary search between lo and hi bounds.
11938while test "x$ac_lo" != "x$ac_hi"; do
11939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11940 cat >conftest.$ac_ext <<_ACEOF
11941/* confdefs.h. */
11942_ACEOF
11943cat confdefs.h >>conftest.$ac_ext
11944cat >>conftest.$ac_ext <<_ACEOF
11945/* end confdefs.h. */
11946$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011947 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011948int
11949main ()
11950{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011952test_array [0] = 0
11953
11954 ;
11955 return 0;
11956}
11957_ACEOF
11958rm -f conftest.$ac_objext
11959if { (ac_try="$ac_compile"
11960case "(($ac_try" in
11961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11962 *) ac_try_echo=$ac_try;;
11963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011965 (eval "$ac_compile") 2>conftest.er1
11966 ac_status=$?
11967 grep -v '^ *+' conftest.er1 >conftest.err
11968 rm -f conftest.er1
11969 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 (exit $ac_status); } && {
11972 test -z "$ac_c_werror_flag" ||
11973 test ! -s conftest.err
11974 } && test -s conftest.$ac_objext; then
11975 ac_hi=$ac_mid
11976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011977 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011978sed 's/^/| /' conftest.$ac_ext >&5
11979
11980 ac_lo=`expr '(' $ac_mid ')' + 1`
11981fi
11982
11983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11984done
11985case $ac_lo in
11986?*) ac_cv_sizeof_long_double=$ac_lo;;
11987'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011988 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011989See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011990echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011991See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011992 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011993 else
11994 ac_cv_sizeof_long_double=0
11995 fi ;;
11996esac
11997else
11998 cat >conftest.$ac_ext <<_ACEOF
11999/* confdefs.h. */
12000_ACEOF
12001cat confdefs.h >>conftest.$ac_ext
12002cat >>conftest.$ac_ext <<_ACEOF
12003/* end confdefs.h. */
12004$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012005 typedef long double ac__type_sizeof_;
12006static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12007static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012008#include <stdio.h>
12009#include <stdlib.h>
12010int
12011main ()
12012{
12013
12014 FILE *f = fopen ("conftest.val", "w");
12015 if (! f)
12016 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012017 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012018 {
12019 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012020 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012021 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 }
12024 else
12025 {
12026 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012027 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012028 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030 }
12031 return ferror (f) || fclose (f) != 0;
12032
12033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest$ac_exeext
12038if { (ac_try="$ac_link"
12039case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044 (eval "$ac_link") 2>&5
12045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12048 { (case "(($ac_try" in
12049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12050 *) ac_try_echo=$ac_try;;
12051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012053 (eval "$ac_try") 2>&5
12054 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012056 (exit $ac_status); }; }; then
12057 ac_cv_sizeof_long_double=`cat conftest.val`
12058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012059 echo "$as_me: program exited with status $ac_status" >&5
12060echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061sed 's/^/| /' conftest.$ac_ext >&5
12062
12063( exit $ac_status )
12064if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012065 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012066See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012067echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012068See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070 else
12071 ac_cv_sizeof_long_double=0
12072 fi
12073fi
12074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12075fi
12076rm -f conftest.val
12077fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012078{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12079echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012080
12081
12082
12083cat >>confdefs.h <<_ACEOF
12084#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12085_ACEOF
12086
12087
12088fi
12089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012090{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12091echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012092have_c99_bool=no
12093cat >conftest.$ac_ext <<_ACEOF
12094/* confdefs.h. */
12095_ACEOF
12096cat confdefs.h >>conftest.$ac_ext
12097cat >>conftest.$ac_ext <<_ACEOF
12098/* end confdefs.h. */
12099
12100int
12101main ()
12102{
12103_Bool x; x = (_Bool)0;
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109if { (ac_try="$ac_compile"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012116 ac_status=$?
12117 grep -v '^ *+' conftest.er1 >conftest.err
12118 rm -f conftest.er1
12119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121 (exit $ac_status); } && {
12122 test -z "$ac_c_werror_flag" ||
12123 test ! -s conftest.err
12124 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012125
12126
12127cat >>confdefs.h <<\_ACEOF
12128#define HAVE_C99_BOOL 1
12129_ACEOF
12130
12131 have_c99_bool=yes
12132
12133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012134 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012135sed 's/^/| /' conftest.$ac_ext >&5
12136
Martin v. Löwiseba40652007-08-30 20:10:57 +000012137
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012139
12140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012141{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12142echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012143if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012144{ echo "$as_me:$LINENO: checking for _Bool" >&5
12145echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12146if test "${ac_cv_type__Bool+set}" = set; then
12147 echo $ECHO_N "(cached) $ECHO_C" >&6
12148else
12149 cat >conftest.$ac_ext <<_ACEOF
12150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
12155$ac_includes_default
12156typedef _Bool ac__type_new_;
12157int
12158main ()
12159{
12160if ((ac__type_new_ *) 0)
12161 return 0;
12162if (sizeof (ac__type_new_))
12163 return 0;
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168rm -f conftest.$ac_objext
12169if { (ac_try="$ac_compile"
12170case "(($ac_try" in
12171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12172 *) ac_try_echo=$ac_try;;
12173esac
12174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12175 (eval "$ac_compile") 2>conftest.er1
12176 ac_status=$?
12177 grep -v '^ *+' conftest.er1 >conftest.err
12178 rm -f conftest.er1
12179 cat conftest.err >&5
12180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12181 (exit $ac_status); } && {
12182 test -z "$ac_c_werror_flag" ||
12183 test ! -s conftest.err
12184 } && test -s conftest.$ac_objext; then
12185 ac_cv_type__Bool=yes
12186else
12187 echo "$as_me: failed program was:" >&5
12188sed 's/^/| /' conftest.$ac_ext >&5
12189
12190 ac_cv_type__Bool=no
12191fi
12192
12193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12194fi
12195{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12196echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12197
Martin v. Löwiseba40652007-08-30 20:10:57 +000012198# The cast to long int works around a bug in the HP C Compiler
12199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12201# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012202{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12203echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012204if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012205 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012206else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012207 if test "$cross_compiling" = yes; then
12208 # Depending upon the size, compute the lo and hi bounds.
12209cat >conftest.$ac_ext <<_ACEOF
12210/* confdefs.h. */
12211_ACEOF
12212cat confdefs.h >>conftest.$ac_ext
12213cat >>conftest.$ac_ext <<_ACEOF
12214/* end confdefs.h. */
12215$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012217int
12218main ()
12219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221test_array [0] = 0
12222
12223 ;
12224 return 0;
12225}
12226_ACEOF
12227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228if { (ac_try="$ac_compile"
12229case "(($ac_try" in
12230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12231 *) ac_try_echo=$ac_try;;
12232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012235 ac_status=$?
12236 grep -v '^ *+' conftest.er1 >conftest.err
12237 rm -f conftest.er1
12238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012240 (exit $ac_status); } && {
12241 test -z "$ac_c_werror_flag" ||
12242 test ! -s conftest.err
12243 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012244 ac_lo=0 ac_mid=0
12245 while :; do
12246 cat >conftest.$ac_ext <<_ACEOF
12247/* confdefs.h. */
12248_ACEOF
12249cat confdefs.h >>conftest.$ac_ext
12250cat >>conftest.$ac_ext <<_ACEOF
12251/* end confdefs.h. */
12252$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012253 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012254int
12255main ()
12256{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012258test_array [0] = 0
12259
12260 ;
12261 return 0;
12262}
12263_ACEOF
12264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012265if { (ac_try="$ac_compile"
12266case "(($ac_try" in
12267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12268 *) ac_try_echo=$ac_try;;
12269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272 ac_status=$?
12273 grep -v '^ *+' conftest.er1 >conftest.err
12274 rm -f conftest.er1
12275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 (exit $ac_status); } && {
12278 test -z "$ac_c_werror_flag" ||
12279 test ! -s conftest.err
12280 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012281 ac_hi=$ac_mid; break
12282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012283 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012284sed 's/^/| /' conftest.$ac_ext >&5
12285
Martin v. Löwiseba40652007-08-30 20:10:57 +000012286 ac_lo=`expr $ac_mid + 1`
12287 if test $ac_lo -le $ac_mid; then
12288 ac_lo= ac_hi=
12289 break
12290 fi
12291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012293
12294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012295 done
12296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012297 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298sed 's/^/| /' conftest.$ac_ext >&5
12299
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301/* confdefs.h. */
12302_ACEOF
12303cat confdefs.h >>conftest.$ac_ext
12304cat >>conftest.$ac_ext <<_ACEOF
12305/* end confdefs.h. */
12306$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012307 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012308int
12309main ()
12310{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012312test_array [0] = 0
12313
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012319if { (ac_try="$ac_compile"
12320case "(($ac_try" in
12321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12322 *) ac_try_echo=$ac_try;;
12323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326 ac_status=$?
12327 grep -v '^ *+' conftest.er1 >conftest.err
12328 rm -f conftest.er1
12329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012331 (exit $ac_status); } && {
12332 test -z "$ac_c_werror_flag" ||
12333 test ! -s conftest.err
12334 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012335 ac_hi=-1 ac_mid=-1
12336 while :; do
12337 cat >conftest.$ac_ext <<_ACEOF
12338/* confdefs.h. */
12339_ACEOF
12340cat confdefs.h >>conftest.$ac_ext
12341cat >>conftest.$ac_ext <<_ACEOF
12342/* end confdefs.h. */
12343$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012345int
12346main ()
12347{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349test_array [0] = 0
12350
12351 ;
12352 return 0;
12353}
12354_ACEOF
12355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356if { (ac_try="$ac_compile"
12357case "(($ac_try" in
12358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12359 *) ac_try_echo=$ac_try;;
12360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363 ac_status=$?
12364 grep -v '^ *+' conftest.er1 >conftest.err
12365 rm -f conftest.er1
12366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 (exit $ac_status); } && {
12369 test -z "$ac_c_werror_flag" ||
12370 test ! -s conftest.err
12371 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012372 ac_lo=$ac_mid; break
12373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012374 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012375sed 's/^/| /' conftest.$ac_ext >&5
12376
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377 ac_hi=`expr '(' $ac_mid ')' - 1`
12378 if test $ac_mid -le $ac_hi; then
12379 ac_lo= ac_hi=
12380 break
12381 fi
12382 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384
12385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012386 done
12387else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012388 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389sed 's/^/| /' conftest.$ac_ext >&5
12390
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393
12394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012396
12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012398# Binary search between lo and hi bounds.
12399while test "x$ac_lo" != "x$ac_hi"; do
12400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12401 cat >conftest.$ac_ext <<_ACEOF
12402/* confdefs.h. */
12403_ACEOF
12404cat confdefs.h >>conftest.$ac_ext
12405cat >>conftest.$ac_ext <<_ACEOF
12406/* end confdefs.h. */
12407$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012408 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409int
12410main ()
12411{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012413test_array [0] = 0
12414
12415 ;
12416 return 0;
12417}
12418_ACEOF
12419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420if { (ac_try="$ac_compile"
12421case "(($ac_try" in
12422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12423 *) ac_try_echo=$ac_try;;
12424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_status=$?
12428 grep -v '^ *+' conftest.er1 >conftest.err
12429 rm -f conftest.er1
12430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 (exit $ac_status); } && {
12433 test -z "$ac_c_werror_flag" ||
12434 test ! -s conftest.err
12435 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012436 ac_hi=$ac_mid
12437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012438 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012439sed 's/^/| /' conftest.$ac_ext >&5
12440
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012443
12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012445done
12446case $ac_lo in
12447?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012449 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012451echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012452See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012453 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454 else
12455 ac_cv_sizeof__Bool=0
12456 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457esac
12458else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459 cat >conftest.$ac_ext <<_ACEOF
12460/* confdefs.h. */
12461_ACEOF
12462cat confdefs.h >>conftest.$ac_ext
12463cat >>conftest.$ac_ext <<_ACEOF
12464/* end confdefs.h. */
12465$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012466 typedef _Bool ac__type_sizeof_;
12467static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12468static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012469#include <stdio.h>
12470#include <stdlib.h>
12471int
12472main ()
12473{
12474
12475 FILE *f = fopen ("conftest.val", "w");
12476 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012478 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012482 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484 }
12485 else
12486 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012489 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012492 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012493
12494 ;
12495 return 0;
12496}
12497_ACEOF
12498rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012499if { (ac_try="$ac_link"
12500case "(($ac_try" in
12501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12502 *) ac_try_echo=$ac_try;;
12503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012506 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509 { (case "(($ac_try" in
12510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12511 *) ac_try_echo=$ac_try;;
12512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012515 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012517 (exit $ac_status); }; }; then
12518 ac_cv_sizeof__Bool=`cat conftest.val`
12519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012520 echo "$as_me: program exited with status $ac_status" >&5
12521echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522sed 's/^/| /' conftest.$ac_ext >&5
12523
12524( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012525if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012526 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012527See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012528echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012531 else
12532 ac_cv_sizeof__Bool=0
12533 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535rm -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 +000012536fi
12537rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012539{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12540echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541
12542
12543
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544cat >>confdefs.h <<_ACEOF
12545#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12546_ACEOF
12547
12548
12549fi
12550
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012551{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12552echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012553if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012554 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012555else
12556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012557/* confdefs.h. */
12558_ACEOF
12559cat confdefs.h >>conftest.$ac_ext
12560cat >>conftest.$ac_ext <<_ACEOF
12561/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012562#ifdef HAVE_STDINT_H
12563 #include <stdint.h>
12564 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012565
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012566typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012567int
12568main ()
12569{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012570if ((ac__type_new_ *) 0)
12571 return 0;
12572if (sizeof (ac__type_new_))
12573 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 ;
12575 return 0;
12576}
12577_ACEOF
12578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012579if { (ac_try="$ac_compile"
12580case "(($ac_try" in
12581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12582 *) ac_try_echo=$ac_try;;
12583esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012587 grep -v '^ *+' conftest.er1 >conftest.err
12588 rm -f conftest.er1
12589 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 (exit $ac_status); } && {
12592 test -z "$ac_c_werror_flag" ||
12593 test ! -s conftest.err
12594 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012595 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012597 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012598sed 's/^/| /' conftest.$ac_ext >&5
12599
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012600 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602
12603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012605{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12606echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12607if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012608
12609cat >>confdefs.h <<_ACEOF
12610#define HAVE_UINTPTR_T 1
12611_ACEOF
12612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012613{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12614echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12615if test "${ac_cv_type_uintptr_t+set}" = set; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
12617else
12618 cat >conftest.$ac_ext <<_ACEOF
12619/* confdefs.h. */
12620_ACEOF
12621cat confdefs.h >>conftest.$ac_ext
12622cat >>conftest.$ac_ext <<_ACEOF
12623/* end confdefs.h. */
12624$ac_includes_default
12625typedef uintptr_t ac__type_new_;
12626int
12627main ()
12628{
12629if ((ac__type_new_ *) 0)
12630 return 0;
12631if (sizeof (ac__type_new_))
12632 return 0;
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext
12638if { (ac_try="$ac_compile"
12639case "(($ac_try" in
12640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12641 *) ac_try_echo=$ac_try;;
12642esac
12643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12644 (eval "$ac_compile") 2>conftest.er1
12645 ac_status=$?
12646 grep -v '^ *+' conftest.er1 >conftest.err
12647 rm -f conftest.er1
12648 cat conftest.err >&5
12649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12650 (exit $ac_status); } && {
12651 test -z "$ac_c_werror_flag" ||
12652 test ! -s conftest.err
12653 } && test -s conftest.$ac_objext; then
12654 ac_cv_type_uintptr_t=yes
12655else
12656 echo "$as_me: failed program was:" >&5
12657sed 's/^/| /' conftest.$ac_ext >&5
12658
12659 ac_cv_type_uintptr_t=no
12660fi
12661
12662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12663fi
12664{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12665echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12666
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667# The cast to long int works around a bug in the HP C Compiler
12668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12670# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012671{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12672echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012673if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012674 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012675else
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 if test "$cross_compiling" = yes; then
12677 # Depending upon the size, compute the lo and hi bounds.
12678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* confdefs.h. */
12680_ACEOF
12681cat confdefs.h >>conftest.$ac_ext
12682cat >>conftest.$ac_ext <<_ACEOF
12683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012684$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012685 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012686int
12687main ()
12688{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012690test_array [0] = 0
12691
12692 ;
12693 return 0;
12694}
12695_ACEOF
12696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697if { (ac_try="$ac_compile"
12698case "(($ac_try" in
12699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12700 *) ac_try_echo=$ac_try;;
12701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012705 grep -v '^ *+' conftest.er1 >conftest.err
12706 rm -f conftest.er1
12707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709 (exit $ac_status); } && {
12710 test -z "$ac_c_werror_flag" ||
12711 test ! -s conftest.err
12712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 ac_lo=0 ac_mid=0
12714 while :; do
12715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012716/* confdefs.h. */
12717_ACEOF
12718cat confdefs.h >>conftest.$ac_ext
12719cat >>conftest.$ac_ext <<_ACEOF
12720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012721$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012722 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012723int
12724main ()
12725{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012726static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012727test_array [0] = 0
12728
12729 ;
12730 return 0;
12731}
12732_ACEOF
12733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734if { (ac_try="$ac_compile"
12735case "(($ac_try" in
12736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12737 *) ac_try_echo=$ac_try;;
12738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012742 grep -v '^ *+' conftest.er1 >conftest.err
12743 rm -f conftest.er1
12744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 (exit $ac_status); } && {
12747 test -z "$ac_c_werror_flag" ||
12748 test ! -s conftest.err
12749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012750 ac_hi=$ac_mid; break
12751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012753sed 's/^/| /' conftest.$ac_ext >&5
12754
Martin v. Löwiseba40652007-08-30 20:10:57 +000012755 ac_lo=`expr $ac_mid + 1`
12756 if test $ac_lo -le $ac_mid; then
12757 ac_lo= ac_hi=
12758 break
12759 fi
12760 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012762
12763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 done
12765else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012767sed 's/^/| /' conftest.$ac_ext >&5
12768
Martin v. Löwiseba40652007-08-30 20:10:57 +000012769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* confdefs.h. */
12771_ACEOF
12772cat confdefs.h >>conftest.$ac_ext
12773cat >>conftest.$ac_ext <<_ACEOF
12774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012776 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012777int
12778main ()
12779{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012781test_array [0] = 0
12782
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012788if { (ac_try="$ac_compile"
12789case "(($ac_try" in
12790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12791 *) ac_try_echo=$ac_try;;
12792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012796 grep -v '^ *+' conftest.er1 >conftest.err
12797 rm -f conftest.er1
12798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 (exit $ac_status); } && {
12801 test -z "$ac_c_werror_flag" ||
12802 test ! -s conftest.err
12803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ac_hi=-1 ac_mid=-1
12805 while :; do
12806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* confdefs.h. */
12808_ACEOF
12809cat confdefs.h >>conftest.$ac_ext
12810cat >>conftest.$ac_ext <<_ACEOF
12811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012812$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012818test_array [0] = 0
12819
12820 ;
12821 return 0;
12822}
12823_ACEOF
12824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825if { (ac_try="$ac_compile"
12826case "(($ac_try" in
12827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12828 *) ac_try_echo=$ac_try;;
12829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012833 grep -v '^ *+' conftest.er1 >conftest.err
12834 rm -f conftest.er1
12835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 (exit $ac_status); } && {
12838 test -z "$ac_c_werror_flag" ||
12839 test ! -s conftest.err
12840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ac_lo=$ac_mid; break
12842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012844sed 's/^/| /' conftest.$ac_ext >&5
12845
Martin v. Löwiseba40652007-08-30 20:10:57 +000012846 ac_hi=`expr '(' $ac_mid ')' - 1`
12847 if test $ac_mid -le $ac_hi; then
12848 ac_lo= ac_hi=
12849 break
12850 fi
12851 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853
12854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 done
12856else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012858sed 's/^/| /' conftest.$ac_ext >&5
12859
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012861fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862
12863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012865
12866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012867# Binary search between lo and hi bounds.
12868while test "x$ac_lo" != "x$ac_hi"; do
12869 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012871/* confdefs.h. */
12872_ACEOF
12873cat confdefs.h >>conftest.$ac_ext
12874cat >>conftest.$ac_ext <<_ACEOF
12875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012876$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012877 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012878int
12879main ()
12880{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012881static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012882test_array [0] = 0
12883
12884 ;
12885 return 0;
12886}
12887_ACEOF
12888rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012889if { (ac_try="$ac_compile"
12890case "(($ac_try" in
12891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12892 *) ac_try_echo=$ac_try;;
12893esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012895 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012897 grep -v '^ *+' conftest.er1 >conftest.err
12898 rm -f conftest.er1
12899 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 (exit $ac_status); } && {
12902 test -z "$ac_c_werror_flag" ||
12903 test ! -s conftest.err
12904 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_hi=$ac_mid
12906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012908sed 's/^/| /' conftest.$ac_ext >&5
12909
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912
12913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012914done
12915case $ac_lo in
12916?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012919See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012920echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012921See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012922 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923 else
12924 ac_cv_sizeof_uintptr_t=0
12925 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012926esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012929/* confdefs.h. */
12930_ACEOF
12931cat confdefs.h >>conftest.$ac_ext
12932cat >>conftest.$ac_ext <<_ACEOF
12933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012935 typedef uintptr_t ac__type_sizeof_;
12936static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12937static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012938#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012939#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012942{
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
12944 FILE *f = fopen ("conftest.val", "w");
12945 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012946 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012947 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012950 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012951 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 }
12954 else
12955 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012957 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
12963 ;
12964 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012965}
Martin v. Löwis11437992002-04-12 09:54:03 +000012966_ACEOF
12967rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968if { (ac_try="$ac_link"
12969case "(($ac_try" in
12970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12971 *) ac_try_echo=$ac_try;;
12972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 { (case "(($ac_try" in
12979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12980 *) ac_try_echo=$ac_try;;
12981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 (exit $ac_status); }; }; then
12987 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012988else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012989 echo "$as_me: program exited with status $ac_status" >&5
12990echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012991sed 's/^/| /' conftest.$ac_ext >&5
12992
Martin v. Löwis11437992002-04-12 09:54:03 +000012993( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012995 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012996See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012997echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012998See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000 else
13001 ac_cv_sizeof_uintptr_t=0
13002 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004rm -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 +000013005fi
13006rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013007fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013008{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13009echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013010
13011
13012
Martin v. Löwis11437992002-04-12 09:54:03 +000013013cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013014#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013015_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013016
Michael W. Hudson54241132001-12-07 15:38:26 +000013017
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013018fi
13019
Martin v. Löwisebe26702006-10-02 14:55:51 +000013020
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013021{ echo "$as_me:$LINENO: checking for off_t" >&5
13022echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13023if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013025else
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013027/* confdefs.h. */
13028_ACEOF
13029cat confdefs.h >>conftest.$ac_ext
13030cat >>conftest.$ac_ext <<_ACEOF
13031/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013032
13033#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013034#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013035#endif
13036
13037
13038typedef off_t ac__type_new_;
13039int
13040main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013041{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013042if ((ac__type_new_ *) 0)
13043 return 0;
13044if (sizeof (ac__type_new_))
13045 return 0;
13046 ;
13047 return 0;
13048}
13049_ACEOF
13050rm -f conftest.$ac_objext
13051if { (ac_try="$ac_compile"
13052case "(($ac_try" in
13053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13054 *) ac_try_echo=$ac_try;;
13055esac
13056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13057 (eval "$ac_compile") 2>conftest.er1
13058 ac_status=$?
13059 grep -v '^ *+' conftest.er1 >conftest.err
13060 rm -f conftest.er1
13061 cat conftest.err >&5
13062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13063 (exit $ac_status); } && {
13064 test -z "$ac_c_werror_flag" ||
13065 test ! -s conftest.err
13066 } && test -s conftest.$ac_objext; then
13067 ac_cv_type_off_t=yes
13068else
13069 echo "$as_me: failed program was:" >&5
13070sed 's/^/| /' conftest.$ac_ext >&5
13071
13072 ac_cv_type_off_t=no
13073fi
13074
13075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13076fi
13077{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13078echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13079
13080# The cast to long int works around a bug in the HP C Compiler
13081# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13082# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13083# This bug is HP SR number 8606223364.
13084{ echo "$as_me:$LINENO: checking size of off_t" >&5
13085echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13086if test "${ac_cv_sizeof_off_t+set}" = set; then
13087 echo $ECHO_N "(cached) $ECHO_C" >&6
13088else
13089 if test "$cross_compiling" = yes; then
13090 # Depending upon the size, compute the lo and hi bounds.
13091cat >conftest.$ac_ext <<_ACEOF
13092/* confdefs.h. */
13093_ACEOF
13094cat confdefs.h >>conftest.$ac_ext
13095cat >>conftest.$ac_ext <<_ACEOF
13096/* end confdefs.h. */
13097
13098#ifdef HAVE_SYS_TYPES_H
13099#include <sys/types.h>
13100#endif
13101
13102
13103 typedef off_t ac__type_sizeof_;
13104int
13105main ()
13106{
13107static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13108test_array [0] = 0
13109
13110 ;
13111 return 0;
13112}
13113_ACEOF
13114rm -f conftest.$ac_objext
13115if { (ac_try="$ac_compile"
13116case "(($ac_try" in
13117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13118 *) ac_try_echo=$ac_try;;
13119esac
13120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13121 (eval "$ac_compile") 2>conftest.er1
13122 ac_status=$?
13123 grep -v '^ *+' conftest.er1 >conftest.err
13124 rm -f conftest.er1
13125 cat conftest.err >&5
13126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13127 (exit $ac_status); } && {
13128 test -z "$ac_c_werror_flag" ||
13129 test ! -s conftest.err
13130 } && test -s conftest.$ac_objext; then
13131 ac_lo=0 ac_mid=0
13132 while :; do
13133 cat >conftest.$ac_ext <<_ACEOF
13134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
13139
13140#ifdef HAVE_SYS_TYPES_H
13141#include <sys/types.h>
13142#endif
13143
13144
13145 typedef off_t ac__type_sizeof_;
13146int
13147main ()
13148{
13149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13150test_array [0] = 0
13151
13152 ;
13153 return 0;
13154}
13155_ACEOF
13156rm -f conftest.$ac_objext
13157if { (ac_try="$ac_compile"
13158case "(($ac_try" in
13159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13160 *) ac_try_echo=$ac_try;;
13161esac
13162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13163 (eval "$ac_compile") 2>conftest.er1
13164 ac_status=$?
13165 grep -v '^ *+' conftest.er1 >conftest.err
13166 rm -f conftest.er1
13167 cat conftest.err >&5
13168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13169 (exit $ac_status); } && {
13170 test -z "$ac_c_werror_flag" ||
13171 test ! -s conftest.err
13172 } && test -s conftest.$ac_objext; then
13173 ac_hi=$ac_mid; break
13174else
13175 echo "$as_me: failed program was:" >&5
13176sed 's/^/| /' conftest.$ac_ext >&5
13177
13178 ac_lo=`expr $ac_mid + 1`
13179 if test $ac_lo -le $ac_mid; then
13180 ac_lo= ac_hi=
13181 break
13182 fi
13183 ac_mid=`expr 2 '*' $ac_mid + 1`
13184fi
13185
13186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13187 done
13188else
13189 echo "$as_me: failed program was:" >&5
13190sed 's/^/| /' conftest.$ac_ext >&5
13191
13192 cat >conftest.$ac_ext <<_ACEOF
13193/* confdefs.h. */
13194_ACEOF
13195cat confdefs.h >>conftest.$ac_ext
13196cat >>conftest.$ac_ext <<_ACEOF
13197/* end confdefs.h. */
13198
13199#ifdef HAVE_SYS_TYPES_H
13200#include <sys/types.h>
13201#endif
13202
13203
13204 typedef off_t ac__type_sizeof_;
13205int
13206main ()
13207{
13208static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13209test_array [0] = 0
13210
13211 ;
13212 return 0;
13213}
13214_ACEOF
13215rm -f conftest.$ac_objext
13216if { (ac_try="$ac_compile"
13217case "(($ac_try" in
13218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13219 *) ac_try_echo=$ac_try;;
13220esac
13221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13222 (eval "$ac_compile") 2>conftest.er1
13223 ac_status=$?
13224 grep -v '^ *+' conftest.er1 >conftest.err
13225 rm -f conftest.er1
13226 cat conftest.err >&5
13227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13228 (exit $ac_status); } && {
13229 test -z "$ac_c_werror_flag" ||
13230 test ! -s conftest.err
13231 } && test -s conftest.$ac_objext; then
13232 ac_hi=-1 ac_mid=-1
13233 while :; do
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_SYS_TYPES_H
13242#include <sys/types.h>
13243#endif
13244
13245
13246 typedef off_t ac__type_sizeof_;
13247int
13248main ()
13249{
13250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13251test_array [0] = 0
13252
13253 ;
13254 return 0;
13255}
13256_ACEOF
13257rm -f conftest.$ac_objext
13258if { (ac_try="$ac_compile"
13259case "(($ac_try" in
13260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13261 *) ac_try_echo=$ac_try;;
13262esac
13263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13264 (eval "$ac_compile") 2>conftest.er1
13265 ac_status=$?
13266 grep -v '^ *+' conftest.er1 >conftest.err
13267 rm -f conftest.er1
13268 cat conftest.err >&5
13269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); } && {
13271 test -z "$ac_c_werror_flag" ||
13272 test ! -s conftest.err
13273 } && test -s conftest.$ac_objext; then
13274 ac_lo=$ac_mid; break
13275else
13276 echo "$as_me: failed program was:" >&5
13277sed 's/^/| /' conftest.$ac_ext >&5
13278
13279 ac_hi=`expr '(' $ac_mid ')' - 1`
13280 if test $ac_mid -le $ac_hi; then
13281 ac_lo= ac_hi=
13282 break
13283 fi
13284 ac_mid=`expr 2 '*' $ac_mid`
13285fi
13286
13287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13288 done
13289else
13290 echo "$as_me: failed program was:" >&5
13291sed 's/^/| /' conftest.$ac_ext >&5
13292
13293 ac_lo= ac_hi=
13294fi
13295
13296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297fi
13298
13299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300# Binary search between lo and hi bounds.
13301while test "x$ac_lo" != "x$ac_hi"; do
13302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13303 cat >conftest.$ac_ext <<_ACEOF
13304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
13309
13310#ifdef HAVE_SYS_TYPES_H
13311#include <sys/types.h>
13312#endif
13313
13314
13315 typedef off_t ac__type_sizeof_;
13316int
13317main ()
13318{
13319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13320test_array [0] = 0
13321
13322 ;
13323 return 0;
13324}
13325_ACEOF
13326rm -f conftest.$ac_objext
13327if { (ac_try="$ac_compile"
13328case "(($ac_try" in
13329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13330 *) ac_try_echo=$ac_try;;
13331esac
13332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13333 (eval "$ac_compile") 2>conftest.er1
13334 ac_status=$?
13335 grep -v '^ *+' conftest.er1 >conftest.err
13336 rm -f conftest.er1
13337 cat conftest.err >&5
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); } && {
13340 test -z "$ac_c_werror_flag" ||
13341 test ! -s conftest.err
13342 } && test -s conftest.$ac_objext; then
13343 ac_hi=$ac_mid
13344else
13345 echo "$as_me: failed program was:" >&5
13346sed 's/^/| /' conftest.$ac_ext >&5
13347
13348 ac_lo=`expr '(' $ac_mid ')' + 1`
13349fi
13350
13351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13352done
13353case $ac_lo in
13354?*) ac_cv_sizeof_off_t=$ac_lo;;
13355'') if test "$ac_cv_type_off_t" = yes; then
13356 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13357See \`config.log' for more details." >&5
13358echo "$as_me: error: cannot compute sizeof (off_t)
13359See \`config.log' for more details." >&2;}
13360 { (exit 77); exit 77; }; }
13361 else
13362 ac_cv_sizeof_off_t=0
13363 fi ;;
13364esac
13365else
13366 cat >conftest.$ac_ext <<_ACEOF
13367/* confdefs.h. */
13368_ACEOF
13369cat confdefs.h >>conftest.$ac_ext
13370cat >>conftest.$ac_ext <<_ACEOF
13371/* end confdefs.h. */
13372
13373#ifdef HAVE_SYS_TYPES_H
13374#include <sys/types.h>
13375#endif
13376
13377
13378 typedef off_t ac__type_sizeof_;
13379static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13380static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13381#include <stdio.h>
13382#include <stdlib.h>
13383int
13384main ()
13385{
13386
13387 FILE *f = fopen ("conftest.val", "w");
13388 if (! f)
13389 return 1;
13390 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13391 {
13392 long int i = longval ();
13393 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13394 return 1;
13395 fprintf (f, "%ld\n", i);
13396 }
13397 else
13398 {
13399 unsigned long int i = ulongval ();
13400 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13401 return 1;
13402 fprintf (f, "%lu\n", i);
13403 }
13404 return ferror (f) || fclose (f) != 0;
13405
13406 ;
13407 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408}
Martin v. Löwis11437992002-04-12 09:54:03 +000013409_ACEOF
13410rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013411if { (ac_try="$ac_link"
13412case "(($ac_try" in
13413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13414 *) ac_try_echo=$ac_try;;
13415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421 { (case "(($ac_try" in
13422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13423 *) ac_try_echo=$ac_try;;
13424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013430 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013432 echo "$as_me: program exited with status $ac_status" >&5
13433echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013434sed 's/^/| /' conftest.$ac_ext >&5
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013437if test "$ac_cv_type_off_t" = yes; then
13438 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13439See \`config.log' for more details." >&5
13440echo "$as_me: error: cannot compute sizeof (off_t)
13441See \`config.log' for more details." >&2;}
13442 { (exit 77); exit 77; }; }
13443 else
13444 ac_cv_sizeof_off_t=0
13445 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447rm -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 +000013448fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013449rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013451{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13452echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013454
13455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013457#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013459
Michael W. Hudson54241132001-12-07 15:38:26 +000013460
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013462{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13463echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013464if test "$have_long_long" = yes -a \
13465 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13466 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468cat >>confdefs.h <<\_ACEOF
13469#define HAVE_LARGEFILE_SUPPORT 1
13470_ACEOF
13471
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013472 { echo "$as_me:$LINENO: result: yes" >&5
13473echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013475 { echo "$as_me:$LINENO: result: no" >&5
13476echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013477fi
13478
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013479{ echo "$as_me:$LINENO: checking for time_t" >&5
13480echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13481if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013483else
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* confdefs.h. */
13486_ACEOF
13487cat confdefs.h >>conftest.$ac_ext
13488cat >>conftest.$ac_ext <<_ACEOF
13489/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013490
13491#ifdef HAVE_SYS_TYPES_H
13492#include <sys/types.h>
13493#endif
13494#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013495#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013496#endif
13497
13498
13499typedef time_t ac__type_new_;
13500int
13501main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013502{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013503if ((ac__type_new_ *) 0)
13504 return 0;
13505if (sizeof (ac__type_new_))
13506 return 0;
13507 ;
13508 return 0;
13509}
13510_ACEOF
13511rm -f conftest.$ac_objext
13512if { (ac_try="$ac_compile"
13513case "(($ac_try" in
13514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13515 *) ac_try_echo=$ac_try;;
13516esac
13517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13518 (eval "$ac_compile") 2>conftest.er1
13519 ac_status=$?
13520 grep -v '^ *+' conftest.er1 >conftest.err
13521 rm -f conftest.er1
13522 cat conftest.err >&5
13523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13524 (exit $ac_status); } && {
13525 test -z "$ac_c_werror_flag" ||
13526 test ! -s conftest.err
13527 } && test -s conftest.$ac_objext; then
13528 ac_cv_type_time_t=yes
13529else
13530 echo "$as_me: failed program was:" >&5
13531sed 's/^/| /' conftest.$ac_ext >&5
13532
13533 ac_cv_type_time_t=no
13534fi
13535
13536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537fi
13538{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13539echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13540
13541# The cast to long int works around a bug in the HP C Compiler
13542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13544# This bug is HP SR number 8606223364.
13545{ echo "$as_me:$LINENO: checking size of time_t" >&5
13546echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13547if test "${ac_cv_sizeof_time_t+set}" = set; then
13548 echo $ECHO_N "(cached) $ECHO_C" >&6
13549else
13550 if test "$cross_compiling" = yes; then
13551 # Depending upon the size, compute the lo and hi bounds.
13552cat >conftest.$ac_ext <<_ACEOF
13553/* confdefs.h. */
13554_ACEOF
13555cat confdefs.h >>conftest.$ac_ext
13556cat >>conftest.$ac_ext <<_ACEOF
13557/* end confdefs.h. */
13558
13559#ifdef HAVE_SYS_TYPES_H
13560#include <sys/types.h>
13561#endif
13562#ifdef HAVE_TIME_H
13563#include <time.h>
13564#endif
13565
13566
13567 typedef time_t ac__type_sizeof_;
13568int
13569main ()
13570{
13571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13572test_array [0] = 0
13573
13574 ;
13575 return 0;
13576}
13577_ACEOF
13578rm -f conftest.$ac_objext
13579if { (ac_try="$ac_compile"
13580case "(($ac_try" in
13581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13582 *) ac_try_echo=$ac_try;;
13583esac
13584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13585 (eval "$ac_compile") 2>conftest.er1
13586 ac_status=$?
13587 grep -v '^ *+' conftest.er1 >conftest.err
13588 rm -f conftest.er1
13589 cat conftest.err >&5
13590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13591 (exit $ac_status); } && {
13592 test -z "$ac_c_werror_flag" ||
13593 test ! -s conftest.err
13594 } && test -s conftest.$ac_objext; then
13595 ac_lo=0 ac_mid=0
13596 while :; do
13597 cat >conftest.$ac_ext <<_ACEOF
13598/* confdefs.h. */
13599_ACEOF
13600cat confdefs.h >>conftest.$ac_ext
13601cat >>conftest.$ac_ext <<_ACEOF
13602/* end confdefs.h. */
13603
13604#ifdef HAVE_SYS_TYPES_H
13605#include <sys/types.h>
13606#endif
13607#ifdef HAVE_TIME_H
13608#include <time.h>
13609#endif
13610
13611
13612 typedef time_t ac__type_sizeof_;
13613int
13614main ()
13615{
13616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13617test_array [0] = 0
13618
13619 ;
13620 return 0;
13621}
13622_ACEOF
13623rm -f conftest.$ac_objext
13624if { (ac_try="$ac_compile"
13625case "(($ac_try" in
13626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13627 *) ac_try_echo=$ac_try;;
13628esac
13629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13630 (eval "$ac_compile") 2>conftest.er1
13631 ac_status=$?
13632 grep -v '^ *+' conftest.er1 >conftest.err
13633 rm -f conftest.er1
13634 cat conftest.err >&5
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); } && {
13637 test -z "$ac_c_werror_flag" ||
13638 test ! -s conftest.err
13639 } && test -s conftest.$ac_objext; then
13640 ac_hi=$ac_mid; break
13641else
13642 echo "$as_me: failed program was:" >&5
13643sed 's/^/| /' conftest.$ac_ext >&5
13644
13645 ac_lo=`expr $ac_mid + 1`
13646 if test $ac_lo -le $ac_mid; then
13647 ac_lo= ac_hi=
13648 break
13649 fi
13650 ac_mid=`expr 2 '*' $ac_mid + 1`
13651fi
13652
13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13654 done
13655else
13656 echo "$as_me: failed program was:" >&5
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
13659 cat >conftest.$ac_ext <<_ACEOF
13660/* confdefs.h. */
13661_ACEOF
13662cat confdefs.h >>conftest.$ac_ext
13663cat >>conftest.$ac_ext <<_ACEOF
13664/* end confdefs.h. */
13665
13666#ifdef HAVE_SYS_TYPES_H
13667#include <sys/types.h>
13668#endif
13669#ifdef HAVE_TIME_H
13670#include <time.h>
13671#endif
13672
13673
13674 typedef time_t ac__type_sizeof_;
13675int
13676main ()
13677{
13678static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13679test_array [0] = 0
13680
13681 ;
13682 return 0;
13683}
13684_ACEOF
13685rm -f conftest.$ac_objext
13686if { (ac_try="$ac_compile"
13687case "(($ac_try" in
13688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13689 *) ac_try_echo=$ac_try;;
13690esac
13691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13692 (eval "$ac_compile") 2>conftest.er1
13693 ac_status=$?
13694 grep -v '^ *+' conftest.er1 >conftest.err
13695 rm -f conftest.er1
13696 cat conftest.err >&5
13697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13698 (exit $ac_status); } && {
13699 test -z "$ac_c_werror_flag" ||
13700 test ! -s conftest.err
13701 } && test -s conftest.$ac_objext; then
13702 ac_hi=-1 ac_mid=-1
13703 while :; do
13704 cat >conftest.$ac_ext <<_ACEOF
13705/* confdefs.h. */
13706_ACEOF
13707cat confdefs.h >>conftest.$ac_ext
13708cat >>conftest.$ac_ext <<_ACEOF
13709/* end confdefs.h. */
13710
13711#ifdef HAVE_SYS_TYPES_H
13712#include <sys/types.h>
13713#endif
13714#ifdef HAVE_TIME_H
13715#include <time.h>
13716#endif
13717
13718
13719 typedef time_t ac__type_sizeof_;
13720int
13721main ()
13722{
13723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13724test_array [0] = 0
13725
13726 ;
13727 return 0;
13728}
13729_ACEOF
13730rm -f conftest.$ac_objext
13731if { (ac_try="$ac_compile"
13732case "(($ac_try" in
13733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13734 *) ac_try_echo=$ac_try;;
13735esac
13736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13737 (eval "$ac_compile") 2>conftest.er1
13738 ac_status=$?
13739 grep -v '^ *+' conftest.er1 >conftest.err
13740 rm -f conftest.er1
13741 cat conftest.err >&5
13742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13743 (exit $ac_status); } && {
13744 test -z "$ac_c_werror_flag" ||
13745 test ! -s conftest.err
13746 } && test -s conftest.$ac_objext; then
13747 ac_lo=$ac_mid; break
13748else
13749 echo "$as_me: failed program was:" >&5
13750sed 's/^/| /' conftest.$ac_ext >&5
13751
13752 ac_hi=`expr '(' $ac_mid ')' - 1`
13753 if test $ac_mid -le $ac_hi; then
13754 ac_lo= ac_hi=
13755 break
13756 fi
13757 ac_mid=`expr 2 '*' $ac_mid`
13758fi
13759
13760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13761 done
13762else
13763 echo "$as_me: failed program was:" >&5
13764sed 's/^/| /' conftest.$ac_ext >&5
13765
13766 ac_lo= ac_hi=
13767fi
13768
13769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770fi
13771
13772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13773# Binary search between lo and hi bounds.
13774while test "x$ac_lo" != "x$ac_hi"; do
13775 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13776 cat >conftest.$ac_ext <<_ACEOF
13777/* confdefs.h. */
13778_ACEOF
13779cat confdefs.h >>conftest.$ac_ext
13780cat >>conftest.$ac_ext <<_ACEOF
13781/* end confdefs.h. */
13782
13783#ifdef HAVE_SYS_TYPES_H
13784#include <sys/types.h>
13785#endif
13786#ifdef HAVE_TIME_H
13787#include <time.h>
13788#endif
13789
13790
13791 typedef time_t ac__type_sizeof_;
13792int
13793main ()
13794{
13795static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13796test_array [0] = 0
13797
13798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext
13803if { (ac_try="$ac_compile"
13804case "(($ac_try" in
13805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13806 *) ac_try_echo=$ac_try;;
13807esac
13808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13809 (eval "$ac_compile") 2>conftest.er1
13810 ac_status=$?
13811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
13814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13815 (exit $ac_status); } && {
13816 test -z "$ac_c_werror_flag" ||
13817 test ! -s conftest.err
13818 } && test -s conftest.$ac_objext; then
13819 ac_hi=$ac_mid
13820else
13821 echo "$as_me: failed program was:" >&5
13822sed 's/^/| /' conftest.$ac_ext >&5
13823
13824 ac_lo=`expr '(' $ac_mid ')' + 1`
13825fi
13826
13827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13828done
13829case $ac_lo in
13830?*) ac_cv_sizeof_time_t=$ac_lo;;
13831'') if test "$ac_cv_type_time_t" = yes; then
13832 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13833See \`config.log' for more details." >&5
13834echo "$as_me: error: cannot compute sizeof (time_t)
13835See \`config.log' for more details." >&2;}
13836 { (exit 77); exit 77; }; }
13837 else
13838 ac_cv_sizeof_time_t=0
13839 fi ;;
13840esac
13841else
13842 cat >conftest.$ac_ext <<_ACEOF
13843/* confdefs.h. */
13844_ACEOF
13845cat confdefs.h >>conftest.$ac_ext
13846cat >>conftest.$ac_ext <<_ACEOF
13847/* end confdefs.h. */
13848
13849#ifdef HAVE_SYS_TYPES_H
13850#include <sys/types.h>
13851#endif
13852#ifdef HAVE_TIME_H
13853#include <time.h>
13854#endif
13855
13856
13857 typedef time_t ac__type_sizeof_;
13858static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13859static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13860#include <stdio.h>
13861#include <stdlib.h>
13862int
13863main ()
13864{
13865
13866 FILE *f = fopen ("conftest.val", "w");
13867 if (! f)
13868 return 1;
13869 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13870 {
13871 long int i = longval ();
13872 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13873 return 1;
13874 fprintf (f, "%ld\n", i);
13875 }
13876 else
13877 {
13878 unsigned long int i = ulongval ();
13879 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13880 return 1;
13881 fprintf (f, "%lu\n", i);
13882 }
13883 return ferror (f) || fclose (f) != 0;
13884
13885 ;
13886 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013887}
Martin v. Löwis11437992002-04-12 09:54:03 +000013888_ACEOF
13889rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013890if { (ac_try="$ac_link"
13891case "(($ac_try" in
13892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13893 *) ac_try_echo=$ac_try;;
13894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013900 { (case "(($ac_try" in
13901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13902 *) ac_try_echo=$ac_try;;
13903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013905 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013909 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013910else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013911 echo "$as_me: program exited with status $ac_status" >&5
13912echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013913sed 's/^/| /' conftest.$ac_ext >&5
13914
Martin v. Löwis11437992002-04-12 09:54:03 +000013915( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013916if test "$ac_cv_type_time_t" = yes; then
13917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13918See \`config.log' for more details." >&5
13919echo "$as_me: error: cannot compute sizeof (time_t)
13920See \`config.log' for more details." >&2;}
13921 { (exit 77); exit 77; }; }
13922 else
13923 ac_cv_sizeof_time_t=0
13924 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926rm -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 +000013927fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013928rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013929fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013930{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13931echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013933
13934
Martin v. Löwis11437992002-04-12 09:54:03 +000013935cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013936#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013937_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013938
Michael W. Hudson54241132001-12-07 15:38:26 +000013939
13940
Trent Mick635f6fb2000-08-23 21:33:05 +000013941# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013942ac_save_cc="$CC"
13943if test "$ac_cv_kpthread" = "yes"
13944then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013945elif test "$ac_cv_kthread" = "yes"
13946then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013947elif test "$ac_cv_pthread" = "yes"
13948then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013949fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013950{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13951echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013952have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013953cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013954/* confdefs.h. */
13955_ACEOF
13956cat confdefs.h >>conftest.$ac_ext
13957cat >>conftest.$ac_ext <<_ACEOF
13958/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013959#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013960int
13961main ()
13962{
Guido van Rossum12580492000-09-24 16:47:19 +000013963pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013964 ;
13965 return 0;
13966}
13967_ACEOF
13968rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969if { (ac_try="$ac_compile"
13970case "(($ac_try" in
13971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13972 *) ac_try_echo=$ac_try;;
13973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013977 grep -v '^ *+' conftest.er1 >conftest.err
13978 rm -f conftest.er1
13979 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981 (exit $ac_status); } && {
13982 test -z "$ac_c_werror_flag" ||
13983 test ! -s conftest.err
13984 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013985 have_pthread_t=yes
13986else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013988sed 's/^/| /' conftest.$ac_ext >&5
13989
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990
Trent Mick635f6fb2000-08-23 21:33:05 +000013991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992
13993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13995echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013996if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013997 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13998echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13999if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014000 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014001else
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014003/* confdefs.h. */
14004_ACEOF
14005cat confdefs.h >>conftest.$ac_ext
14006cat >>conftest.$ac_ext <<_ACEOF
14007/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014008
14009#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014010#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014011#endif
14012
14013
14014typedef pthread_t ac__type_new_;
14015int
14016main ()
14017{
14018if ((ac__type_new_ *) 0)
14019 return 0;
14020if (sizeof (ac__type_new_))
14021 return 0;
14022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (ac_try="$ac_compile"
14028case "(($ac_try" in
14029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14030 *) ac_try_echo=$ac_try;;
14031esac
14032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14033 (eval "$ac_compile") 2>conftest.er1
14034 ac_status=$?
14035 grep -v '^ *+' conftest.er1 >conftest.err
14036 rm -f conftest.er1
14037 cat conftest.err >&5
14038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14039 (exit $ac_status); } && {
14040 test -z "$ac_c_werror_flag" ||
14041 test ! -s conftest.err
14042 } && test -s conftest.$ac_objext; then
14043 ac_cv_type_pthread_t=yes
14044else
14045 echo "$as_me: failed program was:" >&5
14046sed 's/^/| /' conftest.$ac_ext >&5
14047
14048 ac_cv_type_pthread_t=no
14049fi
14050
14051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14052fi
14053{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14054echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14055
14056# The cast to long int works around a bug in the HP C Compiler
14057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14059# This bug is HP SR number 8606223364.
14060{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14061echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14062if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14063 echo $ECHO_N "(cached) $ECHO_C" >&6
14064else
14065 if test "$cross_compiling" = yes; then
14066 # Depending upon the size, compute the lo and hi bounds.
14067cat >conftest.$ac_ext <<_ACEOF
14068/* confdefs.h. */
14069_ACEOF
14070cat confdefs.h >>conftest.$ac_ext
14071cat >>conftest.$ac_ext <<_ACEOF
14072/* end confdefs.h. */
14073
14074#ifdef HAVE_PTHREAD_H
14075#include <pthread.h>
14076#endif
14077
14078
14079 typedef pthread_t ac__type_sizeof_;
14080int
14081main ()
14082{
14083static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14084test_array [0] = 0
14085
14086 ;
14087 return 0;
14088}
14089_ACEOF
14090rm -f conftest.$ac_objext
14091if { (ac_try="$ac_compile"
14092case "(($ac_try" in
14093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094 *) ac_try_echo=$ac_try;;
14095esac
14096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14097 (eval "$ac_compile") 2>conftest.er1
14098 ac_status=$?
14099 grep -v '^ *+' conftest.er1 >conftest.err
14100 rm -f conftest.er1
14101 cat conftest.err >&5
14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14103 (exit $ac_status); } && {
14104 test -z "$ac_c_werror_flag" ||
14105 test ! -s conftest.err
14106 } && test -s conftest.$ac_objext; then
14107 ac_lo=0 ac_mid=0
14108 while :; do
14109 cat >conftest.$ac_ext <<_ACEOF
14110/* confdefs.h. */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h. */
14115
14116#ifdef HAVE_PTHREAD_H
14117#include <pthread.h>
14118#endif
14119
14120
14121 typedef pthread_t ac__type_sizeof_;
14122int
14123main ()
14124{
14125static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14126test_array [0] = 0
14127
14128 ;
14129 return 0;
14130}
14131_ACEOF
14132rm -f conftest.$ac_objext
14133if { (ac_try="$ac_compile"
14134case "(($ac_try" in
14135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136 *) ac_try_echo=$ac_try;;
14137esac
14138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14139 (eval "$ac_compile") 2>conftest.er1
14140 ac_status=$?
14141 grep -v '^ *+' conftest.er1 >conftest.err
14142 rm -f conftest.er1
14143 cat conftest.err >&5
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); } && {
14146 test -z "$ac_c_werror_flag" ||
14147 test ! -s conftest.err
14148 } && test -s conftest.$ac_objext; then
14149 ac_hi=$ac_mid; break
14150else
14151 echo "$as_me: failed program was:" >&5
14152sed 's/^/| /' conftest.$ac_ext >&5
14153
14154 ac_lo=`expr $ac_mid + 1`
14155 if test $ac_lo -le $ac_mid; then
14156 ac_lo= ac_hi=
14157 break
14158 fi
14159 ac_mid=`expr 2 '*' $ac_mid + 1`
14160fi
14161
14162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14163 done
14164else
14165 echo "$as_me: failed program was:" >&5
14166sed 's/^/| /' conftest.$ac_ext >&5
14167
14168 cat >conftest.$ac_ext <<_ACEOF
14169/* confdefs.h. */
14170_ACEOF
14171cat confdefs.h >>conftest.$ac_ext
14172cat >>conftest.$ac_ext <<_ACEOF
14173/* end confdefs.h. */
14174
14175#ifdef HAVE_PTHREAD_H
14176#include <pthread.h>
14177#endif
14178
14179
14180 typedef pthread_t ac__type_sizeof_;
14181int
14182main ()
14183{
14184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14185test_array [0] = 0
14186
14187 ;
14188 return 0;
14189}
14190_ACEOF
14191rm -f conftest.$ac_objext
14192if { (ac_try="$ac_compile"
14193case "(($ac_try" in
14194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14195 *) ac_try_echo=$ac_try;;
14196esac
14197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14198 (eval "$ac_compile") 2>conftest.er1
14199 ac_status=$?
14200 grep -v '^ *+' conftest.er1 >conftest.err
14201 rm -f conftest.er1
14202 cat conftest.err >&5
14203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14204 (exit $ac_status); } && {
14205 test -z "$ac_c_werror_flag" ||
14206 test ! -s conftest.err
14207 } && test -s conftest.$ac_objext; then
14208 ac_hi=-1 ac_mid=-1
14209 while :; do
14210 cat >conftest.$ac_ext <<_ACEOF
14211/* confdefs.h. */
14212_ACEOF
14213cat confdefs.h >>conftest.$ac_ext
14214cat >>conftest.$ac_ext <<_ACEOF
14215/* end confdefs.h. */
14216
14217#ifdef HAVE_PTHREAD_H
14218#include <pthread.h>
14219#endif
14220
14221
14222 typedef pthread_t ac__type_sizeof_;
14223int
14224main ()
14225{
14226static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14227test_array [0] = 0
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233rm -f conftest.$ac_objext
14234if { (ac_try="$ac_compile"
14235case "(($ac_try" in
14236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14237 *) ac_try_echo=$ac_try;;
14238esac
14239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14240 (eval "$ac_compile") 2>conftest.er1
14241 ac_status=$?
14242 grep -v '^ *+' conftest.er1 >conftest.err
14243 rm -f conftest.er1
14244 cat conftest.err >&5
14245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14246 (exit $ac_status); } && {
14247 test -z "$ac_c_werror_flag" ||
14248 test ! -s conftest.err
14249 } && test -s conftest.$ac_objext; then
14250 ac_lo=$ac_mid; break
14251else
14252 echo "$as_me: failed program was:" >&5
14253sed 's/^/| /' conftest.$ac_ext >&5
14254
14255 ac_hi=`expr '(' $ac_mid ')' - 1`
14256 if test $ac_mid -le $ac_hi; then
14257 ac_lo= ac_hi=
14258 break
14259 fi
14260 ac_mid=`expr 2 '*' $ac_mid`
14261fi
14262
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264 done
14265else
14266 echo "$as_me: failed program was:" >&5
14267sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 ac_lo= ac_hi=
14270fi
14271
14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14273fi
14274
14275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14276# Binary search between lo and hi bounds.
14277while test "x$ac_lo" != "x$ac_hi"; do
14278 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14279 cat >conftest.$ac_ext <<_ACEOF
14280/* confdefs.h. */
14281_ACEOF
14282cat confdefs.h >>conftest.$ac_ext
14283cat >>conftest.$ac_ext <<_ACEOF
14284/* end confdefs.h. */
14285
14286#ifdef HAVE_PTHREAD_H
14287#include <pthread.h>
14288#endif
14289
14290
14291 typedef pthread_t ac__type_sizeof_;
14292int
14293main ()
14294{
14295static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14296test_array [0] = 0
14297
14298 ;
14299 return 0;
14300}
14301_ACEOF
14302rm -f conftest.$ac_objext
14303if { (ac_try="$ac_compile"
14304case "(($ac_try" in
14305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14306 *) ac_try_echo=$ac_try;;
14307esac
14308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14309 (eval "$ac_compile") 2>conftest.er1
14310 ac_status=$?
14311 grep -v '^ *+' conftest.er1 >conftest.err
14312 rm -f conftest.er1
14313 cat conftest.err >&5
14314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14315 (exit $ac_status); } && {
14316 test -z "$ac_c_werror_flag" ||
14317 test ! -s conftest.err
14318 } && test -s conftest.$ac_objext; then
14319 ac_hi=$ac_mid
14320else
14321 echo "$as_me: failed program was:" >&5
14322sed 's/^/| /' conftest.$ac_ext >&5
14323
14324 ac_lo=`expr '(' $ac_mid ')' + 1`
14325fi
14326
14327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14328done
14329case $ac_lo in
14330?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14331'') if test "$ac_cv_type_pthread_t" = yes; then
14332 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14333See \`config.log' for more details." >&5
14334echo "$as_me: error: cannot compute sizeof (pthread_t)
14335See \`config.log' for more details." >&2;}
14336 { (exit 77); exit 77; }; }
14337 else
14338 ac_cv_sizeof_pthread_t=0
14339 fi ;;
14340esac
14341else
14342 cat >conftest.$ac_ext <<_ACEOF
14343/* confdefs.h. */
14344_ACEOF
14345cat confdefs.h >>conftest.$ac_ext
14346cat >>conftest.$ac_ext <<_ACEOF
14347/* end confdefs.h. */
14348
14349#ifdef HAVE_PTHREAD_H
14350#include <pthread.h>
14351#endif
14352
14353
14354 typedef pthread_t ac__type_sizeof_;
14355static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14356static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14357#include <stdio.h>
14358#include <stdlib.h>
14359int
14360main ()
14361{
14362
14363 FILE *f = fopen ("conftest.val", "w");
14364 if (! f)
14365 return 1;
14366 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14367 {
14368 long int i = longval ();
14369 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14370 return 1;
14371 fprintf (f, "%ld\n", i);
14372 }
14373 else
14374 {
14375 unsigned long int i = ulongval ();
14376 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14377 return 1;
14378 fprintf (f, "%lu\n", i);
14379 }
14380 return ferror (f) || fclose (f) != 0;
14381
14382 ;
14383 return 0;
14384}
Martin v. Löwis11437992002-04-12 09:54:03 +000014385_ACEOF
14386rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014387if { (ac_try="$ac_link"
14388case "(($ac_try" in
14389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14390 *) ac_try_echo=$ac_try;;
14391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014397 { (case "(($ac_try" in
14398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399 *) ac_try_echo=$ac_try;;
14400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014406 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014408 echo "$as_me: program exited with status $ac_status" >&5
14409echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014410sed 's/^/| /' conftest.$ac_ext >&5
14411
Martin v. Löwis11437992002-04-12 09:54:03 +000014412( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014413if test "$ac_cv_type_pthread_t" = yes; then
14414 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14415See \`config.log' for more details." >&5
14416echo "$as_me: error: cannot compute sizeof (pthread_t)
14417See \`config.log' for more details." >&2;}
14418 { (exit 77); exit 77; }; }
14419 else
14420 ac_cv_sizeof_pthread_t=0
14421 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423rm -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 +000014424fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014425rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014426fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014427{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014428echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014430
14431
Martin v. Löwis11437992002-04-12 09:54:03 +000014432cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014433#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014435
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014436
Trent Mick635f6fb2000-08-23 21:33:05 +000014437fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014438CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014439
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014440{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14441echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014442# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014443if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444 enableval=$enable_toolbox_glue;
14445fi
Jack Jansene578a632001-08-15 01:27:14 +000014446
14447
14448if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014449then
Jack Jansene578a632001-08-15 01:27:14 +000014450 case $ac_sys_system/$ac_sys_release in
14451 Darwin/*)
14452 enable_toolbox_glue="yes";;
14453 *)
14454 enable_toolbox_glue="no";;
14455 esac
14456fi
14457case "$enable_toolbox_glue" in
14458yes)
Jack Jansene578a632001-08-15 01:27:14 +000014459 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014460 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014463#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014465
14466 ;;
14467*)
Jack Jansene578a632001-08-15 01:27:14 +000014468 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014469 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014470 ;;
14471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014472{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14473echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014474
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014475
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014476
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014477case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014478 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014479 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14480 ;;
14481 Darwin/*)
14482 OTHER_LIBTOOL_OPT=""
14483 ;;
14484esac
14485
14486
Ronald Oussoren25967582009-09-06 10:00:26 +000014487ARCH_RUN_32BIT=""
14488
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014489case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014490 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014491 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14492 if test "${enable_universalsdk}"; then
14493 :
14494 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014495 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014496 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014499 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014500 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14501 if test ${gcc_version} '<' 4.0
14502 then
14503 LIBTOOL_CRUFT="-lcc_dynamic"
14504 else
14505 LIBTOOL_CRUFT=""
14506 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014507 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014508 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014509else
14510 cat >conftest.$ac_ext <<_ACEOF
14511/* confdefs.h. */
14512_ACEOF
14513cat confdefs.h >>conftest.$ac_ext
14514cat >>conftest.$ac_ext <<_ACEOF
14515/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014516
Ronald Oussoren25967582009-09-06 10:00:26 +000014517 #include <unistd.h>
14518 int main(int argc, char*argv[])
14519 {
14520 if (sizeof(long) == 4) {
14521 return 0;
14522 } else {
14523 return 1;
14524 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014525
Ronald Oussoren25967582009-09-06 10:00:26 +000014526_ACEOF
14527rm -f conftest$ac_exeext
14528if { (ac_try="$ac_link"
14529case "(($ac_try" in
14530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14531 *) ac_try_echo=$ac_try;;
14532esac
14533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14534 (eval "$ac_link") 2>&5
14535 ac_status=$?
14536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14537 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14538 { (case "(($ac_try" in
14539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14540 *) ac_try_echo=$ac_try;;
14541esac
14542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14543 (eval "$ac_try") 2>&5
14544 ac_status=$?
14545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14546 (exit $ac_status); }; }; then
14547 ac_osx_32bit=yes
14548else
14549 echo "$as_me: program exited with status $ac_status" >&5
14550echo "$as_me: failed program was:" >&5
14551sed 's/^/| /' conftest.$ac_ext >&5
14552
14553( exit $ac_status )
14554ac_osx_32bit=no
14555fi
14556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14557fi
14558
14559
14560
14561 if test "${ac_osx_32bit}" = "yes"; then
14562 case `arch` in
14563 i386)
14564 MACOSX_DEFAULT_ARCH="i386"
14565 ;;
14566 ppc)
14567 MACOSX_DEFAULT_ARCH="ppc"
14568 ;;
14569 *)
14570 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14571echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14572 { (exit 1); exit 1; }; }
14573 ;;
14574 esac
14575 else
14576 case `arch` in
14577 i386)
14578 MACOSX_DEFAULT_ARCH="x86_64"
14579 ;;
14580 ppc)
14581 MACOSX_DEFAULT_ARCH="ppc64"
14582 ;;
14583 *)
14584 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14585echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14586 { (exit 1); exit 1; }; }
14587 ;;
14588 esac
14589
14590 #ARCH_RUN_32BIT="true"
14591 fi
14592
14593 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014594 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014595 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014596esac
14597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014598{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14599echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014600if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014602 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014604 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014605
Martin v. Löwis11437992002-04-12 09:54:03 +000014606cat >>confdefs.h <<\_ACEOF
14607#define WITH_NEXT_FRAMEWORK 1
14608_ACEOF
14609
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014610 { echo "$as_me:$LINENO: result: yes" >&5
14611echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014612 if test $enable_shared = "yes"
14613 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014614 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14615echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014616 { (exit 1); exit 1; }; }
14617 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014618else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014619 { echo "$as_me:$LINENO: result: no" >&5
14620echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014621fi
14622
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014623{ echo "$as_me:$LINENO: checking for dyld" >&5
14624echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014625case $ac_sys_system/$ac_sys_release in
14626 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014627
Martin v. Löwis11437992002-04-12 09:54:03 +000014628cat >>confdefs.h <<\_ACEOF
14629#define WITH_DYLD 1
14630_ACEOF
14631
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014632 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14633echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014634 ;;
14635 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014636 { echo "$as_me:$LINENO: result: no" >&5
14637echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014638 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014639esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014640
Guido van Rossum0a516c91994-09-12 10:58:40 +000014641# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014642
Michael W. Hudson54241132001-12-07 15:38:26 +000014643
14644
14645
14646
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014648# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014649{ echo "$as_me:$LINENO: checking SO" >&5
14650echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014651if test -z "$SO"
14652then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014653 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014654 hp*|HP*)
14655 case `uname -m` in
14656 ia64) SO=.so;;
14657 *) SO=.sl;;
14658 esac
14659 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014660 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014661 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014662 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014663else
14664 # this might also be a termcap variable, see #610332
14665 echo
14666 echo '====================================================================='
14667 echo '+ +'
14668 echo '+ WARNING: You have set SO in your environment. +'
14669 echo '+ Do you really mean to change the extension for shared libraries? +'
14670 echo '+ Continuing in 10 seconds to let you to ponder. +'
14671 echo '+ +'
14672 echo '====================================================================='
14673 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014674fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014675{ echo "$as_me:$LINENO: result: $SO" >&5
14676echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014677
Ronald Oussoren79f90492009-01-02 10:44:46 +000014678
Neal Norwitz58e28882006-05-19 07:00:58 +000014679cat >>confdefs.h <<_ACEOF
14680#define SHLIB_EXT "$SO"
14681_ACEOF
14682
Guido van Rossum0a516c91994-09-12 10:58:40 +000014683# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014684# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014685# (Shared libraries in this instance are shared modules to be loaded into
14686# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014687{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14688echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689if test -z "$LDSHARED"
14690then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014691 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014692 AIX*)
14693 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014694 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014695 ;;
14696 BeOS*)
14697 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014698 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014699 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014700 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014701 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014703 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014704 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014705 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014706 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014707 hp*|HP*)
14708 if test "$GCC" = "yes"
14709 then LDSHARED='$(CC) -shared'
14710 else LDSHARED='ld -b';
14711 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014712 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014713 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014714 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14715 if test "$enable_framework" ; then
14716 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014717 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14718 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014719 else
14720 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014721 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014722 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014723 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014724 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14725 if test "$enable_framework" ; then
14726 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014727 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14728 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014729 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014730 # No framework, use the Python app as bundle-loader
14731 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014732 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014733 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014734 Darwin/*)
14735 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14736 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014737
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014738 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014739 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014740 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014741 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014742 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014743 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14744 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014745 else
14746 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14747 if test "$enable_framework" ; then
14748 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014749 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14750 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014751 else
14752 # No framework, use the Python app as bundle-loader
14753 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14754 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14755 fi
14756 fi
14757 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014758 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014759 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014760 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014761 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014762 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014763 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014764 else
14765 LDSHARED="ld -Bshareable ${LDFLAGS}"
14766 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014767 OpenBSD*)
14768 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14769 then
14770 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14771 else
14772 case `uname -r` in
14773 [01].* | 2.[0-7] | 2.[0-7].*)
14774 LDSHARED="ld -Bshareable ${LDFLAGS}"
14775 ;;
14776 *)
14777 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14778 ;;
14779 esac
14780 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014781 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014782 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014783 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014784 then LDSHARED='$(CC) -shared'
14785 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014786 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014787 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014788 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014789 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014790 *) LDSHARED="ld";;
14791 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014792fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014793{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14794echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014795BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014797# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014798{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14799echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014800if test -z "$CCSHARED"
14801then
Guido van Rossum07397971997-04-29 21:49:50 +000014802 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014803 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014804 then CCSHARED="-fPIC";
14805 elif test `uname -p` = sparc;
14806 then CCSHARED="-xcode=pic32";
14807 else CCSHARED="-Kpic";
14808 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014809 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014810 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014811 else CCSHARED="+z";
14812 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014813 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014814 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014815 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014816 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014817 if test "$GCC" = "yes"
14818 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014819 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014820 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014821 SCO_SV*)
14822 if test "$GCC" = "yes"
14823 then CCSHARED="-fPIC"
14824 else CCSHARED="-Kpic -belf"
14825 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014826 IRIX*/6*) case $CC in
14827 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014828 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014829 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014830 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014831 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014832fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014833{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14834echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014835# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014836# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014837{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14838echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014839if test -z "$LINKFORSHARED"
14840then
Guido van Rossum07397971997-04-29 21:49:50 +000014841 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014842 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014843 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014844 LINKFORSHARED="-Wl,-E -Wl,+s";;
14845# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014846 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014847 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014848 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014850 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14851 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014852 # not used by the core itself but which needs to be in the core so
14853 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014854 # -prebind is no longer used, because it actually seems to give a
14855 # slowdown in stead of a speedup, maybe due to the large number of
14856 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014857
14858 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014859 if test "$enable_framework"
14860 then
Jack Jansenda49e192005-01-07 13:08:22 +000014861 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014862 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014863 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014864 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014865 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014866 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014867 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014868 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14869 then
14870 LINKFORSHARED="-Wl,--export-dynamic"
14871 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014872 SunOS/5*) case $CC in
14873 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014874 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014875 then
14876 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014877 fi;;
14878 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014879 CYGWIN*)
14880 if test $enable_shared = "no"
14881 then
14882 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14883 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014884 QNX*)
14885 # -Wl,-E causes the symbols to be added to the dynamic
14886 # symbol table so that they can be found when a module
14887 # is loaded. -N 2048K causes the stack size to be set
14888 # to 2048 kilobytes so that the stack doesn't overflow
14889 # when running test_compile.py.
14890 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014891 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014892fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014893{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14894echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014895
Michael W. Hudson54241132001-12-07 15:38:26 +000014896
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014898{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14899echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014900if test ! "$LIBRARY" = "$LDLIBRARY"
14901then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014902 case $ac_sys_system in
14903 CYGWIN*)
14904 # Cygwin needs CCSHARED when building extension DLLs
14905 # but not when building the interpreter DLL.
14906 CFLAGSFORSHARED='';;
14907 *)
14908 CFLAGSFORSHARED='$(CCSHARED)'
14909 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014910fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014911{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14912echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014913
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014914# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14915# library (with --enable-shared).
14916# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014917# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14918# if it is not required, since it creates a dependency of the shared library
14919# to LIBS. This, in turn, means that applications linking the shared libpython
14920# don't need to link LIBS explicitly. The default should be only changed
14921# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014922
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014923{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14924echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014925case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014926 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014927 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014928esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014929{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14930echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014931
14932
Guido van Rossum627b2d71993-12-24 10:39:16 +000014933# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014935{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14936echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014937if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014939else
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014941LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014943/* confdefs.h. */
14944_ACEOF
14945cat confdefs.h >>conftest.$ac_ext
14946cat >>conftest.$ac_ext <<_ACEOF
14947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014948
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949/* Override any GCC internal prototype to avoid an error.
14950 Use char because int might match the return type of a GCC
14951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014952#ifdef __cplusplus
14953extern "C"
14954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014955char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014956int
14957main ()
14958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965if { (ac_try="$ac_link"
14966case "(($ac_try" in
14967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14968 *) ac_try_echo=$ac_try;;
14969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014973 grep -v '^ *+' conftest.er1 >conftest.err
14974 rm -f conftest.er1
14975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 (exit $ac_status); } && {
14978 test -z "$ac_c_werror_flag" ||
14979 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014980 } && test -s conftest$ac_exeext &&
14981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014982 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014985sed 's/^/| /' conftest.$ac_ext >&5
14986
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014989
14990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014992LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014993fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014994{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14995echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14996if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 cat >>confdefs.h <<_ACEOF
14998#define HAVE_LIBDL 1
14999_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015000
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015001 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015002
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015003fi
15004 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015006{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15007echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015008if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015010else
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015012LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015014/* confdefs.h. */
15015_ACEOF
15016cat confdefs.h >>conftest.$ac_ext
15017cat >>conftest.$ac_ext <<_ACEOF
15018/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020/* Override any GCC internal prototype to avoid an error.
15021 Use char because int might match the return type of a GCC
15022 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015023#ifdef __cplusplus
15024extern "C"
15025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015026char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027int
15028main ()
15029{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 ;
15032 return 0;
15033}
15034_ACEOF
15035rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015036if { (ac_try="$ac_link"
15037case "(($ac_try" in
15038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15039 *) ac_try_echo=$ac_try;;
15040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015044 grep -v '^ *+' conftest.er1 >conftest.err
15045 rm -f conftest.er1
15046 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 (exit $ac_status); } && {
15049 test -z "$ac_c_werror_flag" ||
15050 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015051 } && test -s conftest$ac_exeext &&
15052 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015056sed 's/^/| /' conftest.$ac_ext >&5
15057
Martin v. Löwiseba40652007-08-30 20:10:57 +000015058 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015060
15061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015063LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015064fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015065{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15066echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15067if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 cat >>confdefs.h <<_ACEOF
15069#define HAVE_LIBDLD 1
15070_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015071
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015072 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074fi
15075 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015076
Ronald Oussoren79f90492009-01-02 10:44:46 +000015077# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015078if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015079 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15080echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015081if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015082 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015083else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015084 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015086/* confdefs.h. */
15087_ACEOF
15088cat confdefs.h >>conftest.$ac_ext
15089cat >>conftest.$ac_ext <<_ACEOF
15090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015091
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092/* Override any GCC internal prototype to avoid an error.
15093 Use char because int might match the return type of a GCC
15094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015095#ifdef __cplusplus
15096extern "C"
15097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015098char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015099int
15100main ()
15101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 ;
15104 return 0;
15105}
15106_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107for ac_lib in '' pthread rt posix4; do
15108 if test -z "$ac_lib"; then
15109 ac_res="none required"
15110 else
15111 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015112 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113 fi
15114 rm -f conftest.$ac_objext conftest$ac_exeext
15115if { (ac_try="$ac_link"
15116case "(($ac_try" in
15117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15118 *) ac_try_echo=$ac_try;;
15119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015121 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015122 ac_status=$?
15123 grep -v '^ *+' conftest.er1 >conftest.err
15124 rm -f conftest.er1
15125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127 (exit $ac_status); } && {
15128 test -z "$ac_c_werror_flag" ||
15129 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015130 } && test -s conftest$ac_exeext &&
15131 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015134 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015135sed 's/^/| /' conftest.$ac_ext >&5
15136
Martin v. Löwiseba40652007-08-30 20:10:57 +000015137
Brett Cannon19fab762007-06-02 03:02:29 +000015138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139
15140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15141 conftest$ac_exeext
15142 if test "${ac_cv_search_sem_init+set}" = set; then
15143 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145done
15146if test "${ac_cv_search_sem_init+set}" = set; then
15147 :
15148else
15149 ac_cv_search_sem_init=no
15150fi
15151rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015152LIBS=$ac_func_search_save_LIBS
15153fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015154{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15155echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015156ac_res=$ac_cv_search_sem_init
15157if test "$ac_res" != no; then
15158 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015159
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015160fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015161 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015162 # posix4 on Solaris 2.6
15163 # pthread (first!) on Linux
15164fi
15165
Martin v. Löwis19d17342003-06-14 21:03:05 +000015166# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015167{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15168echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015169if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015170 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015171else
15172 ac_check_lib_save_LIBS=$LIBS
15173LIBS="-lintl $LIBS"
15174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015175/* confdefs.h. */
15176_ACEOF
15177cat confdefs.h >>conftest.$ac_ext
15178cat >>conftest.$ac_ext <<_ACEOF
15179/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015180
Martin v. Löwiseba40652007-08-30 20:10:57 +000015181/* Override any GCC internal prototype to avoid an error.
15182 Use char because int might match the return type of a GCC
15183 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015184#ifdef __cplusplus
15185extern "C"
15186#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015187char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015188int
15189main ()
15190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015192 ;
15193 return 0;
15194}
15195_ACEOF
15196rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197if { (ac_try="$ac_link"
15198case "(($ac_try" in
15199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15200 *) ac_try_echo=$ac_try;;
15201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015205 grep -v '^ *+' conftest.er1 >conftest.err
15206 rm -f conftest.er1
15207 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209 (exit $ac_status); } && {
15210 test -z "$ac_c_werror_flag" ||
15211 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015212 } && test -s conftest$ac_exeext &&
15213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015214 ac_cv_lib_intl_textdomain=yes
15215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015217sed 's/^/| /' conftest.$ac_ext >&5
15218
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221
15222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015224LIBS=$ac_check_lib_save_LIBS
15225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015226{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15227echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15228if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015229
15230cat >>confdefs.h <<\_ACEOF
15231#define WITH_LIBINTL 1
15232_ACEOF
15233
15234fi
15235
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015236
15237# checks for system dependent C++ extensions support
15238case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015239 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15240echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015242/* confdefs.h. */
15243_ACEOF
15244cat confdefs.h >>conftest.$ac_ext
15245cat >>conftest.$ac_ext <<_ACEOF
15246/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015247#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015248int
15249main ()
15250{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015251loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 ;
15253 return 0;
15254}
15255_ACEOF
15256rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257if { (ac_try="$ac_link"
15258case "(($ac_try" in
15259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15260 *) ac_try_echo=$ac_try;;
15261esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015265 grep -v '^ *+' conftest.er1 >conftest.err
15266 rm -f conftest.er1
15267 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 (exit $ac_status); } && {
15270 test -z "$ac_c_werror_flag" ||
15271 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015272 } && test -s conftest$ac_exeext &&
15273 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015274
Martin v. Löwis11437992002-04-12 09:54:03 +000015275cat >>confdefs.h <<\_ACEOF
15276#define AIX_GENUINE_CPLUSPLUS 1
15277_ACEOF
15278
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015279 { echo "$as_me:$LINENO: result: yes" >&5
15280echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015281else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015283sed 's/^/| /' conftest.$ac_ext >&5
15284
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285 { echo "$as_me:$LINENO: result: no" >&5
15286echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288
15289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015290 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015291 *) ;;
15292esac
15293
Guido van Rossum70c7f481998-03-26 18:44:10 +000015294# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015295# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015296{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15297echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015298if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015299 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015300else
Martin v. Löwis11437992002-04-12 09:54:03 +000015301 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015302LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015304/* confdefs.h. */
15305_ACEOF
15306cat confdefs.h >>conftest.$ac_ext
15307cat >>conftest.$ac_ext <<_ACEOF
15308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Martin v. Löwiseba40652007-08-30 20:10:57 +000015310/* Override any GCC internal prototype to avoid an error.
15311 Use char because int might match the return type of a GCC
15312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313#ifdef __cplusplus
15314extern "C"
15315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015316char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015317int
15318main ()
15319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 ;
15322 return 0;
15323}
15324_ACEOF
15325rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326if { (ac_try="$ac_link"
15327case "(($ac_try" in
15328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15329 *) ac_try_echo=$ac_try;;
15330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015334 grep -v '^ *+' conftest.er1 >conftest.err
15335 rm -f conftest.er1
15336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338 (exit $ac_status); } && {
15339 test -z "$ac_c_werror_flag" ||
15340 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015341 } && test -s conftest$ac_exeext &&
15342 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015346sed 's/^/| /' conftest.$ac_ext >&5
15347
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350
15351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015352 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015353LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015354fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015355{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15356echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15357if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015358 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015360 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015361{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15362echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015363if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015365else
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015367LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015369/* confdefs.h. */
15370_ACEOF
15371cat confdefs.h >>conftest.$ac_ext
15372cat >>conftest.$ac_ext <<_ACEOF
15373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375/* Override any GCC internal prototype to avoid an error.
15376 Use char because int might match the return type of a GCC
15377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015378#ifdef __cplusplus
15379extern "C"
15380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015381char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015382int
15383main ()
15384{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ;
15387 return 0;
15388}
15389_ACEOF
15390rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391if { (ac_try="$ac_link"
15392case "(($ac_try" in
15393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15394 *) ac_try_echo=$ac_try;;
15395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015399 grep -v '^ *+' conftest.er1 >conftest.err
15400 rm -f conftest.er1
15401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 (exit $ac_status); } && {
15404 test -z "$ac_c_werror_flag" ||
15405 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015406 } && test -s conftest$ac_exeext &&
15407 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015411sed 's/^/| /' conftest.$ac_ext >&5
15412
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415
15416rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015417 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015418LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015419fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015420{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15421echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15422if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015423 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015424fi
15425 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015426
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015427case "$ac_sys_system" in
15428BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015429{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15430echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015431if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015432 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015433else
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015435LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015442
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443/* Override any GCC internal prototype to avoid an error.
15444 Use char because int might match the return type of a GCC
15445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015446#ifdef __cplusplus
15447extern "C"
15448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015449char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015450int
15451main ()
15452{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015453return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015454 ;
15455 return 0;
15456}
15457_ACEOF
15458rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015459if { (ac_try="$ac_link"
15460case "(($ac_try" in
15461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15462 *) ac_try_echo=$ac_try;;
15463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015465 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015467 grep -v '^ *+' conftest.er1 >conftest.err
15468 rm -f conftest.er1
15469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471 (exit $ac_status); } && {
15472 test -z "$ac_c_werror_flag" ||
15473 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015474 } && test -s conftest$ac_exeext &&
15475 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015479sed 's/^/| /' conftest.$ac_ext >&5
15480
Martin v. Löwiseba40652007-08-30 20:10:57 +000015481 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483
15484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015486LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015487fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015488{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15489echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15490if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015491 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015492fi
15493 # BeOS
15494;;
15495esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015496
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015497{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15498echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015499
Martin v. Löwiseba40652007-08-30 20:10:57 +000015500# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015501if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015502 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015503{ echo "$as_me:$LINENO: result: $withval" >&5
15504echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015505LIBS="$withval $LIBS"
15506
15507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015508 { echo "$as_me:$LINENO: result: no" >&5
15509echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510fi
15511
Guido van Rossum7f43da71994-08-01 12:15:30 +000015512
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015513# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015514{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15515echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015516
Martin v. Löwiseba40652007-08-30 20:10:57 +000015517# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015518if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519 withval=$with_system_ffi;
15520fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015521
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015523{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15524echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015525
Benjamin Peterson867475c2009-04-29 20:36:25 +000015526# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015527{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15528echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015529
15530# Check whether --with-dbmliborder was given.
15531if test "${with_dbmliborder+set}" = set; then
15532 withval=$with_dbmliborder;
15533if test x$with_dbmliborder = xyes
15534then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015535{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15536echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015537 { (exit 1); exit 1; }; }
15538else
15539 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15540 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15541 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015542 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15543echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015544 { (exit 1); exit 1; }; }
15545 fi
15546 done
15547fi
15548fi
15549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015550{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15551echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015552
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015553# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015554
15555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015556{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15557echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015560if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015561 withval=$with_signal_module;
15562fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015563
15564
15565if test -z "$with_signal_module"
15566then with_signal_module="yes"
15567fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015568{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15569echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015570
15571if test "${with_signal_module}" = "yes"; then
15572 USE_SIGNAL_MODULE=""
15573 SIGNAL_OBJS=""
15574else
15575 USE_SIGNAL_MODULE="#"
15576 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15577fi
15578
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015579# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015580
Barry Warsawc0d24d82000-06-29 16:12:00 +000015581USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015583{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15584echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015585
Guido van Rossumec2f0731997-01-22 20:54:01 +000015586
Martin v. Löwiseba40652007-08-30 20:10:57 +000015587# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015588if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015590{ echo "$as_me:$LINENO: result: $withval" >&5
15591echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015592LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015593if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015594 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015595fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015596else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015597 { echo "$as_me:$LINENO: result: no" >&5
15598echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599fi
15600
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
15602# Templates for things AC_DEFINEd more than once.
15603# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015604
15605
Martin v. Löwis11437992002-04-12 09:54:03 +000015606
15607
15608
15609
15610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015611{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15612echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015613
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015615if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616 withval=$with_threads;
15617fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015618
15619
Barry Warsawc0d24d82000-06-29 16:12:00 +000015620# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015623if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624 withval=$with_thread; with_threads=$with_thread
15625fi
15626
Barry Warsawc0d24d82000-06-29 16:12:00 +000015627
15628if test -z "$with_threads"
15629then with_threads="yes"
15630fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015631{ echo "$as_me:$LINENO: result: $with_threads" >&5
15632echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015633
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015634
Barry Warsawc0d24d82000-06-29 16:12:00 +000015635if test "$with_threads" = "no"
15636then
15637 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015638elif test "$ac_cv_pthread_is_default" = yes
15639then
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015641#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015642_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015643
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015644 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015646#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015647_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015648
15649 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015651elif test "$ac_cv_kpthread" = "yes"
15652then
15653 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015654 if test "$ac_cv_cxx_thread" = "yes"; then
15655 CXX="$CXX -Kpthread"
15656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015658#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015660
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015661 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015662 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015663elif test "$ac_cv_kthread" = "yes"
15664then
15665 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015666 if test "$ac_cv_cxx_thread" = "yes"; then
15667 CXX="$CXX -Kthread"
15668 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015669 cat >>confdefs.h <<\_ACEOF
15670#define WITH_THREAD 1
15671_ACEOF
15672
15673 posix_threads=yes
15674 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015675elif test "$ac_cv_pthread" = "yes"
15676then
15677 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015678 if test "$ac_cv_cxx_thread" = "yes"; then
15679 CXX="$CXX -pthread"
15680 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015681 cat >>confdefs.h <<\_ACEOF
15682#define WITH_THREAD 1
15683_ACEOF
15684
15685 posix_threads=yes
15686 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015687else
15688 if test ! -z "$with_threads" -a -d "$with_threads"
15689 then LDFLAGS="$LDFLAGS -L$with_threads"
15690 fi
15691 if test ! -z "$withval" -a -d "$withval"
15692 then LDFLAGS="$LDFLAGS -L$withval"
15693 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015694
15695 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015696 # define _POSIX_THREADS in unistd.h. Some apparently don't
15697 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015698 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15699echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015701/* confdefs.h. */
15702_ACEOF
15703cat confdefs.h >>conftest.$ac_ext
15704cat >>conftest.$ac_ext <<_ACEOF
15705/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015706
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015707#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015708#ifdef _POSIX_THREADS
15709yes
15710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015711
15712_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015714 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015715 unistd_defines_pthreads=yes
15716else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015717 unistd_defines_pthreads=no
15718fi
Ronald Oussoren25967582009-09-06 10:00:26 +000015719rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015721 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15722echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015723
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015725#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015726_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015729 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15730echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015731if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015732 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015733fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015734{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15735echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015738{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15739echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015741/* confdefs.h. */
15742_ACEOF
15743cat confdefs.h >>conftest.$ac_ext
15744cat >>conftest.$ac_ext <<_ACEOF
15745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015746$ac_includes_default
15747#include <cthreads.h>
15748_ACEOF
15749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750if { (ac_try="$ac_compile"
15751case "(($ac_try" in
15752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15753 *) ac_try_echo=$ac_try;;
15754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015758 grep -v '^ *+' conftest.er1 >conftest.err
15759 rm -f conftest.er1
15760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 (exit $ac_status); } && {
15763 test -z "$ac_c_werror_flag" ||
15764 test ! -s conftest.err
15765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 ac_header_compiler=yes
15767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773
15774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015775{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15776echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015779{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15780echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015782/* confdefs.h. */
15783_ACEOF
15784cat confdefs.h >>conftest.$ac_ext
15785cat >>conftest.$ac_ext <<_ACEOF
15786/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015787#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015788_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789if { (ac_try="$ac_cpp conftest.$ac_ext"
15790case "(($ac_try" in
15791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15792 *) ac_try_echo=$ac_try;;
15793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015795 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015796 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 rm -f conftest.er1
15799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 (exit $ac_status); } >/dev/null && {
15802 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15803 test ! -s conftest.err
15804 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ac_header_preproc=yes
15806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015808sed 's/^/| /' conftest.$ac_ext >&5
15809
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015814{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15815echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015816
15817# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15819 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15821echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15822 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15823echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015824 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015825 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015826 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015827 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15828echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15829 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15830echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15831 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15832echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15833 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15834echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15836echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15838echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015840## -------------------------------------- ##
15841## Report this to http://bugs.python.org/ ##
15842## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015843_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015845 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015847{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15848echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015849if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015850 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015851else
15852 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015853fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015854{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15855echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015856
15857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015858if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015860#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015861_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015864#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015865_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
15868cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015869#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015871
15872 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015873 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015874else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015877 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15878echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015879if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015880 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015881fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015882{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15883echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015884else
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015886{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15887echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015888cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015889/* confdefs.h. */
15890_ACEOF
15891cat confdefs.h >>conftest.$ac_ext
15892cat >>conftest.$ac_ext <<_ACEOF
15893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015894$ac_includes_default
15895#include <mach/cthreads.h>
15896_ACEOF
15897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898if { (ac_try="$ac_compile"
15899case "(($ac_try" in
15900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15901 *) ac_try_echo=$ac_try;;
15902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015906 grep -v '^ *+' conftest.er1 >conftest.err
15907 rm -f conftest.er1
15908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015910 (exit $ac_status); } && {
15911 test -z "$ac_c_werror_flag" ||
15912 test ! -s conftest.err
15913 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 ac_header_compiler=yes
15915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015917sed 's/^/| /' conftest.$ac_ext >&5
15918
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015921
15922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015923{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15924echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015925
15926# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015927{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15928echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* confdefs.h. */
15931_ACEOF
15932cat confdefs.h >>conftest.$ac_ext
15933cat >>conftest.$ac_ext <<_ACEOF
15934/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015935#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015936_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015937if { (ac_try="$ac_cpp conftest.$ac_ext"
15938case "(($ac_try" in
15939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15940 *) ac_try_echo=$ac_try;;
15941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015945 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 rm -f conftest.er1
15947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949 (exit $ac_status); } >/dev/null && {
15950 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15951 test ! -s conftest.err
15952 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 ac_header_preproc=yes
15954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015956sed 's/^/| /' conftest.$ac_ext >&5
15957
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960
Martin v. Löwis11437992002-04-12 09:54:03 +000015961rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015962{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15963echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015964
15965# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015966case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15967 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015968 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15969echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15970 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15971echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015972 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015973 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015974 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015975 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15976echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15977 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15978echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15979 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15980echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015988## -------------------------------------- ##
15989## Report this to http://bugs.python.org/ ##
15990## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015991_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015992 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015993 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015994esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015995{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15996echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015997if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015998 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015999else
16000 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016001fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016002{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16003echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016004
16005fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016006if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016007 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016008#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016010
Martin v. Löwis11437992002-04-12 09:54:03 +000016011 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016012#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016013_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014
Martin v. Löwis11437992002-04-12 09:54:03 +000016015
16016cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016017#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016018_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016019
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016020 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016021else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016023 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16024echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016027if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016028 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16029echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016030 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016031#define WITH_THREAD 1
16032_ACEOF
16033
16034
16035cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016036#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016037_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016038
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016039 LIBS="-lpth $LIBS"
16040 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016041else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016042 { echo "$as_me:$LINENO: result: no" >&5
16043echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016044
16045 # Just looking for pthread_create in libpthread is not enough:
16046 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16047 # So we really have to include pthread.h, and then link.
16048 _libs=$LIBS
16049 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16051echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016053/* confdefs.h. */
16054_ACEOF
16055cat confdefs.h >>conftest.$ac_ext
16056cat >>conftest.$ac_ext <<_ACEOF
16057/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016058#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016059
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016060void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016061int
16062main ()
16063{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016064
16065pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 ;
16067 return 0;
16068}
16069_ACEOF
16070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071if { (ac_try="$ac_link"
16072case "(($ac_try" in
16073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16074 *) ac_try_echo=$ac_try;;
16075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016079 grep -v '^ *+' conftest.er1 >conftest.err
16080 rm -f conftest.er1
16081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 (exit $ac_status); } && {
16084 test -z "$ac_c_werror_flag" ||
16085 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016086 } && test -s conftest$ac_exeext &&
16087 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016088
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016089 { echo "$as_me:$LINENO: result: yes" >&5
16090echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016091 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016092#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016094
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016095 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016096 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016099sed 's/^/| /' conftest.$ac_ext >&5
16100
Martin v. Löwis11437992002-04-12 09:54:03 +000016101
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016102 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016103 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16104echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016105if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016107else
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016109/* confdefs.h. */
16110_ACEOF
16111cat confdefs.h >>conftest.$ac_ext
16112cat >>conftest.$ac_ext <<_ACEOF
16113/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016114/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16115 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16116#define pthread_detach innocuous_pthread_detach
16117
Guido van Rossumad678af1998-10-02 14:42:15 +000016118/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016119 which can conflict with char pthread_detach (); below.
16120 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016121 <limits.h> exists even on freestanding compilers. */
16122
16123#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016124# include <limits.h>
16125#else
16126# include <assert.h>
16127#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016128
16129#undef pthread_detach
16130
Martin v. Löwiseba40652007-08-30 20:10:57 +000016131/* Override any GCC internal prototype to avoid an error.
16132 Use char because int might match the return type of a GCC
16133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016134#ifdef __cplusplus
16135extern "C"
16136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016137char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016138/* The GNU C library defines this for functions which it implements
16139 to always fail with ENOSYS. Some functions are actually named
16140 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016142choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016143#endif
16144
Skip Montanaro6dead952003-09-25 14:50:04 +000016145int
16146main ()
16147{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016148return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 ;
16150 return 0;
16151}
16152_ACEOF
16153rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154if { (ac_try="$ac_link"
16155case "(($ac_try" in
16156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16157 *) ac_try_echo=$ac_try;;
16158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016162 grep -v '^ *+' conftest.er1 >conftest.err
16163 rm -f conftest.er1
16164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 (exit $ac_status); } && {
16167 test -z "$ac_c_werror_flag" ||
16168 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016169 } && test -s conftest$ac_exeext &&
16170 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016174sed 's/^/| /' conftest.$ac_ext >&5
16175
Martin v. Löwiseba40652007-08-30 20:10:57 +000016176 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178
16179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016180 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016181fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016182{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16183echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16184if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016186#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016187_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016188
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016189 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016190 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016191else
Guido van Rossumad678af1998-10-02 14:42:15 +000016192
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016193 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016194 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16195echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016196if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016198fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016199{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16200echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016201else
16202 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16204echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016205cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016206/* confdefs.h. */
16207_ACEOF
16208cat confdefs.h >>conftest.$ac_ext
16209cat >>conftest.$ac_ext <<_ACEOF
16210/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211$ac_includes_default
16212#include <atheos/threads.h>
16213_ACEOF
16214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215if { (ac_try="$ac_compile"
16216case "(($ac_try" in
16217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16218 *) ac_try_echo=$ac_try;;
16219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016223 grep -v '^ *+' conftest.er1 >conftest.err
16224 rm -f conftest.er1
16225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 (exit $ac_status); } && {
16228 test -z "$ac_c_werror_flag" ||
16229 test ! -s conftest.err
16230 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016231 ac_header_compiler=yes
16232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016234sed 's/^/| /' conftest.$ac_ext >&5
16235
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238
16239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016240{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16241echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016242
16243# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016244{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16245echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016247/* confdefs.h. */
16248_ACEOF
16249cat confdefs.h >>conftest.$ac_ext
16250cat >>conftest.$ac_ext <<_ACEOF
16251/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016252#include <atheos/threads.h>
16253_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016254if { (ac_try="$ac_cpp conftest.$ac_ext"
16255case "(($ac_try" in
16256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16257 *) ac_try_echo=$ac_try;;
16258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016261 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016262 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016263 rm -f conftest.er1
16264 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016266 (exit $ac_status); } >/dev/null && {
16267 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16268 test ! -s conftest.err
16269 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016270 ac_header_preproc=yes
16271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016273sed 's/^/| /' conftest.$ac_ext >&5
16274
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016275 ac_header_preproc=no
16276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016277
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016278rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016279{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16280echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016281
16282# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16284 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016285 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16286echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16287 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16288echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016289 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016290 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016291 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016292 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16293echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16294 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16295echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16296 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16297echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16298 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16299echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16300 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16301echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16303echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016305## -------------------------------------- ##
16306## Report this to http://bugs.python.org/ ##
16307## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016308_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016309 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016310 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016311esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016312{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16313echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016314if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016315 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016316else
16317 ac_cv_header_atheos_threads_h=$ac_header_preproc
16318fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016319{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16320echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016321
16322fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016323if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016324 cat >>confdefs.h <<\_ACEOF
16325#define WITH_THREAD 1
16326_ACEOF
16327
16328
16329cat >>confdefs.h <<\_ACEOF
16330#define ATHEOS_THREADS 1
16331_ACEOF
16332
16333 THREADOBJ="Python/thread.o"
16334else
16335
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016337 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16338echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016339if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016341fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016342{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16343echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016344else
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016346{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16347echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016348cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016349/* confdefs.h. */
16350_ACEOF
16351cat confdefs.h >>conftest.$ac_ext
16352cat >>conftest.$ac_ext <<_ACEOF
16353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016354$ac_includes_default
16355#include <kernel/OS.h>
16356_ACEOF
16357rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016358if { (ac_try="$ac_compile"
16359case "(($ac_try" in
16360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16361 *) ac_try_echo=$ac_try;;
16362esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016366 grep -v '^ *+' conftest.er1 >conftest.err
16367 rm -f conftest.er1
16368 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370 (exit $ac_status); } && {
16371 test -z "$ac_c_werror_flag" ||
16372 test ! -s conftest.err
16373 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 ac_header_compiler=yes
16375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016377sed 's/^/| /' conftest.$ac_ext >&5
16378
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381
16382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016383{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16384echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016385
16386# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016387{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16388echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016390/* confdefs.h. */
16391_ACEOF
16392cat confdefs.h >>conftest.$ac_ext
16393cat >>conftest.$ac_ext <<_ACEOF
16394/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016395#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016396_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016397if { (ac_try="$ac_cpp conftest.$ac_ext"
16398case "(($ac_try" in
16399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16400 *) ac_try_echo=$ac_try;;
16401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016404 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016405 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 rm -f conftest.er1
16407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016409 (exit $ac_status); } >/dev/null && {
16410 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16411 test ! -s conftest.err
16412 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 ac_header_preproc=yes
16414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016416sed 's/^/| /' conftest.$ac_ext >&5
16417
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016420
Martin v. Löwis11437992002-04-12 09:54:03 +000016421rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16423echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016424
Martin v. Löwis11437992002-04-12 09:54:03 +000016425# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016426case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16427 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016428 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16429echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16430 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16431echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016432 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016433 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016434 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016435 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16436echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16437 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16438echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16439 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16440echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16441 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16442echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16443 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16444echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16446echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016447 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016448## -------------------------------------- ##
16449## Report this to http://bugs.python.org/ ##
16450## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016451_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016454esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016455{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16456echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016457if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016458 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016459else
16460 ac_cv_header_kernel_OS_h=$ac_header_preproc
16461fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16463echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016464
16465fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016466if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 cat >>confdefs.h <<\_ACEOF
16468#define WITH_THREAD 1
16469_ACEOF
16470
16471
16472cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016473#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016474_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016475
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016476 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016477else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016479 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16480echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016481if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016483else
Martin v. Löwis11437992002-04-12 09:54:03 +000016484 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016485LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016492
Martin v. Löwiseba40652007-08-30 20:10:57 +000016493/* Override any GCC internal prototype to avoid an error.
16494 Use char because int might match the return type of a GCC
16495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016496#ifdef __cplusplus
16497extern "C"
16498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016499char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016500int
16501main ()
16502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016503return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 ;
16505 return 0;
16506}
16507_ACEOF
16508rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509if { (ac_try="$ac_link"
16510case "(($ac_try" in
16511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16512 *) ac_try_echo=$ac_try;;
16513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016517 grep -v '^ *+' conftest.er1 >conftest.err
16518 rm -f conftest.er1
16519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016521 (exit $ac_status); } && {
16522 test -z "$ac_c_werror_flag" ||
16523 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016524 } && test -s conftest$ac_exeext &&
16525 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016529sed 's/^/| /' conftest.$ac_ext >&5
16530
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016533
16534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016535 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016536LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016538{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16539echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16540if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016542#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016543_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016544
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016545 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016546 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016547 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016548else
Greg Steinadf63d62000-07-05 10:38:09 +000016549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016550 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16551echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016552if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016553 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016554else
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016556LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016558/* confdefs.h. */
16559_ACEOF
16560cat confdefs.h >>conftest.$ac_ext
16561cat >>conftest.$ac_ext <<_ACEOF
16562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016563
Martin v. Löwiseba40652007-08-30 20:10:57 +000016564/* Override any GCC internal prototype to avoid an error.
16565 Use char because int might match the return type of a GCC
16566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016567#ifdef __cplusplus
16568extern "C"
16569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016570char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016571int
16572main ()
16573{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016574return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 ;
16576 return 0;
16577}
16578_ACEOF
16579rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580if { (ac_try="$ac_link"
16581case "(($ac_try" in
16582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16583 *) ac_try_echo=$ac_try;;
16584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016588 grep -v '^ *+' conftest.er1 >conftest.err
16589 rm -f conftest.er1
16590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (exit $ac_status); } && {
16593 test -z "$ac_c_werror_flag" ||
16594 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016595 } && test -s conftest$ac_exeext &&
16596 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604
16605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016607LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016608fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016609{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16610echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16611if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016612 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016613#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016614_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016615
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016616 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016617 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016618 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016619else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016620
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016621 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16622echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016623if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016624 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016625else
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016627LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016629/* confdefs.h. */
16630_ACEOF
16631cat confdefs.h >>conftest.$ac_ext
16632cat >>conftest.$ac_ext <<_ACEOF
16633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016634
Martin v. Löwiseba40652007-08-30 20:10:57 +000016635/* Override any GCC internal prototype to avoid an error.
16636 Use char because int might match the return type of a GCC
16637 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016638#ifdef __cplusplus
16639extern "C"
16640#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016641char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016642int
16643main ()
16644{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016645return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016646 ;
16647 return 0;
16648}
16649_ACEOF
16650rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651if { (ac_try="$ac_link"
16652case "(($ac_try" in
16653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16654 *) ac_try_echo=$ac_try;;
16655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016657 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016659 grep -v '^ *+' conftest.er1 >conftest.err
16660 rm -f conftest.er1
16661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016663 (exit $ac_status); } && {
16664 test -z "$ac_c_werror_flag" ||
16665 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016666 } && test -s conftest$ac_exeext &&
16667 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016671sed 's/^/| /' conftest.$ac_ext >&5
16672
Martin v. Löwiseba40652007-08-30 20:10:57 +000016673 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675
16676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016679fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016680{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16681echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16682if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016683 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016684#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016685_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016686
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016687 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016688 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016689 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016690else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016692 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16693echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016694if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016696else
Martin v. Löwis11437992002-04-12 09:54:03 +000016697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016698LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016700/* confdefs.h. */
16701_ACEOF
16702cat confdefs.h >>conftest.$ac_ext
16703cat >>conftest.$ac_ext <<_ACEOF
16704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016705
Martin v. Löwiseba40652007-08-30 20:10:57 +000016706/* Override any GCC internal prototype to avoid an error.
16707 Use char because int might match the return type of a GCC
16708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016709#ifdef __cplusplus
16710extern "C"
16711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016712char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016713int
16714main ()
16715{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016716return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016717 ;
16718 return 0;
16719}
16720_ACEOF
16721rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016722if { (ac_try="$ac_link"
16723case "(($ac_try" in
16724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16725 *) ac_try_echo=$ac_try;;
16726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016728 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016730 grep -v '^ *+' conftest.er1 >conftest.err
16731 rm -f conftest.er1
16732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016734 (exit $ac_status); } && {
16735 test -z "$ac_c_werror_flag" ||
16736 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016737 } && test -s conftest$ac_exeext &&
16738 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016742sed 's/^/| /' conftest.$ac_ext >&5
16743
Martin v. Löwiseba40652007-08-30 20:10:57 +000016744 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016746
16747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016749LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016750fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016751{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16752echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16753if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016755#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016756_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016758 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016759 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016760 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016761else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016762
Martin v. Löwis130fb172001-07-19 11:00:41 +000016763 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016764fi
16765
Guido van Rossum627b2d71993-12-24 10:39:16 +000016766
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016767fi
16768
Guido van Rossum0be3e491997-05-22 20:33:33 +000016769fi
16770
Guido van Rossum49545951997-12-02 19:28:29 +000016771fi
16772
Guido van Rossumb93a8621998-05-07 13:27:32 +000016773fi
16774
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016775
Michael W. Hudson54241132001-12-07 15:38:26 +000016776fi
16777
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016778
16779fi
16780
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016782
16783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016785fi
16786
Martin v. Löwis11437992002-04-12 09:54:03 +000016787fi
16788
16789
16790fi
16791
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016792
Michael W. Hudson54241132001-12-07 15:38:26 +000016793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016794 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16795echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016796if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016798else
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016800LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016802/* confdefs.h. */
16803_ACEOF
16804cat confdefs.h >>conftest.$ac_ext
16805cat >>conftest.$ac_ext <<_ACEOF
16806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016807
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808/* Override any GCC internal prototype to avoid an error.
16809 Use char because int might match the return type of a GCC
16810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016811#ifdef __cplusplus
16812extern "C"
16813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016814char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016815int
16816main ()
16817{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016818return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ;
16820 return 0;
16821}
16822_ACEOF
16823rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824if { (ac_try="$ac_link"
16825case "(($ac_try" in
16826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16827 *) ac_try_echo=$ac_try;;
16828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016830 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016832 grep -v '^ *+' conftest.er1 >conftest.err
16833 rm -f conftest.er1
16834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016836 (exit $ac_status); } && {
16837 test -z "$ac_c_werror_flag" ||
16838 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016839 } && test -s conftest$ac_exeext &&
16840 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016844sed 's/^/| /' conftest.$ac_ext >&5
16845
Martin v. Löwiseba40652007-08-30 20:10:57 +000016846 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016848
16849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016853{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16854echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16855if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016857#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016859
Martin v. Löwis130fb172001-07-19 11:00:41 +000016860 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016861 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016862 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016863fi
16864
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016865
Neal Norwitza978ab02002-11-02 16:58:05 +000016866 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016867 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16868echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016869if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016870 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016871else
Martin v. Löwis11437992002-04-12 09:54:03 +000016872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016873LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016875/* confdefs.h. */
16876_ACEOF
16877cat confdefs.h >>conftest.$ac_ext
16878cat >>conftest.$ac_ext <<_ACEOF
16879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016880
Martin v. Löwiseba40652007-08-30 20:10:57 +000016881/* Override any GCC internal prototype to avoid an error.
16882 Use char because int might match the return type of a GCC
16883 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016884#ifdef __cplusplus
16885extern "C"
16886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016887char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016888int
16889main ()
16890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016891return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 ;
16893 return 0;
16894}
16895_ACEOF
16896rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897if { (ac_try="$ac_link"
16898case "(($ac_try" in
16899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16900 *) ac_try_echo=$ac_try;;
16901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016905 grep -v '^ *+' conftest.er1 >conftest.err
16906 rm -f conftest.er1
16907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 (exit $ac_status); } && {
16910 test -z "$ac_c_werror_flag" ||
16911 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016912 } && test -s conftest$ac_exeext &&
16913 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016917sed 's/^/| /' conftest.$ac_ext >&5
16918
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016921
16922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016923 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016924LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016925fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016926{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16927echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16928if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016930#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016931_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016932
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016933 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016934 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016935 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016936fi
16937
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016938 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016939
Martin v. Löwis130fb172001-07-19 11:00:41 +000016940 if test "$USE_THREAD_MODULE" != "#"
16941 then
16942 # If the above checks didn't disable threads, (at least) OSF1
16943 # needs this '-threads' argument during linking.
16944 case $ac_sys_system in
16945 OSF1) LDLAST=-threads;;
16946 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016947 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016948fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016949
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016950if test "$posix_threads" = "yes"; then
16951 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016952
16953cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016954#define _POSIX_THREADS 1
16955_ACEOF
16956
16957 fi
16958
16959 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16960 case $ac_sys_system/$ac_sys_release in
16961 SunOS/5.6)
16962cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016963#define HAVE_PTHREAD_DESTRUCTOR 1
16964_ACEOF
16965
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016966 ;;
16967 SunOS/5.8)
16968cat >>confdefs.h <<\_ACEOF
16969#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16970_ACEOF
16971
16972 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016973 AIX/5)
16974cat >>confdefs.h <<\_ACEOF
16975#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16976_ACEOF
16977
16978 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016979 esac
16980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016981 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16982echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016983 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016985else
16986 if test "$cross_compiling" = yes; then
16987 ac_cv_pthread_system_supported=no
16988else
16989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016990/* confdefs.h. */
16991_ACEOF
16992cat confdefs.h >>conftest.$ac_ext
16993cat >>conftest.$ac_ext <<_ACEOF
16994/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016995#include <pthread.h>
16996 void *foo(void *parm) {
16997 return NULL;
16998 }
16999 main() {
17000 pthread_attr_t attr;
17001 pthread_t id;
17002 if (pthread_attr_init(&attr)) exit(-1);
17003 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17004 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17005 exit(0);
17006 }
17007_ACEOF
17008rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009if { (ac_try="$ac_link"
17010case "(($ac_try" in
17011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17012 *) ac_try_echo=$ac_try;;
17013esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017016 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 { (case "(($ac_try" in
17020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17021 *) ac_try_echo=$ac_try;;
17022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017025 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017027 (exit $ac_status); }; }; then
17028 ac_cv_pthread_system_supported=yes
17029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017030 echo "$as_me: program exited with status $ac_status" >&5
17031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017032sed 's/^/| /' conftest.$ac_ext >&5
17033
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017034( exit $ac_status )
17035ac_cv_pthread_system_supported=no
17036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037rm -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 +000017038fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017039
Martin v. Löwiseba40652007-08-30 20:10:57 +000017040
17041
Guido van Rossum627b2d71993-12-24 10:39:16 +000017042fi
17043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017044 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17045echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017046 if test "$ac_cv_pthread_system_supported" = "yes"; then
17047
17048cat >>confdefs.h <<\_ACEOF
17049#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17050_ACEOF
17051
17052 fi
17053
17054for ac_func in pthread_sigmask
17055do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017056as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17057{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17058echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017060 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017061else
17062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017063/* confdefs.h. */
17064_ACEOF
17065cat confdefs.h >>conftest.$ac_ext
17066cat >>conftest.$ac_ext <<_ACEOF
17067/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017068/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17069 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17070#define $ac_func innocuous_$ac_func
17071
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017072/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017073 which can conflict with char $ac_func (); below.
17074 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017075 <limits.h> exists even on freestanding compilers. */
17076
17077#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017078# include <limits.h>
17079#else
17080# include <assert.h>
17081#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017082
17083#undef $ac_func
17084
Martin v. Löwiseba40652007-08-30 20:10:57 +000017085/* Override any GCC internal prototype to avoid an error.
17086 Use char because int might match the return type of a GCC
17087 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017088#ifdef __cplusplus
17089extern "C"
17090#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017091char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017092/* The GNU C library defines this for functions which it implements
17093 to always fail with ENOSYS. Some functions are actually named
17094 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017095#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017096choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017097#endif
17098
Skip Montanaro6dead952003-09-25 14:50:04 +000017099int
17100main ()
17101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017102return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103 ;
17104 return 0;
17105}
17106_ACEOF
17107rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017108if { (ac_try="$ac_link"
17109case "(($ac_try" in
17110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17111 *) ac_try_echo=$ac_try;;
17112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017116 grep -v '^ *+' conftest.er1 >conftest.err
17117 rm -f conftest.er1
17118 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120 (exit $ac_status); } && {
17121 test -z "$ac_c_werror_flag" ||
17122 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017123 } && test -s conftest$ac_exeext &&
17124 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017125 eval "$as_ac_var=yes"
17126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017128sed 's/^/| /' conftest.$ac_ext >&5
17129
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132
17133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017136ac_res=`eval echo '${'$as_ac_var'}'`
17137 { echo "$as_me:$LINENO: result: $ac_res" >&5
17138echo "${ECHO_T}$ac_res" >&6; }
17139if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017140 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017141#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017142_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017143 case $ac_sys_system in
17144 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017145
Jason Tishlerfac083d2003-07-22 15:20:49 +000017146cat >>confdefs.h <<\_ACEOF
17147#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17148_ACEOF
17149
17150 ;;
17151 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017152fi
17153done
17154
17155fi
17156
17157
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017158# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017159
17160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017161{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17162echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017163# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017164if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017165 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017166 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017167 { echo "$as_me:$LINENO: result: no" >&5
17168echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017169 ipv6=no
17170 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017171 *) { echo "$as_me:$LINENO: result: yes" >&5
17172echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017174#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017176
17177 ipv6=yes
17178 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017180else
Martin v. Löwis11437992002-04-12 09:54:03 +000017181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017182 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017183 { echo "$as_me:$LINENO: result: no" >&5
17184echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017185 ipv6=no
17186
17187else
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017189/* confdefs.h. */
17190_ACEOF
17191cat confdefs.h >>conftest.$ac_ext
17192cat >>conftest.$ac_ext <<_ACEOF
17193/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017194 /* AF_INET6 available check */
17195#include <sys/types.h>
17196#include <sys/socket.h>
17197main()
17198{
17199 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17200 exit(1);
17201 else
17202 exit(0);
17203}
17204
Martin v. Löwis11437992002-04-12 09:54:03 +000017205_ACEOF
17206rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017207if { (ac_try="$ac_link"
17208case "(($ac_try" in
17209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17210 *) ac_try_echo=$ac_try;;
17211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217 { (case "(($ac_try" in
17218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17219 *) ac_try_echo=$ac_try;;
17220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017223 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017226 { echo "$as_me:$LINENO: result: yes" >&5
17227echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017228 ipv6=yes
17229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230 echo "$as_me: program exited with status $ac_status" >&5
17231echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017232sed 's/^/| /' conftest.$ac_ext >&5
17233
Martin v. Löwis11437992002-04-12 09:54:03 +000017234( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017235{ echo "$as_me:$LINENO: result: no" >&5
17236echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017237 ipv6=no
17238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017239rm -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 +000017240fi
17241
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242
17243
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017244if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017245 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17246echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017248/* confdefs.h. */
17249_ACEOF
17250cat confdefs.h >>conftest.$ac_ext
17251cat >>conftest.$ac_ext <<_ACEOF
17252/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017253#include <sys/types.h>
17254#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017255int
17256main ()
17257{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017258struct sockaddr_in6 x;
17259x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017260 ;
17261 return 0;
17262}
17263_ACEOF
17264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265if { (ac_try="$ac_compile"
17266case "(($ac_try" in
17267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17268 *) ac_try_echo=$ac_try;;
17269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017273 grep -v '^ *+' conftest.er1 >conftest.err
17274 rm -f conftest.er1
17275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017277 (exit $ac_status); } && {
17278 test -z "$ac_c_werror_flag" ||
17279 test ! -s conftest.err
17280 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017281 { echo "$as_me:$LINENO: result: yes" >&5
17282echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017283 ipv6=yes
17284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017286sed 's/^/| /' conftest.$ac_ext >&5
17287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017288 { echo "$as_me:$LINENO: result: no" >&5
17289echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017290 ipv6=no
17291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292
17293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017294fi
17295
17296if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017297 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017298#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017299_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017300
17301fi
17302
Martin v. Löwiseba40652007-08-30 20:10:57 +000017303fi
17304
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017305
17306ipv6type=unknown
17307ipv6lib=none
17308ipv6trylibc=no
17309
17310if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017311 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17312echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017313 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17314 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017315 case $i in
17316 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017318/* confdefs.h. */
17319_ACEOF
17320cat confdefs.h >>conftest.$ac_ext
17321cat >>conftest.$ac_ext <<_ACEOF
17322/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017323
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017324#include <netinet/in.h>
17325#ifdef IPV6_INRIA_VERSION
17326yes
17327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017328_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017330 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017331 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017332fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017333rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017334
17335 ;;
17336 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017338/* confdefs.h. */
17339_ACEOF
17340cat confdefs.h >>conftest.$ac_ext
17341cat >>conftest.$ac_ext <<_ACEOF
17342/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017343
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017344#include <netinet/in.h>
17345#ifdef __KAME__
17346yes
17347#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017348_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017350 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017351 ipv6type=$i;
17352 ipv6lib=inet6
17353 ipv6libdir=/usr/local/v6/lib
17354 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017355fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017356rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017357
17358 ;;
17359 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017361/* confdefs.h. */
17362_ACEOF
17363cat confdefs.h >>conftest.$ac_ext
17364cat >>conftest.$ac_ext <<_ACEOF
17365/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017366
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017367#include <features.h>
17368#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17369yes
17370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017371_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017373 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017374 ipv6type=$i;
17375 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017376fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017377rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017378
17379 ;;
17380 linux-inet6)
17381 if test -d /usr/inet6; then
17382 ipv6type=$i
17383 ipv6lib=inet6
17384 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017385 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017386 fi
17387 ;;
17388 solaris)
17389 if test -f /etc/netconfig; then
17390 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17391 ipv6type=$i
17392 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017393 fi
17394 fi
17395 ;;
17396 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017398/* confdefs.h. */
17399_ACEOF
17400cat confdefs.h >>conftest.$ac_ext
17401cat >>conftest.$ac_ext <<_ACEOF
17402/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017403
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017404#include <sys/param.h>
17405#ifdef _TOSHIBA_INET6
17406yes
17407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017408_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017410 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017411 ipv6type=$i;
17412 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017413 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017414fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017415rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416
17417 ;;
17418 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017420/* confdefs.h. */
17421_ACEOF
17422cat confdefs.h >>conftest.$ac_ext
17423cat >>conftest.$ac_ext <<_ACEOF
17424/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017425
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017426#include </usr/local/v6/include/sys/v6config.h>
17427#ifdef __V6D__
17428yes
17429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017430_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017432 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017433 ipv6type=$i;
17434 ipv6lib=v6;
17435 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017436 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017437fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017438rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017439
17440 ;;
17441 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017443/* confdefs.h. */
17444_ACEOF
17445cat confdefs.h >>conftest.$ac_ext
17446cat >>conftest.$ac_ext <<_ACEOF
17447/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017448
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449#include <sys/param.h>
17450#ifdef _ZETA_MINAMI_INET6
17451yes
17452#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017453_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017455 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017456 ipv6type=$i;
17457 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017458 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017459fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017460rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017461
17462 ;;
17463 esac
17464 if test "$ipv6type" != "unknown"; then
17465 break
17466 fi
17467 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017468 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17469echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017470fi
17471
17472if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17473 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17474 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17475 echo "using lib$ipv6lib"
17476 else
17477 if test $ipv6trylibc = "yes"; then
17478 echo "using libc"
17479 else
17480 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17481 echo "You need to fetch lib$ipv6lib.a from appropriate"
17482 echo 'ipv6 kit and compile beforehand.'
17483 exit 1
17484 fi
17485 fi
17486fi
17487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017488{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17489echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017490cat >conftest.$ac_ext <<_ACEOF
17491/* confdefs.h. */
17492_ACEOF
17493cat confdefs.h >>conftest.$ac_ext
17494cat >>conftest.$ac_ext <<_ACEOF
17495/* end confdefs.h. */
17496#include <Carbon/Carbon.h>
17497int
17498main ()
17499{
17500FSIORefNum fRef = 0
17501 ;
17502 return 0;
17503}
17504_ACEOF
17505rm -f conftest.$ac_objext
17506if { (ac_try="$ac_compile"
17507case "(($ac_try" in
17508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17509 *) ac_try_echo=$ac_try;;
17510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017512 (eval "$ac_compile") 2>conftest.er1
17513 ac_status=$?
17514 grep -v '^ *+' conftest.er1 >conftest.err
17515 rm -f conftest.er1
17516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017518 (exit $ac_status); } && {
17519 test -z "$ac_c_werror_flag" ||
17520 test ! -s conftest.err
17521 } && test -s conftest.$ac_objext; then
17522
17523cat >>confdefs.h <<\_ACEOF
17524#define HAVE_OSX105_SDK 1
17525_ACEOF
17526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017527 { echo "$as_me:$LINENO: result: yes" >&5
17528echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017530 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017531sed 's/^/| /' conftest.$ac_ext >&5
17532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 { echo "$as_me:$LINENO: result: no" >&5
17534echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017535
17536fi
17537
17538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17539
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017540# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017541{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17542echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017543
Martin v. Löwiseba40652007-08-30 20:10:57 +000017544# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017545if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017546 withval=$with_doc_strings;
17547fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017548
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017549
17550if test -z "$with_doc_strings"
17551then with_doc_strings="yes"
17552fi
17553if test "$with_doc_strings" != "no"
17554then
17555
17556cat >>confdefs.h <<\_ACEOF
17557#define WITH_DOC_STRINGS 1
17558_ACEOF
17559
17560fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017561{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17562echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017563
Neil Schemenauera35c6882001-02-27 04:45:05 +000017564# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017565{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17566echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017567
Martin v. Löwiseba40652007-08-30 20:10:57 +000017568# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017569if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017570 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017571if test "$withval" != no
17572then
17573
17574cat >>confdefs.h <<\_ACEOF
17575#define WITH_TSC 1
17576_ACEOF
17577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017578 { echo "$as_me:$LINENO: result: yes" >&5
17579echo "${ECHO_T}yes" >&6; }
17580else { echo "$as_me:$LINENO: result: no" >&5
17581echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017582fi
17583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017584 { echo "$as_me:$LINENO: result: no" >&5
17585echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017586fi
17587
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017588
17589# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017590{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17591echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017592
Martin v. Löwiseba40652007-08-30 20:10:57 +000017593# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017594if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017595 withval=$with_pymalloc;
17596fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017597
Neil Schemenauera35c6882001-02-27 04:45:05 +000017598
Neil Schemenauer16c22972002-03-22 15:34:49 +000017599if test -z "$with_pymalloc"
17600then with_pymalloc="yes"
17601fi
17602if test "$with_pymalloc" != "no"
17603then
Martin v. Löwis11437992002-04-12 09:54:03 +000017604
17605cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017606#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017607_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017608
17609fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017610{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17611echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017612
Barry Warsawef82cd72000-06-30 16:21:01 +000017613# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017614{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17615echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017616
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017618if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017619 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017620if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017621then
17622
17623cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017624#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017625_ACEOF
17626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017627 { echo "$as_me:$LINENO: result: yes" >&5
17628echo "${ECHO_T}yes" >&6; }
17629else { echo "$as_me:$LINENO: result: no" >&5
17630echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017631fi
17632else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017633 { echo "$as_me:$LINENO: result: no" >&5
17634echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017635fi
17636
Barry Warsawef82cd72000-06-30 16:21:01 +000017637
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017638# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017639
Guido van Rossum98935bf2001-09-05 19:13:16 +000017640DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017641
Guido van Rossume97ee181999-12-20 21:27:22 +000017642# the dlopen() function means we might want to use dynload_shlib.o. some
17643# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017644
Thomas Wouters3a584202000-08-05 23:28:51 +000017645for ac_func in dlopen
17646do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017647as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17648{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17649echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017651 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017652else
Martin v. Löwis11437992002-04-12 09:54:03 +000017653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017654/* confdefs.h. */
17655_ACEOF
17656cat confdefs.h >>conftest.$ac_ext
17657cat >>conftest.$ac_ext <<_ACEOF
17658/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017659/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17660 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17661#define $ac_func innocuous_$ac_func
17662
Guido van Rossume97ee181999-12-20 21:27:22 +000017663/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017664 which can conflict with char $ac_func (); below.
17665 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017666 <limits.h> exists even on freestanding compilers. */
17667
17668#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017669# include <limits.h>
17670#else
17671# include <assert.h>
17672#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017673
17674#undef $ac_func
17675
Martin v. Löwiseba40652007-08-30 20:10:57 +000017676/* Override any GCC internal prototype to avoid an error.
17677 Use char because int might match the return type of a GCC
17678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017679#ifdef __cplusplus
17680extern "C"
17681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017682char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017683/* The GNU C library defines this for functions which it implements
17684 to always fail with ENOSYS. Some functions are actually named
17685 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017686#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017687choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017688#endif
17689
Skip Montanaro6dead952003-09-25 14:50:04 +000017690int
17691main ()
17692{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017693return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017694 ;
17695 return 0;
17696}
17697_ACEOF
17698rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699if { (ac_try="$ac_link"
17700case "(($ac_try" in
17701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17702 *) ac_try_echo=$ac_try;;
17703esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017705 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017707 grep -v '^ *+' conftest.er1 >conftest.err
17708 rm -f conftest.er1
17709 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017711 (exit $ac_status); } && {
17712 test -z "$ac_c_werror_flag" ||
17713 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017714 } && test -s conftest$ac_exeext &&
17715 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017719sed 's/^/| /' conftest.$ac_ext >&5
17720
Martin v. Löwiseba40652007-08-30 20:10:57 +000017721 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723
17724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017726fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017727ac_res=`eval echo '${'$as_ac_var'}'`
17728 { echo "$as_me:$LINENO: result: $ac_res" >&5
17729echo "${ECHO_T}$ac_res" >&6; }
17730if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017732#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017733_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017734
Guido van Rossume97ee181999-12-20 21:27:22 +000017735fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017736done
Guido van Rossume97ee181999-12-20 21:27:22 +000017737
Michael W. Hudson54241132001-12-07 15:38:26 +000017738
Guido van Rossume97ee181999-12-20 21:27:22 +000017739# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17740# loading of modules.
17741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017742{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17743echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017744if test -z "$DYNLOADFILE"
17745then
17746 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017747 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17748 if test "$ac_cv_func_dlopen" = yes
17749 then DYNLOADFILE="dynload_shlib.o"
17750 else DYNLOADFILE="dynload_aix.o"
17751 fi
17752 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017753 BeOS*) DYNLOADFILE="dynload_beos.o";;
17754 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017755 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17756 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017757 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017758 *)
17759 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17760 # out any dynamic loading
17761 if test "$ac_cv_func_dlopen" = yes
17762 then DYNLOADFILE="dynload_shlib.o"
17763 else DYNLOADFILE="dynload_stub.o"
17764 fi
17765 ;;
17766 esac
17767fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017768{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17769echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017770if test "$DYNLOADFILE" != "dynload_stub.o"
17771then
Martin v. Löwis11437992002-04-12 09:54:03 +000017772
17773cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017774#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017775_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017776
17777fi
17778
Neil Schemenauer4e425612001-06-19 15:44:15 +000017779# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17780
Michael W. Hudson54241132001-12-07 15:38:26 +000017781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017782{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17783echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017784if test -z "$MACHDEP_OBJS"
17785then
Jack Jansene578a632001-08-15 01:27:14 +000017786 MACHDEP_OBJS=$extra_machdep_objs
17787else
17788 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017789fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017790{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17791echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017792
Guido van Rossum627b2d71993-12-24 10:39:16 +000017793# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
17795
17796
17797
17798
17799
17800
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000017865
Martin v. Löwisc3001752005-01-23 09:27:24 +000017866
17867
Neal Norwitz05a45592006-03-20 06:30:08 +000017868
17869
Martin v. Löwis382abef2007-02-19 10:55:19 +000017870
17871
Christian Heimes36281872007-11-30 21:11:28 +000017872
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017873
17874
Jesse Noller355b1262009-04-02 00:03:28 +000017875
17876
17877
17878
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017879for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17880 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017881 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017882 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017883 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017884 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017885 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017886 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17887 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017888 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017889 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017890 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017891 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017892do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017893as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17894{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17895echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017896if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017897 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017898else
Martin v. Löwis11437992002-04-12 09:54:03 +000017899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017900/* confdefs.h. */
17901_ACEOF
17902cat confdefs.h >>conftest.$ac_ext
17903cat >>conftest.$ac_ext <<_ACEOF
17904/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017905/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17906 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17907#define $ac_func innocuous_$ac_func
17908
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017909/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017910 which can conflict with char $ac_func (); below.
17911 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017912 <limits.h> exists even on freestanding compilers. */
17913
17914#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017915# include <limits.h>
17916#else
17917# include <assert.h>
17918#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017919
17920#undef $ac_func
17921
Martin v. Löwiseba40652007-08-30 20:10:57 +000017922/* Override any GCC internal prototype to avoid an error.
17923 Use char because int might match the return type of a GCC
17924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017925#ifdef __cplusplus
17926extern "C"
17927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017928char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017929/* The GNU C library defines this for functions which it implements
17930 to always fail with ENOSYS. Some functions are actually named
17931 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017932#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017933choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017934#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017935
Skip Montanaro6dead952003-09-25 14:50:04 +000017936int
17937main ()
17938{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017939return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 ;
17941 return 0;
17942}
17943_ACEOF
17944rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017945if { (ac_try="$ac_link"
17946case "(($ac_try" in
17947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17948 *) ac_try_echo=$ac_try;;
17949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017953 grep -v '^ *+' conftest.er1 >conftest.err
17954 rm -f conftest.er1
17955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017957 (exit $ac_status); } && {
17958 test -z "$ac_c_werror_flag" ||
17959 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017960 } && test -s conftest$ac_exeext &&
17961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017965sed 's/^/| /' conftest.$ac_ext >&5
17966
Martin v. Löwiseba40652007-08-30 20:10:57 +000017967 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017969
17970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017971 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017973ac_res=`eval echo '${'$as_ac_var'}'`
17974 { echo "$as_me:$LINENO: result: $ac_res" >&5
17975echo "${ECHO_T}$ac_res" >&6; }
17976if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017978#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017979_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017980
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017981fi
17982done
17983
Michael W. Hudson54241132001-12-07 15:38:26 +000017984
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017985# For some functions, having a definition is not sufficient, since
17986# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017987{ echo "$as_me:$LINENO: checking for chroot" >&5
17988echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017990/* confdefs.h. */
17991_ACEOF
17992cat confdefs.h >>conftest.$ac_ext
17993cat >>conftest.$ac_ext <<_ACEOF
17994/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017996int
17997main ()
17998{
17999void *x=chroot
18000 ;
18001 return 0;
18002}
18003_ACEOF
18004rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018005if { (ac_try="$ac_compile"
18006case "(($ac_try" in
18007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18008 *) ac_try_echo=$ac_try;;
18009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018013 grep -v '^ *+' conftest.er1 >conftest.err
18014 rm -f conftest.er1
18015 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018017 (exit $ac_status); } && {
18018 test -z "$ac_c_werror_flag" ||
18019 test ! -s conftest.err
18020 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018021
18022cat >>confdefs.h <<\_ACEOF
18023#define HAVE_CHROOT 1
18024_ACEOF
18025
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018026 { echo "$as_me:$LINENO: result: yes" >&5
18027echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018030sed 's/^/| /' conftest.$ac_ext >&5
18031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018032 { echo "$as_me:$LINENO: result: no" >&5
18033echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018034
18035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018036
18037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018038{ echo "$as_me:$LINENO: checking for link" >&5
18039echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018041/* confdefs.h. */
18042_ACEOF
18043cat confdefs.h >>conftest.$ac_ext
18044cat >>conftest.$ac_ext <<_ACEOF
18045/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018046#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018047int
18048main ()
18049{
18050void *x=link
18051 ;
18052 return 0;
18053}
18054_ACEOF
18055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018056if { (ac_try="$ac_compile"
18057case "(($ac_try" in
18058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18059 *) ac_try_echo=$ac_try;;
18060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018064 grep -v '^ *+' conftest.er1 >conftest.err
18065 rm -f conftest.er1
18066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018068 (exit $ac_status); } && {
18069 test -z "$ac_c_werror_flag" ||
18070 test ! -s conftest.err
18071 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018072
18073cat >>confdefs.h <<\_ACEOF
18074#define HAVE_LINK 1
18075_ACEOF
18076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018077 { echo "$as_me:$LINENO: result: yes" >&5
18078echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018081sed 's/^/| /' conftest.$ac_ext >&5
18082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018083 { echo "$as_me:$LINENO: result: no" >&5
18084echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018085
18086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087
18088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018089{ echo "$as_me:$LINENO: checking for symlink" >&5
18090echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092/* confdefs.h. */
18093_ACEOF
18094cat confdefs.h >>conftest.$ac_ext
18095cat >>conftest.$ac_ext <<_ACEOF
18096/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018097#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018098int
18099main ()
18100{
18101void *x=symlink
18102 ;
18103 return 0;
18104}
18105_ACEOF
18106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018107if { (ac_try="$ac_compile"
18108case "(($ac_try" in
18109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18110 *) ac_try_echo=$ac_try;;
18111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018115 grep -v '^ *+' conftest.er1 >conftest.err
18116 rm -f conftest.er1
18117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018119 (exit $ac_status); } && {
18120 test -z "$ac_c_werror_flag" ||
18121 test ! -s conftest.err
18122 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018123
18124cat >>confdefs.h <<\_ACEOF
18125#define HAVE_SYMLINK 1
18126_ACEOF
18127
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018128 { echo "$as_me:$LINENO: result: yes" >&5
18129echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018132sed 's/^/| /' conftest.$ac_ext >&5
18133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018134 { echo "$as_me:$LINENO: result: no" >&5
18135echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018136
18137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138
18139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018140{ echo "$as_me:$LINENO: checking for fchdir" >&5
18141echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018143/* confdefs.h. */
18144_ACEOF
18145cat confdefs.h >>conftest.$ac_ext
18146cat >>conftest.$ac_ext <<_ACEOF
18147/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148#include <unistd.h>
18149int
18150main ()
18151{
18152void *x=fchdir
18153 ;
18154 return 0;
18155}
18156_ACEOF
18157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018158if { (ac_try="$ac_compile"
18159case "(($ac_try" in
18160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18161 *) ac_try_echo=$ac_try;;
18162esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018166 grep -v '^ *+' conftest.er1 >conftest.err
18167 rm -f conftest.er1
18168 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018170 (exit $ac_status); } && {
18171 test -z "$ac_c_werror_flag" ||
18172 test ! -s conftest.err
18173 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018174
18175cat >>confdefs.h <<\_ACEOF
18176#define HAVE_FCHDIR 1
18177_ACEOF
18178
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018179 { echo "$as_me:$LINENO: result: yes" >&5
18180echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018183sed 's/^/| /' conftest.$ac_ext >&5
18184
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018185 { echo "$as_me:$LINENO: result: no" >&5
18186echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018187
18188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018189
18190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018191{ echo "$as_me:$LINENO: checking for fsync" >&5
18192echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018193cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018194/* confdefs.h. */
18195_ACEOF
18196cat confdefs.h >>conftest.$ac_ext
18197cat >>conftest.$ac_ext <<_ACEOF
18198/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018199#include <unistd.h>
18200int
18201main ()
18202{
18203void *x=fsync
18204 ;
18205 return 0;
18206}
18207_ACEOF
18208rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018209if { (ac_try="$ac_compile"
18210case "(($ac_try" in
18211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18212 *) ac_try_echo=$ac_try;;
18213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018217 grep -v '^ *+' conftest.er1 >conftest.err
18218 rm -f conftest.er1
18219 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018221 (exit $ac_status); } && {
18222 test -z "$ac_c_werror_flag" ||
18223 test ! -s conftest.err
18224 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018225
18226cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018227#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018228_ACEOF
18229
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018230 { echo "$as_me:$LINENO: result: yes" >&5
18231echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018234sed 's/^/| /' conftest.$ac_ext >&5
18235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018236 { echo "$as_me:$LINENO: result: no" >&5
18237echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018238
18239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018240
18241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018242{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18243echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018245/* confdefs.h. */
18246_ACEOF
18247cat confdefs.h >>conftest.$ac_ext
18248cat >>conftest.$ac_ext <<_ACEOF
18249/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018250#include <unistd.h>
18251int
18252main ()
18253{
18254void *x=fdatasync
18255 ;
18256 return 0;
18257}
18258_ACEOF
18259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260if { (ac_try="$ac_compile"
18261case "(($ac_try" in
18262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18263 *) ac_try_echo=$ac_try;;
18264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 grep -v '^ *+' conftest.er1 >conftest.err
18269 rm -f conftest.er1
18270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272 (exit $ac_status); } && {
18273 test -z "$ac_c_werror_flag" ||
18274 test ! -s conftest.err
18275 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018276
18277cat >>confdefs.h <<\_ACEOF
18278#define HAVE_FDATASYNC 1
18279_ACEOF
18280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018281 { echo "$as_me:$LINENO: result: yes" >&5
18282echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018285sed 's/^/| /' conftest.$ac_ext >&5
18286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018287 { echo "$as_me:$LINENO: result: no" >&5
18288echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018289
18290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018291
18292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018293{ echo "$as_me:$LINENO: checking for epoll" >&5
18294echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018295cat >conftest.$ac_ext <<_ACEOF
18296/* confdefs.h. */
18297_ACEOF
18298cat confdefs.h >>conftest.$ac_ext
18299cat >>conftest.$ac_ext <<_ACEOF
18300/* end confdefs.h. */
18301#include <sys/epoll.h>
18302int
18303main ()
18304{
18305void *x=epoll_create
18306 ;
18307 return 0;
18308}
18309_ACEOF
18310rm -f conftest.$ac_objext
18311if { (ac_try="$ac_compile"
18312case "(($ac_try" in
18313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18314 *) ac_try_echo=$ac_try;;
18315esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018317 (eval "$ac_compile") 2>conftest.er1
18318 ac_status=$?
18319 grep -v '^ *+' conftest.er1 >conftest.err
18320 rm -f conftest.er1
18321 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018323 (exit $ac_status); } && {
18324 test -z "$ac_c_werror_flag" ||
18325 test ! -s conftest.err
18326 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018327
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018328cat >>confdefs.h <<\_ACEOF
18329#define HAVE_EPOLL 1
18330_ACEOF
18331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018332 { echo "$as_me:$LINENO: result: yes" >&5
18333echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018335 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018336sed 's/^/| /' conftest.$ac_ext >&5
18337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018338 { echo "$as_me:$LINENO: result: no" >&5
18339echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018340
18341fi
18342
18343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018344{ echo "$as_me:$LINENO: checking for kqueue" >&5
18345echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018346cat >conftest.$ac_ext <<_ACEOF
18347/* confdefs.h. */
18348_ACEOF
18349cat confdefs.h >>conftest.$ac_ext
18350cat >>conftest.$ac_ext <<_ACEOF
18351/* end confdefs.h. */
18352
18353#include <sys/types.h>
18354#include <sys/event.h>
18355
18356int
18357main ()
18358{
18359int x=kqueue()
18360 ;
18361 return 0;
18362}
18363_ACEOF
18364rm -f conftest.$ac_objext
18365if { (ac_try="$ac_compile"
18366case "(($ac_try" in
18367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18368 *) ac_try_echo=$ac_try;;
18369esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018371 (eval "$ac_compile") 2>conftest.er1
18372 ac_status=$?
18373 grep -v '^ *+' conftest.er1 >conftest.err
18374 rm -f conftest.er1
18375 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018377 (exit $ac_status); } && {
18378 test -z "$ac_c_werror_flag" ||
18379 test ! -s conftest.err
18380 } && test -s conftest.$ac_objext; then
18381
18382cat >>confdefs.h <<\_ACEOF
18383#define HAVE_KQUEUE 1
18384_ACEOF
18385
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018386 { echo "$as_me:$LINENO: result: yes" >&5
18387echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018389 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018390sed 's/^/| /' conftest.$ac_ext >&5
18391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018392 { echo "$as_me:$LINENO: result: no" >&5
18393echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018394
18395fi
18396
18397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018398# On some systems (eg. FreeBSD 5), we would find a definition of the
18399# functions ctermid_r, setgroups in the library, but no prototype
18400# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18401# address to avoid compiler warnings and potential miscompilations
18402# because of the missing prototypes.
18403
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018404{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18405echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018406cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018407/* confdefs.h. */
18408_ACEOF
18409cat confdefs.h >>conftest.$ac_ext
18410cat >>conftest.$ac_ext <<_ACEOF
18411/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018412
18413#include "confdefs.h"
18414#include <stdio.h>
18415
Martin v. Löwisd5843682002-11-21 20:41:28 +000018416int
18417main ()
18418{
18419void* p = ctermid_r
18420 ;
18421 return 0;
18422}
18423_ACEOF
18424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018425if { (ac_try="$ac_compile"
18426case "(($ac_try" in
18427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18428 *) ac_try_echo=$ac_try;;
18429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018433 grep -v '^ *+' conftest.er1 >conftest.err
18434 rm -f conftest.er1
18435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018437 (exit $ac_status); } && {
18438 test -z "$ac_c_werror_flag" ||
18439 test ! -s conftest.err
18440 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018441
18442cat >>confdefs.h <<\_ACEOF
18443#define HAVE_CTERMID_R 1
18444_ACEOF
18445
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018446 { echo "$as_me:$LINENO: result: yes" >&5
18447echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018450sed 's/^/| /' conftest.$ac_ext >&5
18451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018452 { echo "$as_me:$LINENO: result: no" >&5
18453echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018454
18455fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018456
Martin v. Löwiseba40652007-08-30 20:10:57 +000018457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18458
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018459{ echo "$as_me:$LINENO: checking for flock" >&5
18460echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018462/* confdefs.h. */
18463_ACEOF
18464cat confdefs.h >>conftest.$ac_ext
18465cat >>conftest.$ac_ext <<_ACEOF
18466/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018467
18468#include "confdefs.h"
18469#include <sys/file.h>
18470
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018471int
18472main ()
18473{
18474void* p = flock
18475 ;
18476 return 0;
18477}
18478_ACEOF
18479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018480if { (ac_try="$ac_compile"
18481case "(($ac_try" in
18482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18483 *) ac_try_echo=$ac_try;;
18484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018488 grep -v '^ *+' conftest.er1 >conftest.err
18489 rm -f conftest.er1
18490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492 (exit $ac_status); } && {
18493 test -z "$ac_c_werror_flag" ||
18494 test ! -s conftest.err
18495 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018496
18497cat >>confdefs.h <<\_ACEOF
18498#define HAVE_FLOCK 1
18499_ACEOF
18500
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018501 { echo "$as_me:$LINENO: result: yes" >&5
18502echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018505sed 's/^/| /' conftest.$ac_ext >&5
18506
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018507 { echo "$as_me:$LINENO: result: no" >&5
18508echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018509
18510fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018511
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018514{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18515echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018517/* confdefs.h. */
18518_ACEOF
18519cat confdefs.h >>conftest.$ac_ext
18520cat >>conftest.$ac_ext <<_ACEOF
18521/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018522
18523#include "confdefs.h"
18524#include <unistd.h>
18525
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018526int
18527main ()
18528{
18529void* p = getpagesize
18530 ;
18531 return 0;
18532}
18533_ACEOF
18534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018535if { (ac_try="$ac_compile"
18536case "(($ac_try" in
18537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18538 *) ac_try_echo=$ac_try;;
18539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018543 grep -v '^ *+' conftest.er1 >conftest.err
18544 rm -f conftest.er1
18545 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018547 (exit $ac_status); } && {
18548 test -z "$ac_c_werror_flag" ||
18549 test ! -s conftest.err
18550 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018551
18552cat >>confdefs.h <<\_ACEOF
18553#define HAVE_GETPAGESIZE 1
18554_ACEOF
18555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018556 { echo "$as_me:$LINENO: result: yes" >&5
18557echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018560sed 's/^/| /' conftest.$ac_ext >&5
18561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018562 { echo "$as_me:$LINENO: result: no" >&5
18563echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018564
18565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018566
18567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018568
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018569for ac_prog in true
18570do
18571 # Extract the first word of "$ac_prog", so it can be a program name with args.
18572set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018573{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018575if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018576 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018577else
18578 if test -n "$TRUE"; then
18579 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18580else
18581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18582for as_dir in $PATH
18583do
18584 IFS=$as_save_IFS
18585 test -z "$as_dir" && as_dir=.
18586 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587 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 +000018588 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018590 break 2
18591 fi
18592done
18593done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018594IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018595
18596fi
18597fi
18598TRUE=$ac_cv_prog_TRUE
18599if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018600 { echo "$as_me:$LINENO: result: $TRUE" >&5
18601echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018603 { echo "$as_me:$LINENO: result: no" >&5
18604echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018605fi
18606
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018608 test -n "$TRUE" && break
18609done
18610test -n "$TRUE" || TRUE="/bin/true"
18611
18612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018613{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18614echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018615if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018616 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018617else
18618 ac_check_lib_save_LIBS=$LIBS
18619LIBS="-lc $LIBS"
18620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018621/* confdefs.h. */
18622_ACEOF
18623cat confdefs.h >>conftest.$ac_ext
18624cat >>conftest.$ac_ext <<_ACEOF
18625/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018626
Martin v. Löwiseba40652007-08-30 20:10:57 +000018627/* Override any GCC internal prototype to avoid an error.
18628 Use char because int might match the return type of a GCC
18629 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018630#ifdef __cplusplus
18631extern "C"
18632#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018633char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018634int
18635main ()
18636{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018637return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018638 ;
18639 return 0;
18640}
18641_ACEOF
18642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643if { (ac_try="$ac_link"
18644case "(($ac_try" in
18645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18646 *) ac_try_echo=$ac_try;;
18647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018651 grep -v '^ *+' conftest.er1 >conftest.err
18652 rm -f conftest.er1
18653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 (exit $ac_status); } && {
18656 test -z "$ac_c_werror_flag" ||
18657 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018658 } && test -s conftest$ac_exeext &&
18659 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018660 ac_cv_lib_c_inet_aton=yes
18661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018663sed 's/^/| /' conftest.$ac_ext >&5
18664
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018667
18668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018670LIBS=$ac_check_lib_save_LIBS
18671fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018672{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18673echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18674if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018675 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018676else
18677
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018678{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18679echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018680if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018682else
18683 ac_check_lib_save_LIBS=$LIBS
18684LIBS="-lresolv $LIBS"
18685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018686/* confdefs.h. */
18687_ACEOF
18688cat confdefs.h >>conftest.$ac_ext
18689cat >>conftest.$ac_ext <<_ACEOF
18690/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018691
Martin v. Löwiseba40652007-08-30 20:10:57 +000018692/* Override any GCC internal prototype to avoid an error.
18693 Use char because int might match the return type of a GCC
18694 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018695#ifdef __cplusplus
18696extern "C"
18697#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018698char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018699int
18700main ()
18701{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018702return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018703 ;
18704 return 0;
18705}
18706_ACEOF
18707rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018708if { (ac_try="$ac_link"
18709case "(($ac_try" in
18710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18711 *) ac_try_echo=$ac_try;;
18712esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018716 grep -v '^ *+' conftest.er1 >conftest.err
18717 rm -f conftest.er1
18718 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018720 (exit $ac_status); } && {
18721 test -z "$ac_c_werror_flag" ||
18722 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018723 } && test -s conftest$ac_exeext &&
18724 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018725 ac_cv_lib_resolv_inet_aton=yes
18726else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018728sed 's/^/| /' conftest.$ac_ext >&5
18729
Martin v. Löwiseba40652007-08-30 20:10:57 +000018730 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018732
18733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018735LIBS=$ac_check_lib_save_LIBS
18736fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018737{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18738echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18739if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018740 cat >>confdefs.h <<_ACEOF
18741#define HAVE_LIBRESOLV 1
18742_ACEOF
18743
18744 LIBS="-lresolv $LIBS"
18745
18746fi
18747
18748
18749fi
18750
18751
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018752# On Tru64, chflags seems to be present, but calling it will
18753# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018754{ echo "$as_me:$LINENO: checking for chflags" >&5
18755echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018756if test "${ac_cv_have_chflags+set}" = set; then
18757 echo $ECHO_N "(cached) $ECHO_C" >&6
18758else
18759 if test "$cross_compiling" = yes; then
18760 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018761else
18762 cat >conftest.$ac_ext <<_ACEOF
18763/* confdefs.h. */
18764_ACEOF
18765cat confdefs.h >>conftest.$ac_ext
18766cat >>conftest.$ac_ext <<_ACEOF
18767/* end confdefs.h. */
18768
18769#include <sys/stat.h>
18770#include <unistd.h>
18771int main(int argc, char*argv[])
18772{
18773 if(chflags(argv[0], 0) != 0)
18774 return 1;
18775 return 0;
18776}
18777
18778_ACEOF
18779rm -f conftest$ac_exeext
18780if { (ac_try="$ac_link"
18781case "(($ac_try" in
18782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18783 *) ac_try_echo=$ac_try;;
18784esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018786 (eval "$ac_link") 2>&5
18787 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18790 { (case "(($ac_try" in
18791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18792 *) ac_try_echo=$ac_try;;
18793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018795 (eval "$ac_try") 2>&5
18796 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018798 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018799 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800else
18801 echo "$as_me: program exited with status $ac_status" >&5
18802echo "$as_me: failed program was:" >&5
18803sed 's/^/| /' conftest.$ac_ext >&5
18804
18805( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018806ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018807fi
18808rm -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 +000018809fi
18810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018811
18812
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018813fi
18814
18815{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18816echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18817if test $ac_cv_have_chflags = yes
18818then
18819
18820cat >>confdefs.h <<\_ACEOF
18821#define HAVE_CHFLAGS 1
18822_ACEOF
18823
18824fi
18825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018826{ echo "$as_me:$LINENO: checking for lchflags" >&5
18827echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018828if test "${ac_cv_have_lchflags+set}" = set; then
18829 echo $ECHO_N "(cached) $ECHO_C" >&6
18830else
18831 if test "$cross_compiling" = yes; then
18832 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018833else
18834 cat >conftest.$ac_ext <<_ACEOF
18835/* confdefs.h. */
18836_ACEOF
18837cat confdefs.h >>conftest.$ac_ext
18838cat >>conftest.$ac_ext <<_ACEOF
18839/* end confdefs.h. */
18840
18841#include <sys/stat.h>
18842#include <unistd.h>
18843int main(int argc, char*argv[])
18844{
18845 if(lchflags(argv[0], 0) != 0)
18846 return 1;
18847 return 0;
18848}
18849
18850_ACEOF
18851rm -f conftest$ac_exeext
18852if { (ac_try="$ac_link"
18853case "(($ac_try" in
18854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18855 *) ac_try_echo=$ac_try;;
18856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018858 (eval "$ac_link") 2>&5
18859 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18862 { (case "(($ac_try" in
18863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18864 *) ac_try_echo=$ac_try;;
18865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018867 (eval "$ac_try") 2>&5
18868 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018870 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018871 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018872else
18873 echo "$as_me: program exited with status $ac_status" >&5
18874echo "$as_me: failed program was:" >&5
18875sed 's/^/| /' conftest.$ac_ext >&5
18876
18877( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018878ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018879fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18881fi
18882
18883
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018884
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018885fi
18886
18887{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18888echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18889if test $ac_cv_have_lchflags = yes
18890then
18891
18892cat >>confdefs.h <<\_ACEOF
18893#define HAVE_LCHFLAGS 1
18894_ACEOF
18895
18896fi
18897
Ronald Oussorenf8752642006-07-06 10:13:35 +000018898case $ac_sys_system/$ac_sys_release in
18899Darwin/*)
18900 _CUR_CFLAGS="${CFLAGS}"
18901 _CUR_LDFLAGS="${LDFLAGS}"
18902 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18903 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18904 ;;
18905esac
18906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018907{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18908echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018909if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018910 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018911else
18912 ac_check_lib_save_LIBS=$LIBS
18913LIBS="-lz $LIBS"
18914cat >conftest.$ac_ext <<_ACEOF
18915/* confdefs.h. */
18916_ACEOF
18917cat confdefs.h >>conftest.$ac_ext
18918cat >>conftest.$ac_ext <<_ACEOF
18919/* end confdefs.h. */
18920
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921/* Override any GCC internal prototype to avoid an error.
18922 Use char because int might match the return type of a GCC
18923 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018924#ifdef __cplusplus
18925extern "C"
18926#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018927char inflateCopy ();
18928int
18929main ()
18930{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018932 ;
18933 return 0;
18934}
18935_ACEOF
18936rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937if { (ac_try="$ac_link"
18938case "(($ac_try" in
18939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18940 *) ac_try_echo=$ac_try;;
18941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018944 ac_status=$?
18945 grep -v '^ *+' conftest.er1 >conftest.err
18946 rm -f conftest.er1
18947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949 (exit $ac_status); } && {
18950 test -z "$ac_c_werror_flag" ||
18951 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018952 } && test -s conftest$ac_exeext &&
18953 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018954 ac_cv_lib_z_inflateCopy=yes
18955else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018956 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018957sed 's/^/| /' conftest.$ac_ext >&5
18958
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018960fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018961
18962rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018963 conftest$ac_exeext conftest.$ac_ext
18964LIBS=$ac_check_lib_save_LIBS
18965fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018966{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18967echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18968if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018969
18970cat >>confdefs.h <<\_ACEOF
18971#define HAVE_ZLIB_COPY 1
18972_ACEOF
18973
18974fi
18975
18976
Ronald Oussorenf8752642006-07-06 10:13:35 +000018977case $ac_sys_system/$ac_sys_release in
18978Darwin/*)
18979 CFLAGS="${_CUR_CFLAGS}"
18980 LDFLAGS="${_CUR_LDFLAGS}"
18981 ;;
18982esac
18983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018984{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18985echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018987/* confdefs.h. */
18988_ACEOF
18989cat confdefs.h >>conftest.$ac_ext
18990cat >>conftest.$ac_ext <<_ACEOF
18991/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018992
18993#include "confdefs.h"
18994#include <netdb.h>
18995
Martin v. Löwise9416172003-05-03 10:12:45 +000018996int
18997main ()
18998{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018999void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019000 ;
19001 return 0;
19002}
19003_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019004rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019005if { (ac_try="$ac_link"
19006case "(($ac_try" in
19007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19008 *) ac_try_echo=$ac_try;;
19009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019013 grep -v '^ *+' conftest.er1 >conftest.err
19014 rm -f conftest.er1
19015 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019017 (exit $ac_status); } && {
19018 test -z "$ac_c_werror_flag" ||
19019 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019020 } && test -s conftest$ac_exeext &&
19021 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019022
19023cat >>confdefs.h <<\_ACEOF
19024#define HAVE_HSTRERROR 1
19025_ACEOF
19026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019027 { echo "$as_me:$LINENO: result: yes" >&5
19028echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019031sed 's/^/| /' conftest.$ac_ext >&5
19032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019033 { echo "$as_me:$LINENO: result: no" >&5
19034echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019035
19036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019037
19038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019041{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19042echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019044/* confdefs.h. */
19045_ACEOF
19046cat confdefs.h >>conftest.$ac_ext
19047cat >>conftest.$ac_ext <<_ACEOF
19048/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019049
19050#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019051#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019052#include <sys/socket.h>
19053#include <netinet/in.h>
19054#include <arpa/inet.h>
19055
Martin v. Löwise9416172003-05-03 10:12:45 +000019056int
19057main ()
19058{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019059void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019060 ;
19061 return 0;
19062}
19063_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019064rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019065if { (ac_try="$ac_link"
19066case "(($ac_try" in
19067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19068 *) ac_try_echo=$ac_try;;
19069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019073 grep -v '^ *+' conftest.er1 >conftest.err
19074 rm -f conftest.er1
19075 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019077 (exit $ac_status); } && {
19078 test -z "$ac_c_werror_flag" ||
19079 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019080 } && test -s conftest$ac_exeext &&
19081 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019082
19083cat >>confdefs.h <<\_ACEOF
19084#define HAVE_INET_ATON 1
19085_ACEOF
19086
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019087 { echo "$as_me:$LINENO: result: yes" >&5
19088echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019089else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019091sed 's/^/| /' conftest.$ac_ext >&5
19092
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019093 { echo "$as_me:$LINENO: result: no" >&5
19094echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019095
19096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019097
19098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019101{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19102echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019103cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019104/* confdefs.h. */
19105_ACEOF
19106cat confdefs.h >>conftest.$ac_ext
19107cat >>conftest.$ac_ext <<_ACEOF
19108/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019109
19110#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019111#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019112#include <sys/socket.h>
19113#include <netinet/in.h>
19114#include <arpa/inet.h>
19115
Martin v. Löwise9416172003-05-03 10:12:45 +000019116int
19117main ()
19118{
19119void* p = inet_pton
19120 ;
19121 return 0;
19122}
19123_ACEOF
19124rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019125if { (ac_try="$ac_compile"
19126case "(($ac_try" in
19127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19128 *) ac_try_echo=$ac_try;;
19129esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019133 grep -v '^ *+' conftest.er1 >conftest.err
19134 rm -f conftest.er1
19135 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019137 (exit $ac_status); } && {
19138 test -z "$ac_c_werror_flag" ||
19139 test ! -s conftest.err
19140 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019141
19142cat >>confdefs.h <<\_ACEOF
19143#define HAVE_INET_PTON 1
19144_ACEOF
19145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019146 { echo "$as_me:$LINENO: result: yes" >&5
19147echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019150sed 's/^/| /' conftest.$ac_ext >&5
19151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019152 { echo "$as_me:$LINENO: result: no" >&5
19153echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019154
19155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019156
19157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019158
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019159# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019160{ echo "$as_me:$LINENO: checking for setgroups" >&5
19161echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019162cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019163/* confdefs.h. */
19164_ACEOF
19165cat confdefs.h >>conftest.$ac_ext
19166cat >>conftest.$ac_ext <<_ACEOF
19167/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019168
19169#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019170#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019171#ifdef HAVE_GRP_H
19172#include <grp.h>
19173#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019174
Martin v. Löwisd5843682002-11-21 20:41:28 +000019175int
19176main ()
19177{
19178void* p = setgroups
19179 ;
19180 return 0;
19181}
19182_ACEOF
19183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019184if { (ac_try="$ac_compile"
19185case "(($ac_try" in
19186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19187 *) ac_try_echo=$ac_try;;
19188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019192 grep -v '^ *+' conftest.er1 >conftest.err
19193 rm -f conftest.er1
19194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019196 (exit $ac_status); } && {
19197 test -z "$ac_c_werror_flag" ||
19198 test ! -s conftest.err
19199 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019200
19201cat >>confdefs.h <<\_ACEOF
19202#define HAVE_SETGROUPS 1
19203_ACEOF
19204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019205 { echo "$as_me:$LINENO: result: yes" >&5
19206echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019207else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019209sed 's/^/| /' conftest.$ac_ext >&5
19210
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019211 { echo "$as_me:$LINENO: result: no" >&5
19212echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019213
19214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019215
19216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019217
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019218# check for openpty and forkpty
19219
Martin v. Löwis11437992002-04-12 09:54:03 +000019220
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019221for ac_func in openpty
19222do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019223as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19224{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19225echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019226if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019227 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019228else
Martin v. Löwis11437992002-04-12 09:54:03 +000019229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019230/* confdefs.h. */
19231_ACEOF
19232cat confdefs.h >>conftest.$ac_ext
19233cat >>conftest.$ac_ext <<_ACEOF
19234/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019235/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19236 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19237#define $ac_func innocuous_$ac_func
19238
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019239/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019240 which can conflict with char $ac_func (); below.
19241 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019242 <limits.h> exists even on freestanding compilers. */
19243
19244#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019245# include <limits.h>
19246#else
19247# include <assert.h>
19248#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019249
19250#undef $ac_func
19251
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252/* Override any GCC internal prototype to avoid an error.
19253 Use char because int might match the return type of a GCC
19254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019255#ifdef __cplusplus
19256extern "C"
19257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019258char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019259/* The GNU C library defines this for functions which it implements
19260 to always fail with ENOSYS. Some functions are actually named
19261 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019262#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019263choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019264#endif
19265
Skip Montanaro6dead952003-09-25 14:50:04 +000019266int
19267main ()
19268{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019269return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019270 ;
19271 return 0;
19272}
19273_ACEOF
19274rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019275if { (ac_try="$ac_link"
19276case "(($ac_try" in
19277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19278 *) ac_try_echo=$ac_try;;
19279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019283 grep -v '^ *+' conftest.er1 >conftest.err
19284 rm -f conftest.er1
19285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019287 (exit $ac_status); } && {
19288 test -z "$ac_c_werror_flag" ||
19289 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019290 } && test -s conftest$ac_exeext &&
19291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019295sed 's/^/| /' conftest.$ac_ext >&5
19296
Martin v. Löwiseba40652007-08-30 20:10:57 +000019297 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019298fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019299
19300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019301 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019302fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019303ac_res=`eval echo '${'$as_ac_var'}'`
19304 { echo "$as_me:$LINENO: result: $ac_res" >&5
19305echo "${ECHO_T}$ac_res" >&6; }
19306if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019308#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019309_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019310
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019312 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19313echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019314if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019315 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019316else
Martin v. Löwis11437992002-04-12 09:54:03 +000019317 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019318LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019320/* confdefs.h. */
19321_ACEOF
19322cat confdefs.h >>conftest.$ac_ext
19323cat >>conftest.$ac_ext <<_ACEOF
19324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019325
Martin v. Löwiseba40652007-08-30 20:10:57 +000019326/* Override any GCC internal prototype to avoid an error.
19327 Use char because int might match the return type of a GCC
19328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019329#ifdef __cplusplus
19330extern "C"
19331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019332char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019333int
19334main ()
19335{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019336return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 ;
19338 return 0;
19339}
19340_ACEOF
19341rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019342if { (ac_try="$ac_link"
19343case "(($ac_try" in
19344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19345 *) ac_try_echo=$ac_try;;
19346esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019348 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019350 grep -v '^ *+' conftest.er1 >conftest.err
19351 rm -f conftest.er1
19352 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019354 (exit $ac_status); } && {
19355 test -z "$ac_c_werror_flag" ||
19356 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019357 } && test -s conftest$ac_exeext &&
19358 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019359 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019362sed 's/^/| /' conftest.$ac_ext >&5
19363
Martin v. Löwiseba40652007-08-30 20:10:57 +000019364 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019366
19367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019369LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019371{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19372echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19373if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019375#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019376_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019377 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019379 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19380echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019381if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019383else
19384 ac_check_lib_save_LIBS=$LIBS
19385LIBS="-lbsd $LIBS"
19386cat >conftest.$ac_ext <<_ACEOF
19387/* confdefs.h. */
19388_ACEOF
19389cat confdefs.h >>conftest.$ac_ext
19390cat >>conftest.$ac_ext <<_ACEOF
19391/* end confdefs.h. */
19392
Martin v. Löwiseba40652007-08-30 20:10:57 +000019393/* Override any GCC internal prototype to avoid an error.
19394 Use char because int might match the return type of a GCC
19395 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019396#ifdef __cplusplus
19397extern "C"
19398#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019399char openpty ();
19400int
19401main ()
19402{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019403return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019404 ;
19405 return 0;
19406}
19407_ACEOF
19408rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019409if { (ac_try="$ac_link"
19410case "(($ac_try" in
19411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19412 *) ac_try_echo=$ac_try;;
19413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019416 ac_status=$?
19417 grep -v '^ *+' conftest.er1 >conftest.err
19418 rm -f conftest.er1
19419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421 (exit $ac_status); } && {
19422 test -z "$ac_c_werror_flag" ||
19423 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019424 } && test -s conftest$ac_exeext &&
19425 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019426 ac_cv_lib_bsd_openpty=yes
19427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019428 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019429sed 's/^/| /' conftest.$ac_ext >&5
19430
Martin v. Löwiseba40652007-08-30 20:10:57 +000019431 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433
19434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019435 conftest$ac_exeext conftest.$ac_ext
19436LIBS=$ac_check_lib_save_LIBS
19437fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019438{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19439echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19440if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019441 cat >>confdefs.h <<\_ACEOF
19442#define HAVE_OPENPTY 1
19443_ACEOF
19444 LIBS="$LIBS -lbsd"
19445fi
19446
19447
19448fi
19449
Fred Drake8cef4cf2000-06-28 16:40:38 +000019450
19451fi
19452done
19453
Martin v. Löwis11437992002-04-12 09:54:03 +000019454
Fred Drake8cef4cf2000-06-28 16:40:38 +000019455for ac_func in forkpty
19456do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019457as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19458{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19459echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019460if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019461 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019462else
Martin v. Löwis11437992002-04-12 09:54:03 +000019463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019464/* confdefs.h. */
19465_ACEOF
19466cat confdefs.h >>conftest.$ac_ext
19467cat >>conftest.$ac_ext <<_ACEOF
19468/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019469/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19470 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19471#define $ac_func innocuous_$ac_func
19472
Fred Drake8cef4cf2000-06-28 16:40:38 +000019473/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019474 which can conflict with char $ac_func (); below.
19475 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019476 <limits.h> exists even on freestanding compilers. */
19477
19478#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019479# include <limits.h>
19480#else
19481# include <assert.h>
19482#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019483
19484#undef $ac_func
19485
Martin v. Löwiseba40652007-08-30 20:10:57 +000019486/* Override any GCC internal prototype to avoid an error.
19487 Use char because int might match the return type of a GCC
19488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019489#ifdef __cplusplus
19490extern "C"
19491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019492char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019493/* The GNU C library defines this for functions which it implements
19494 to always fail with ENOSYS. Some functions are actually named
19495 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019496#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019497choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019498#endif
19499
Skip Montanaro6dead952003-09-25 14:50:04 +000019500int
19501main ()
19502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019504 ;
19505 return 0;
19506}
19507_ACEOF
19508rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509if { (ac_try="$ac_link"
19510case "(($ac_try" in
19511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19512 *) ac_try_echo=$ac_try;;
19513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019517 grep -v '^ *+' conftest.er1 >conftest.err
19518 rm -f conftest.er1
19519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521 (exit $ac_status); } && {
19522 test -z "$ac_c_werror_flag" ||
19523 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019524 } && test -s conftest$ac_exeext &&
19525 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019526 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019528 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019529sed 's/^/| /' conftest.$ac_ext >&5
19530
Martin v. Löwiseba40652007-08-30 20:10:57 +000019531 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019533
19534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019535 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019536fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019537ac_res=`eval echo '${'$as_ac_var'}'`
19538 { echo "$as_me:$LINENO: result: $ac_res" >&5
19539echo "${ECHO_T}$ac_res" >&6; }
19540if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019542#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019543_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019544
Fred Drake8cef4cf2000-06-28 16:40:38 +000019545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019546 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19547echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019548if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019549 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019550else
Martin v. Löwis11437992002-04-12 09:54:03 +000019551 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019552LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019553cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019554/* confdefs.h. */
19555_ACEOF
19556cat confdefs.h >>conftest.$ac_ext
19557cat >>conftest.$ac_ext <<_ACEOF
19558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019559
Martin v. Löwiseba40652007-08-30 20:10:57 +000019560/* Override any GCC internal prototype to avoid an error.
19561 Use char because int might match the return type of a GCC
19562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019563#ifdef __cplusplus
19564extern "C"
19565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019566char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019567int
19568main ()
19569{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019570return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019571 ;
19572 return 0;
19573}
19574_ACEOF
19575rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576if { (ac_try="$ac_link"
19577case "(($ac_try" in
19578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19579 *) ac_try_echo=$ac_try;;
19580esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019582 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019584 grep -v '^ *+' conftest.er1 >conftest.err
19585 rm -f conftest.er1
19586 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019588 (exit $ac_status); } && {
19589 test -z "$ac_c_werror_flag" ||
19590 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019591 } && test -s conftest$ac_exeext &&
19592 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019594else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019596sed 's/^/| /' conftest.$ac_ext >&5
19597
Martin v. Löwiseba40652007-08-30 20:10:57 +000019598 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019600
19601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019602 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019603LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019604fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019605{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19606echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19607if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019609#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019610_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019611 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019612else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019613 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19614echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019615if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019616 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019617else
19618 ac_check_lib_save_LIBS=$LIBS
19619LIBS="-lbsd $LIBS"
19620cat >conftest.$ac_ext <<_ACEOF
19621/* confdefs.h. */
19622_ACEOF
19623cat confdefs.h >>conftest.$ac_ext
19624cat >>conftest.$ac_ext <<_ACEOF
19625/* end confdefs.h. */
19626
Martin v. Löwiseba40652007-08-30 20:10:57 +000019627/* Override any GCC internal prototype to avoid an error.
19628 Use char because int might match the return type of a GCC
19629 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019630#ifdef __cplusplus
19631extern "C"
19632#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019633char forkpty ();
19634int
19635main ()
19636{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019638 ;
19639 return 0;
19640}
19641_ACEOF
19642rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643if { (ac_try="$ac_link"
19644case "(($ac_try" in
19645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19646 *) ac_try_echo=$ac_try;;
19647esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019650 ac_status=$?
19651 grep -v '^ *+' conftest.er1 >conftest.err
19652 rm -f conftest.er1
19653 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019655 (exit $ac_status); } && {
19656 test -z "$ac_c_werror_flag" ||
19657 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019658 } && test -s conftest$ac_exeext &&
19659 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019660 ac_cv_lib_bsd_forkpty=yes
19661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019662 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019663sed 's/^/| /' conftest.$ac_ext >&5
19664
Martin v. Löwiseba40652007-08-30 20:10:57 +000019665 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667
19668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019669 conftest$ac_exeext conftest.$ac_ext
19670LIBS=$ac_check_lib_save_LIBS
19671fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019672{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19673echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19674if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019675 cat >>confdefs.h <<\_ACEOF
19676#define HAVE_FORKPTY 1
19677_ACEOF
19678 LIBS="$LIBS -lbsd"
19679fi
19680
19681
19682fi
19683
Fred Drake8cef4cf2000-06-28 16:40:38 +000019684
19685fi
19686done
19687
Jack Jansendd19cf82001-12-06 22:36:17 +000019688
Brett Cannonaa5778d2008-03-18 04:09:00 +000019689# Stuff for expat.
19690
19691for ac_func in memmove
19692do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19694{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019696if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019697 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019698else
19699 cat >conftest.$ac_ext <<_ACEOF
19700/* confdefs.h. */
19701_ACEOF
19702cat confdefs.h >>conftest.$ac_ext
19703cat >>conftest.$ac_ext <<_ACEOF
19704/* end confdefs.h. */
19705/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19706 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19707#define $ac_func innocuous_$ac_func
19708
19709/* System header to define __stub macros and hopefully few prototypes,
19710 which can conflict with char $ac_func (); below.
19711 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19712 <limits.h> exists even on freestanding compilers. */
19713
19714#ifdef __STDC__
19715# include <limits.h>
19716#else
19717# include <assert.h>
19718#endif
19719
19720#undef $ac_func
19721
19722/* Override any GCC internal prototype to avoid an error.
19723 Use char because int might match the return type of a GCC
19724 builtin and then its argument prototype would still apply. */
19725#ifdef __cplusplus
19726extern "C"
19727#endif
19728char $ac_func ();
19729/* The GNU C library defines this for functions which it implements
19730 to always fail with ENOSYS. Some functions are actually named
19731 something starting with __ and the normal name is an alias. */
19732#if defined __stub_$ac_func || defined __stub___$ac_func
19733choke me
19734#endif
19735
19736int
19737main ()
19738{
19739return $ac_func ();
19740 ;
19741 return 0;
19742}
19743_ACEOF
19744rm -f conftest.$ac_objext conftest$ac_exeext
19745if { (ac_try="$ac_link"
19746case "(($ac_try" in
19747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19748 *) ac_try_echo=$ac_try;;
19749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019751 (eval "$ac_link") 2>conftest.er1
19752 ac_status=$?
19753 grep -v '^ *+' conftest.er1 >conftest.err
19754 rm -f conftest.er1
19755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019757 (exit $ac_status); } && {
19758 test -z "$ac_c_werror_flag" ||
19759 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019760 } && test -s conftest$ac_exeext &&
19761 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019762 eval "$as_ac_var=yes"
19763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019764 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019765sed 's/^/| /' conftest.$ac_ext >&5
19766
19767 eval "$as_ac_var=no"
19768fi
19769
19770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19771 conftest$ac_exeext conftest.$ac_ext
19772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019773ac_res=`eval echo '${'$as_ac_var'}'`
19774 { echo "$as_me:$LINENO: result: $ac_res" >&5
19775echo "${ECHO_T}$ac_res" >&6; }
19776if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019777 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019779_ACEOF
19780
19781fi
19782done
19783
19784
Michael W. Hudson54241132001-12-07 15:38:26 +000019785# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019786
19787
19788
19789
19790
19791
Fred Drake8cef4cf2000-06-28 16:40:38 +000019792for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19793do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019794as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19795{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19796echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019797if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019799else
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019801/* confdefs.h. */
19802_ACEOF
19803cat confdefs.h >>conftest.$ac_ext
19804cat >>conftest.$ac_ext <<_ACEOF
19805/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019806/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19807 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19808#define $ac_func innocuous_$ac_func
19809
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019810/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019811 which can conflict with char $ac_func (); below.
19812 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019813 <limits.h> exists even on freestanding compilers. */
19814
19815#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019816# include <limits.h>
19817#else
19818# include <assert.h>
19819#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019820
19821#undef $ac_func
19822
Martin v. Löwiseba40652007-08-30 20:10:57 +000019823/* Override any GCC internal prototype to avoid an error.
19824 Use char because int might match the return type of a GCC
19825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019826#ifdef __cplusplus
19827extern "C"
19828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019829char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019830/* The GNU C library defines this for functions which it implements
19831 to always fail with ENOSYS. Some functions are actually named
19832 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019833#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019834choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019835#endif
19836
Skip Montanaro6dead952003-09-25 14:50:04 +000019837int
19838main ()
19839{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019841 ;
19842 return 0;
19843}
19844_ACEOF
19845rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019846if { (ac_try="$ac_link"
19847case "(($ac_try" in
19848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19849 *) ac_try_echo=$ac_try;;
19850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019854 grep -v '^ *+' conftest.er1 >conftest.err
19855 rm -f conftest.er1
19856 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019858 (exit $ac_status); } && {
19859 test -z "$ac_c_werror_flag" ||
19860 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019861 } && test -s conftest$ac_exeext &&
19862 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019863 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019864else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019866sed 's/^/| /' conftest.$ac_ext >&5
19867
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870
19871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019872 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019873fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019874ac_res=`eval echo '${'$as_ac_var'}'`
19875 { echo "$as_me:$LINENO: result: $ac_res" >&5
19876echo "${ECHO_T}$ac_res" >&6; }
19877if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019879#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019880_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019881
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019882fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019883done
19884
Michael W. Hudson54241132001-12-07 15:38:26 +000019885
Martin v. Löwis11437992002-04-12 09:54:03 +000019886
19887
19888
Brett Cannonaa5778d2008-03-18 04:09:00 +000019889for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019890do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019891as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19892{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19893echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019894if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019896else
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019898/* confdefs.h. */
19899_ACEOF
19900cat confdefs.h >>conftest.$ac_ext
19901cat >>conftest.$ac_ext <<_ACEOF
19902/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019903/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19904 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19905#define $ac_func innocuous_$ac_func
19906
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019907/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019908 which can conflict with char $ac_func (); below.
19909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019910 <limits.h> exists even on freestanding compilers. */
19911
19912#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019913# include <limits.h>
19914#else
19915# include <assert.h>
19916#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019917
19918#undef $ac_func
19919
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920/* Override any GCC internal prototype to avoid an error.
19921 Use char because int might match the return type of a GCC
19922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019923#ifdef __cplusplus
19924extern "C"
19925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019926char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019927/* The GNU C library defines this for functions which it implements
19928 to always fail with ENOSYS. Some functions are actually named
19929 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019931choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019932#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019933
Skip Montanaro6dead952003-09-25 14:50:04 +000019934int
19935main ()
19936{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019937return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 ;
19939 return 0;
19940}
19941_ACEOF
19942rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019943if { (ac_try="$ac_link"
19944case "(($ac_try" in
19945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19946 *) ac_try_echo=$ac_try;;
19947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019949 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019951 grep -v '^ *+' conftest.er1 >conftest.err
19952 rm -f conftest.er1
19953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019955 (exit $ac_status); } && {
19956 test -z "$ac_c_werror_flag" ||
19957 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019958 } && test -s conftest$ac_exeext &&
19959 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019960 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019963sed 's/^/| /' conftest.$ac_ext >&5
19964
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967
19968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019970fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019971ac_res=`eval echo '${'$as_ac_var'}'`
19972 { echo "$as_me:$LINENO: result: $ac_res" >&5
19973echo "${ECHO_T}$ac_res" >&6; }
19974if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019976#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019977_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019978
Martin v. Löwis1142de32002-03-29 16:28:31 +000019979else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019981 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19983 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019984esac
19985
Martin v. Löwis1142de32002-03-29 16:28:31 +000019986fi
19987done
19988
19989
Martin v. Löwis11437992002-04-12 09:54:03 +000019990
Martin v. Löwis1142de32002-03-29 16:28:31 +000019991for ac_func in getpgrp
19992do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019993as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19994{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19995echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019996if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019997 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019998else
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020000/* confdefs.h. */
20001_ACEOF
20002cat confdefs.h >>conftest.$ac_ext
20003cat >>conftest.$ac_ext <<_ACEOF
20004/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020005/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20006 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20007#define $ac_func innocuous_$ac_func
20008
Martin v. Löwis1142de32002-03-29 16:28:31 +000020009/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020010 which can conflict with char $ac_func (); below.
20011 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020012 <limits.h> exists even on freestanding compilers. */
20013
20014#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020015# include <limits.h>
20016#else
20017# include <assert.h>
20018#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020019
20020#undef $ac_func
20021
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022/* Override any GCC internal prototype to avoid an error.
20023 Use char because int might match the return type of a GCC
20024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020025#ifdef __cplusplus
20026extern "C"
20027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020028char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020029/* The GNU C library defines this for functions which it implements
20030 to always fail with ENOSYS. Some functions are actually named
20031 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020033choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020034#endif
20035
Skip Montanaro6dead952003-09-25 14:50:04 +000020036int
20037main ()
20038{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020039return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020040 ;
20041 return 0;
20042}
20043_ACEOF
20044rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045if { (ac_try="$ac_link"
20046case "(($ac_try" in
20047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20048 *) ac_try_echo=$ac_try;;
20049esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020053 grep -v '^ *+' conftest.er1 >conftest.err
20054 rm -f conftest.er1
20055 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020057 (exit $ac_status); } && {
20058 test -z "$ac_c_werror_flag" ||
20059 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020060 } && test -s conftest$ac_exeext &&
20061 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020062 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020065sed 's/^/| /' conftest.$ac_ext >&5
20066
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069
20070rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020071 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020072fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020073ac_res=`eval echo '${'$as_ac_var'}'`
20074 { echo "$as_me:$LINENO: result: $ac_res" >&5
20075echo "${ECHO_T}$ac_res" >&6; }
20076if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020078#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020079_ACEOF
20080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020081/* confdefs.h. */
20082_ACEOF
20083cat confdefs.h >>conftest.$ac_ext
20084cat >>conftest.$ac_ext <<_ACEOF
20085/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020086#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020087int
20088main ()
20089{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020090getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 ;
20092 return 0;
20093}
20094_ACEOF
20095rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096if { (ac_try="$ac_compile"
20097case "(($ac_try" in
20098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20099 *) ac_try_echo=$ac_try;;
20100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020104 grep -v '^ *+' conftest.er1 >conftest.err
20105 rm -f conftest.er1
20106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020108 (exit $ac_status); } && {
20109 test -z "$ac_c_werror_flag" ||
20110 test ! -s conftest.err
20111 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020112
20113cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020114#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020115_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020116
Martin v. Löwis11437992002-04-12 09:54:03 +000020117
Guido van Rossumf78abae1997-01-21 22:02:36 +000020118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020120sed 's/^/| /' conftest.$ac_ext >&5
20121
Martin v. Löwiseba40652007-08-30 20:10:57 +000020122
Guido van Rossum627b2d71993-12-24 10:39:16 +000020123fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020124
20125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020126
Guido van Rossum627b2d71993-12-24 10:39:16 +000020127fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020128done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020129
Jack Jansen150753c2003-03-29 22:07:47 +000020130
20131for ac_func in setpgrp
20132do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020133as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20134{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20135echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020136if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020137 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020138else
Martin v. Löwis11437992002-04-12 09:54:03 +000020139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020140/* confdefs.h. */
20141_ACEOF
20142cat confdefs.h >>conftest.$ac_ext
20143cat >>conftest.$ac_ext <<_ACEOF
20144/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020145/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20146 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20147#define $ac_func innocuous_$ac_func
20148
Jack Jansen150753c2003-03-29 22:07:47 +000020149/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020150 which can conflict with char $ac_func (); below.
20151 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020152 <limits.h> exists even on freestanding compilers. */
20153
20154#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020155# include <limits.h>
20156#else
20157# include <assert.h>
20158#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020159
20160#undef $ac_func
20161
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162/* Override any GCC internal prototype to avoid an error.
20163 Use char because int might match the return type of a GCC
20164 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020165#ifdef __cplusplus
20166extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020167#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020168char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020169/* The GNU C library defines this for functions which it implements
20170 to always fail with ENOSYS. Some functions are actually named
20171 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020173choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020174#endif
20175
Skip Montanaro6dead952003-09-25 14:50:04 +000020176int
20177main ()
20178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020179return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 ;
20181 return 0;
20182}
20183_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185if { (ac_try="$ac_link"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020200 } && test -s conftest$ac_exeext &&
20201 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020202 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020205sed 's/^/| /' conftest.$ac_ext >&5
20206
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209
20210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020211 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020213ac_res=`eval echo '${'$as_ac_var'}'`
20214 { echo "$as_me:$LINENO: result: $ac_res" >&5
20215echo "${ECHO_T}$ac_res" >&6; }
20216if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020217 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020218#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020219_ACEOF
20220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020221/* confdefs.h. */
20222_ACEOF
20223cat confdefs.h >>conftest.$ac_ext
20224cat >>conftest.$ac_ext <<_ACEOF
20225/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020226#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020227int
20228main ()
20229{
20230setpgrp(0,0);
20231 ;
20232 return 0;
20233}
20234_ACEOF
20235rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236if { (ac_try="$ac_compile"
20237case "(($ac_try" in
20238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20239 *) ac_try_echo=$ac_try;;
20240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020244 grep -v '^ *+' conftest.er1 >conftest.err
20245 rm -f conftest.er1
20246 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020248 (exit $ac_status); } && {
20249 test -z "$ac_c_werror_flag" ||
20250 test ! -s conftest.err
20251 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020252
20253cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020254#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020255_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020256
Jack Jansen150753c2003-03-29 22:07:47 +000020257
20258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020260sed 's/^/| /' conftest.$ac_ext >&5
20261
Martin v. Löwiseba40652007-08-30 20:10:57 +000020262
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020264
20265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020266
20267fi
20268done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020269
Martin v. Löwis11437992002-04-12 09:54:03 +000020270
Thomas Wouters3a584202000-08-05 23:28:51 +000020271for ac_func in gettimeofday
20272do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020273as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20274{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20275echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020277 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020278else
Martin v. Löwis11437992002-04-12 09:54:03 +000020279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020280/* confdefs.h. */
20281_ACEOF
20282cat confdefs.h >>conftest.$ac_ext
20283cat >>conftest.$ac_ext <<_ACEOF
20284/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020285/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20286 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20287#define $ac_func innocuous_$ac_func
20288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020289/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020290 which can conflict with char $ac_func (); below.
20291 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020292 <limits.h> exists even on freestanding compilers. */
20293
20294#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020295# include <limits.h>
20296#else
20297# include <assert.h>
20298#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020299
20300#undef $ac_func
20301
Martin v. Löwiseba40652007-08-30 20:10:57 +000020302/* Override any GCC internal prototype to avoid an error.
20303 Use char because int might match the return type of a GCC
20304 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020305#ifdef __cplusplus
20306extern "C"
20307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020308char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020309/* The GNU C library defines this for functions which it implements
20310 to always fail with ENOSYS. Some functions are actually named
20311 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020312#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020313choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020314#endif
20315
Skip Montanaro6dead952003-09-25 14:50:04 +000020316int
20317main ()
20318{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020319return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020320 ;
20321 return 0;
20322}
20323_ACEOF
20324rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020325if { (ac_try="$ac_link"
20326case "(($ac_try" in
20327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20328 *) ac_try_echo=$ac_try;;
20329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020333 grep -v '^ *+' conftest.er1 >conftest.err
20334 rm -f conftest.er1
20335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020337 (exit $ac_status); } && {
20338 test -z "$ac_c_werror_flag" ||
20339 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020340 } && test -s conftest$ac_exeext &&
20341 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020342 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020345sed 's/^/| /' conftest.$ac_ext >&5
20346
Martin v. Löwiseba40652007-08-30 20:10:57 +000020347 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020349
20350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020351 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020352fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020353ac_res=`eval echo '${'$as_ac_var'}'`
20354 { echo "$as_me:$LINENO: result: $ac_res" >&5
20355echo "${ECHO_T}$ac_res" >&6; }
20356if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020359_ACEOF
20360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020361/* confdefs.h. */
20362_ACEOF
20363cat confdefs.h >>conftest.$ac_ext
20364cat >>conftest.$ac_ext <<_ACEOF
20365/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020366#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020367int
20368main ()
20369{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020370gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 ;
20372 return 0;
20373}
20374_ACEOF
20375rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376if { (ac_try="$ac_compile"
20377case "(($ac_try" in
20378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20379 *) ac_try_echo=$ac_try;;
20380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020382 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020384 grep -v '^ *+' conftest.er1 >conftest.err
20385 rm -f conftest.er1
20386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020388 (exit $ac_status); } && {
20389 test -z "$ac_c_werror_flag" ||
20390 test ! -s conftest.err
20391 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020392 :
20393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020395sed 's/^/| /' conftest.$ac_ext >&5
20396
Martin v. Löwis11437992002-04-12 09:54:03 +000020397
20398cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020399#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020400_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020401
Martin v. Löwis11437992002-04-12 09:54:03 +000020402
Guido van Rossum627b2d71993-12-24 10:39:16 +000020403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020404
20405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020407fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020408done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020409
Michael W. Hudson54241132001-12-07 15:38:26 +000020410
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020411{ echo "$as_me:$LINENO: checking for major" >&5
20412echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020414/* confdefs.h. */
20415_ACEOF
20416cat confdefs.h >>conftest.$ac_ext
20417cat >>conftest.$ac_ext <<_ACEOF
20418/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020419
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020420#if defined(MAJOR_IN_MKDEV)
20421#include <sys/mkdev.h>
20422#elif defined(MAJOR_IN_SYSMACROS)
20423#include <sys/sysmacros.h>
20424#else
20425#include <sys/types.h>
20426#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020427
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020428int
20429main ()
20430{
20431
20432 makedev(major(0),minor(0));
20433
20434 ;
20435 return 0;
20436}
20437_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020438rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439if { (ac_try="$ac_link"
20440case "(($ac_try" in
20441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20442 *) ac_try_echo=$ac_try;;
20443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020447 grep -v '^ *+' conftest.er1 >conftest.err
20448 rm -f conftest.er1
20449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020451 (exit $ac_status); } && {
20452 test -z "$ac_c_werror_flag" ||
20453 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020454 } && test -s conftest$ac_exeext &&
20455 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020456
20457
20458cat >>confdefs.h <<\_ACEOF
20459#define HAVE_DEVICE_MACROS 1
20460_ACEOF
20461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020462 { echo "$as_me:$LINENO: result: yes" >&5
20463echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020464
20465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020467sed 's/^/| /' conftest.$ac_ext >&5
20468
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020470 { echo "$as_me:$LINENO: result: no" >&5
20471echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020472
20473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020474
20475rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020476 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020477
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020478# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020479# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020480{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20481echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020483/* confdefs.h. */
20484_ACEOF
20485cat confdefs.h >>conftest.$ac_ext
20486cat >>conftest.$ac_ext <<_ACEOF
20487/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020488
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020489#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020490#include <sys/socket.h>
20491#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020492#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020493
Martin v. Löwis11437992002-04-12 09:54:03 +000020494int
20495main ()
20496{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020497getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ;
20499 return 0;
20500}
20501_ACEOF
20502rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503if { (ac_try="$ac_link"
20504case "(($ac_try" in
20505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20506 *) ac_try_echo=$ac_try;;
20507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020511 grep -v '^ *+' conftest.er1 >conftest.err
20512 rm -f conftest.er1
20513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515 (exit $ac_status); } && {
20516 test -z "$ac_c_werror_flag" ||
20517 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020518 } && test -s conftest$ac_exeext &&
20519 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020520 have_getaddrinfo=yes
20521else
20522 echo "$as_me: failed program was:" >&5
20523sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020524
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020525 have_getaddrinfo=no
20526fi
20527
20528rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20529 conftest$ac_exeext conftest.$ac_ext
20530{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20531echo "${ECHO_T}$have_getaddrinfo" >&6; }
20532if test $have_getaddrinfo = yes
20533then
20534 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020535echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020536 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20537 echo $ECHO_N "(cached) $ECHO_C" >&6
20538else
20539 if test "$cross_compiling" = yes; then
20540 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020541else
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020543/* confdefs.h. */
20544_ACEOF
20545cat confdefs.h >>conftest.$ac_ext
20546cat >>conftest.$ac_ext <<_ACEOF
20547/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020548
20549#include <sys/types.h>
20550#include <netdb.h>
20551#include <string.h>
20552#include <sys/socket.h>
20553#include <netinet/in.h>
20554
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020555int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020556{
20557 int passive, gaierr, inet4 = 0, inet6 = 0;
20558 struct addrinfo hints, *ai, *aitop;
20559 char straddr[INET6_ADDRSTRLEN], strport[16];
20560
20561 for (passive = 0; passive <= 1; passive++) {
20562 memset(&hints, 0, sizeof(hints));
20563 hints.ai_family = AF_UNSPEC;
20564 hints.ai_flags = passive ? AI_PASSIVE : 0;
20565 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020566 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020567 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20568 (void)gai_strerror(gaierr);
20569 goto bad;
20570 }
20571 for (ai = aitop; ai; ai = ai->ai_next) {
20572 if (ai->ai_addr == NULL ||
20573 ai->ai_addrlen == 0 ||
20574 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20575 straddr, sizeof(straddr), strport, sizeof(strport),
20576 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20577 goto bad;
20578 }
20579 switch (ai->ai_family) {
20580 case AF_INET:
20581 if (strcmp(strport, "54321") != 0) {
20582 goto bad;
20583 }
20584 if (passive) {
20585 if (strcmp(straddr, "0.0.0.0") != 0) {
20586 goto bad;
20587 }
20588 } else {
20589 if (strcmp(straddr, "127.0.0.1") != 0) {
20590 goto bad;
20591 }
20592 }
20593 inet4++;
20594 break;
20595 case AF_INET6:
20596 if (strcmp(strport, "54321") != 0) {
20597 goto bad;
20598 }
20599 if (passive) {
20600 if (strcmp(straddr, "::") != 0) {
20601 goto bad;
20602 }
20603 } else {
20604 if (strcmp(straddr, "::1") != 0) {
20605 goto bad;
20606 }
20607 }
20608 inet6++;
20609 break;
20610 case AF_UNSPEC:
20611 goto bad;
20612 break;
20613 default:
20614 /* another family support? */
20615 break;
20616 }
20617 }
20618 }
20619
20620 if (!(inet4 == 0 || inet4 == 2))
20621 goto bad;
20622 if (!(inet6 == 0 || inet6 == 2))
20623 goto bad;
20624
20625 if (aitop)
20626 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020627 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020628
20629 bad:
20630 if (aitop)
20631 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020632 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020633}
20634
Martin v. Löwis11437992002-04-12 09:54:03 +000020635_ACEOF
20636rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020637if { (ac_try="$ac_link"
20638case "(($ac_try" in
20639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20640 *) ac_try_echo=$ac_try;;
20641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020643 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020647 { (case "(($ac_try" in
20648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20649 *) ac_try_echo=$ac_try;;
20650esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020656 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020657else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020658 echo "$as_me: program exited with status $ac_status" >&5
20659echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020660sed 's/^/| /' conftest.$ac_ext >&5
20661
Martin v. Löwis11437992002-04-12 09:54:03 +000020662( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020663ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020665rm -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 +000020666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020667
20668
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020669fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020670
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020673if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20674then
20675 if test $ipv6 = yes
20676 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020677 echo 'Fatal: You must get working getaddrinfo() function.'
20678 echo ' or you can specify "--disable-ipv6"'.
20679 exit 1
20680 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020681else
Martin v. Löwis11437992002-04-12 09:54:03 +000020682
20683cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020684#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020685_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020686
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020687fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020688
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020689for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020690do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020691as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20692{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20693echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020695 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696else
Martin v. Löwis11437992002-04-12 09:54:03 +000020697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020698/* confdefs.h. */
20699_ACEOF
20700cat confdefs.h >>conftest.$ac_ext
20701cat >>conftest.$ac_ext <<_ACEOF
20702/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020703/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20704 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20705#define $ac_func innocuous_$ac_func
20706
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020707/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020708 which can conflict with char $ac_func (); below.
20709 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020710 <limits.h> exists even on freestanding compilers. */
20711
20712#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020713# include <limits.h>
20714#else
20715# include <assert.h>
20716#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020717
20718#undef $ac_func
20719
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720/* Override any GCC internal prototype to avoid an error.
20721 Use char because int might match the return type of a GCC
20722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020723#ifdef __cplusplus
20724extern "C"
20725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020726char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020727/* The GNU C library defines this for functions which it implements
20728 to always fail with ENOSYS. Some functions are actually named
20729 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020730#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020731choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732#endif
20733
Skip Montanaro6dead952003-09-25 14:50:04 +000020734int
20735main ()
20736{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 ;
20739 return 0;
20740}
20741_ACEOF
20742rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020743if { (ac_try="$ac_link"
20744case "(($ac_try" in
20745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20746 *) ac_try_echo=$ac_try;;
20747esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020751 grep -v '^ *+' conftest.er1 >conftest.err
20752 rm -f conftest.er1
20753 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755 (exit $ac_status); } && {
20756 test -z "$ac_c_werror_flag" ||
20757 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020758 } && test -s conftest$ac_exeext &&
20759 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020763sed 's/^/| /' conftest.$ac_ext >&5
20764
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767
20768rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020769 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020770fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020771ac_res=`eval echo '${'$as_ac_var'}'`
20772 { echo "$as_me:$LINENO: result: $ac_res" >&5
20773echo "${ECHO_T}$ac_res" >&6; }
20774if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020776#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020777_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020778
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020779fi
20780done
20781
Michael W. Hudson54241132001-12-07 15:38:26 +000020782
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020783# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020784{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20785echo $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 +000020786if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020788else
Martin v. Löwis11437992002-04-12 09:54:03 +000020789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020790/* confdefs.h. */
20791_ACEOF
20792cat confdefs.h >>conftest.$ac_ext
20793cat >>conftest.$ac_ext <<_ACEOF
20794/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020795#include <sys/types.h>
20796#include <sys/time.h>
20797#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020798
Martin v. Löwis11437992002-04-12 09:54:03 +000020799int
20800main ()
20801{
20802if ((struct tm *) 0)
20803return 0;
20804 ;
20805 return 0;
20806}
20807_ACEOF
20808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809if { (ac_try="$ac_compile"
20810case "(($ac_try" in
20811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20812 *) ac_try_echo=$ac_try;;
20813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020817 grep -v '^ *+' conftest.er1 >conftest.err
20818 rm -f conftest.er1
20819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821 (exit $ac_status); } && {
20822 test -z "$ac_c_werror_flag" ||
20823 test ! -s conftest.err
20824 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020828sed 's/^/| /' conftest.$ac_ext >&5
20829
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020832
20833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020834fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020835{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20836echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020837if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020838
20839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020840#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020841_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020842
20843fi
20844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020845{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20846echo $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 +000020847if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849else
Martin v. Löwis11437992002-04-12 09:54:03 +000020850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020856#include <sys/types.h>
20857#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020858
Martin v. Löwis11437992002-04-12 09:54:03 +000020859int
20860main ()
20861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020862struct tm tm;
20863 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020864 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 ;
20866 return 0;
20867}
20868_ACEOF
20869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020870if { (ac_try="$ac_compile"
20871case "(($ac_try" in
20872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20873 *) ac_try_echo=$ac_try;;
20874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020878 grep -v '^ *+' conftest.er1 >conftest.err
20879 rm -f conftest.er1
20880 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020882 (exit $ac_status); } && {
20883 test -z "$ac_c_werror_flag" ||
20884 test ! -s conftest.err
20885 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886 ac_cv_struct_tm=time.h
20887else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020889sed 's/^/| /' conftest.$ac_ext >&5
20890
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893
20894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020895fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020896{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20897echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020898if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020899
20900cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020901#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020902_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020903
20904fi
20905
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020906{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20907echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020908if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020910else
Martin v. Löwis11437992002-04-12 09:54:03 +000020911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020912/* confdefs.h. */
20913_ACEOF
20914cat confdefs.h >>conftest.$ac_ext
20915cat >>conftest.$ac_ext <<_ACEOF
20916/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020917#include <sys/types.h>
20918#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020919
20920
Martin v. Löwis11437992002-04-12 09:54:03 +000020921int
20922main ()
20923{
20924static struct tm ac_aggr;
20925if (ac_aggr.tm_zone)
20926return 0;
20927 ;
20928 return 0;
20929}
20930_ACEOF
20931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932if { (ac_try="$ac_compile"
20933case "(($ac_try" in
20934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20935 *) ac_try_echo=$ac_try;;
20936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020940 grep -v '^ *+' conftest.er1 >conftest.err
20941 rm -f conftest.er1
20942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020944 (exit $ac_status); } && {
20945 test -z "$ac_c_werror_flag" ||
20946 test ! -s conftest.err
20947 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020948 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020951sed 's/^/| /' conftest.$ac_ext >&5
20952
Martin v. Löwiseba40652007-08-30 20:10:57 +000020953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020954/* confdefs.h. */
20955_ACEOF
20956cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */
20959#include <sys/types.h>
20960#include <$ac_cv_struct_tm>
20961
20962
20963int
20964main ()
20965{
20966static struct tm ac_aggr;
20967if (sizeof ac_aggr.tm_zone)
20968return 0;
20969 ;
20970 return 0;
20971}
20972_ACEOF
20973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974if { (ac_try="$ac_compile"
20975case "(($ac_try" in
20976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20977 *) ac_try_echo=$ac_try;;
20978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020982 grep -v '^ *+' conftest.er1 >conftest.err
20983 rm -f conftest.er1
20984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986 (exit $ac_status); } && {
20987 test -z "$ac_c_werror_flag" ||
20988 test ! -s conftest.err
20989 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020990 ac_cv_member_struct_tm_tm_zone=yes
20991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020993sed 's/^/| /' conftest.$ac_ext >&5
20994
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020997
20998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000
21001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021003{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21004echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21005if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021006
21007cat >>confdefs.h <<_ACEOF
21008#define HAVE_STRUCT_TM_TM_ZONE 1
21009_ACEOF
21010
21011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021012fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021013
Martin v. Löwis11437992002-04-12 09:54:03 +000021014if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21015
21016cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021017#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021018_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021019
21020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021021 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21022echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021023if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021024 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021025else
21026 cat >conftest.$ac_ext <<_ACEOF
21027/* confdefs.h. */
21028_ACEOF
21029cat confdefs.h >>conftest.$ac_ext
21030cat >>conftest.$ac_ext <<_ACEOF
21031/* end confdefs.h. */
21032#include <time.h>
21033
21034int
21035main ()
21036{
21037#ifndef tzname
21038 (void) tzname;
21039#endif
21040
21041 ;
21042 return 0;
21043}
21044_ACEOF
21045rm -f conftest.$ac_objext
21046if { (ac_try="$ac_compile"
21047case "(($ac_try" in
21048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21049 *) ac_try_echo=$ac_try;;
21050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052 (eval "$ac_compile") 2>conftest.er1
21053 ac_status=$?
21054 grep -v '^ *+' conftest.er1 >conftest.err
21055 rm -f conftest.er1
21056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021058 (exit $ac_status); } && {
21059 test -z "$ac_c_werror_flag" ||
21060 test ! -s conftest.err
21061 } && test -s conftest.$ac_objext; then
21062 ac_cv_have_decl_tzname=yes
21063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021064 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021065sed 's/^/| /' conftest.$ac_ext >&5
21066
21067 ac_cv_have_decl_tzname=no
21068fi
21069
21070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21071fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021072{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21073echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21074if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075
21076cat >>confdefs.h <<_ACEOF
21077#define HAVE_DECL_TZNAME 1
21078_ACEOF
21079
21080
21081else
21082 cat >>confdefs.h <<_ACEOF
21083#define HAVE_DECL_TZNAME 0
21084_ACEOF
21085
21086
21087fi
21088
21089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021090 { echo "$as_me:$LINENO: checking for tzname" >&5
21091echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021092if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021094else
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021096/* confdefs.h. */
21097_ACEOF
21098cat confdefs.h >>conftest.$ac_ext
21099cat >>conftest.$ac_ext <<_ACEOF
21100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021101#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021102#if !HAVE_DECL_TZNAME
21103extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021105
Martin v. Löwis11437992002-04-12 09:54:03 +000021106int
21107main ()
21108{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021109return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 ;
21111 return 0;
21112}
21113_ACEOF
21114rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021115if { (ac_try="$ac_link"
21116case "(($ac_try" in
21117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21118 *) ac_try_echo=$ac_try;;
21119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021123 grep -v '^ *+' conftest.er1 >conftest.err
21124 rm -f conftest.er1
21125 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127 (exit $ac_status); } && {
21128 test -z "$ac_c_werror_flag" ||
21129 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021130 } && test -s conftest$ac_exeext &&
21131 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021132 ac_cv_var_tzname=yes
21133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021135sed 's/^/| /' conftest.$ac_ext >&5
21136
Martin v. Löwiseba40652007-08-30 20:10:57 +000021137 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139
21140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021141 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021142fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021143{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21144echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021145 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021146
21147cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021148#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021149_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021150
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021151 fi
21152fi
21153
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021154{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21155echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021156if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021157 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021158else
21159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021160/* confdefs.h. */
21161_ACEOF
21162cat confdefs.h >>conftest.$ac_ext
21163cat >>conftest.$ac_ext <<_ACEOF
21164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021165$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021166int
21167main ()
21168{
21169static struct stat ac_aggr;
21170if (ac_aggr.st_rdev)
21171return 0;
21172 ;
21173 return 0;
21174}
21175_ACEOF
21176rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021177if { (ac_try="$ac_compile"
21178case "(($ac_try" in
21179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21180 *) ac_try_echo=$ac_try;;
21181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021185 grep -v '^ *+' conftest.er1 >conftest.err
21186 rm -f conftest.er1
21187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021189 (exit $ac_status); } && {
21190 test -z "$ac_c_werror_flag" ||
21191 test ! -s conftest.err
21192 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021193 ac_cv_member_struct_stat_st_rdev=yes
21194else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021196sed 's/^/| /' conftest.$ac_ext >&5
21197
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021199/* confdefs.h. */
21200_ACEOF
21201cat confdefs.h >>conftest.$ac_ext
21202cat >>conftest.$ac_ext <<_ACEOF
21203/* end confdefs.h. */
21204$ac_includes_default
21205int
21206main ()
21207{
21208static struct stat ac_aggr;
21209if (sizeof ac_aggr.st_rdev)
21210return 0;
21211 ;
21212 return 0;
21213}
21214_ACEOF
21215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216if { (ac_try="$ac_compile"
21217case "(($ac_try" in
21218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21219 *) ac_try_echo=$ac_try;;
21220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021224 grep -v '^ *+' conftest.er1 >conftest.err
21225 rm -f conftest.er1
21226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021228 (exit $ac_status); } && {
21229 test -z "$ac_c_werror_flag" ||
21230 test ! -s conftest.err
21231 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021232 ac_cv_member_struct_stat_st_rdev=yes
21233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021235sed 's/^/| /' conftest.$ac_ext >&5
21236
Martin v. Löwiseba40652007-08-30 20:10:57 +000021237 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239
21240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021242
21243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021244fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021245{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21246echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21247if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021248
21249cat >>confdefs.h <<_ACEOF
21250#define HAVE_STRUCT_STAT_ST_RDEV 1
21251_ACEOF
21252
21253
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021254fi
21255
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021256{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21257echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021258if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021260else
Martin v. Löwis11437992002-04-12 09:54:03 +000021261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021262/* confdefs.h. */
21263_ACEOF
21264cat confdefs.h >>conftest.$ac_ext
21265cat >>conftest.$ac_ext <<_ACEOF
21266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021267$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021268int
21269main ()
21270{
21271static struct stat ac_aggr;
21272if (ac_aggr.st_blksize)
21273return 0;
21274 ;
21275 return 0;
21276}
21277_ACEOF
21278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021279if { (ac_try="$ac_compile"
21280case "(($ac_try" in
21281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21282 *) ac_try_echo=$ac_try;;
21283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021287 grep -v '^ *+' conftest.er1 >conftest.err
21288 rm -f conftest.er1
21289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021291 (exit $ac_status); } && {
21292 test -z "$ac_c_werror_flag" ||
21293 test ! -s conftest.err
21294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021295 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021298sed 's/^/| /' conftest.$ac_ext >&5
21299
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021301/* confdefs.h. */
21302_ACEOF
21303cat confdefs.h >>conftest.$ac_ext
21304cat >>conftest.$ac_ext <<_ACEOF
21305/* end confdefs.h. */
21306$ac_includes_default
21307int
21308main ()
21309{
21310static struct stat ac_aggr;
21311if (sizeof ac_aggr.st_blksize)
21312return 0;
21313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318if { (ac_try="$ac_compile"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
21333 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021334 ac_cv_member_struct_stat_st_blksize=yes
21335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021337sed 's/^/| /' conftest.$ac_ext >&5
21338
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021341
21342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344
21345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021346fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021347{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21348echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21349if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021350
Martin v. Löwis11437992002-04-12 09:54:03 +000021351cat >>confdefs.h <<_ACEOF
21352#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21353_ACEOF
21354
21355
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021356fi
21357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021358{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21359echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021360if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021361 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021362else
21363 cat >conftest.$ac_ext <<_ACEOF
21364/* confdefs.h. */
21365_ACEOF
21366cat confdefs.h >>conftest.$ac_ext
21367cat >>conftest.$ac_ext <<_ACEOF
21368/* end confdefs.h. */
21369$ac_includes_default
21370int
21371main ()
21372{
21373static struct stat ac_aggr;
21374if (ac_aggr.st_flags)
21375return 0;
21376 ;
21377 return 0;
21378}
21379_ACEOF
21380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381if { (ac_try="$ac_compile"
21382case "(($ac_try" in
21383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21384 *) ac_try_echo=$ac_try;;
21385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021388 ac_status=$?
21389 grep -v '^ *+' conftest.er1 >conftest.err
21390 rm -f conftest.er1
21391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393 (exit $ac_status); } && {
21394 test -z "$ac_c_werror_flag" ||
21395 test ! -s conftest.err
21396 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021397 ac_cv_member_struct_stat_st_flags=yes
21398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021399 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021400sed 's/^/| /' conftest.$ac_ext >&5
21401
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021403/* confdefs.h. */
21404_ACEOF
21405cat confdefs.h >>conftest.$ac_ext
21406cat >>conftest.$ac_ext <<_ACEOF
21407/* end confdefs.h. */
21408$ac_includes_default
21409int
21410main ()
21411{
21412static struct stat ac_aggr;
21413if (sizeof ac_aggr.st_flags)
21414return 0;
21415 ;
21416 return 0;
21417}
21418_ACEOF
21419rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021420if { (ac_try="$ac_compile"
21421case "(($ac_try" in
21422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21423 *) ac_try_echo=$ac_try;;
21424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021427 ac_status=$?
21428 grep -v '^ *+' conftest.er1 >conftest.err
21429 rm -f conftest.er1
21430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021432 (exit $ac_status); } && {
21433 test -z "$ac_c_werror_flag" ||
21434 test ! -s conftest.err
21435 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021436 ac_cv_member_struct_stat_st_flags=yes
21437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021438 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021439sed 's/^/| /' conftest.$ac_ext >&5
21440
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021443
21444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021446
21447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021448fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021449{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21450echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21451if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021452
21453cat >>confdefs.h <<_ACEOF
21454#define HAVE_STRUCT_STAT_ST_FLAGS 1
21455_ACEOF
21456
21457
21458fi
21459
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021460{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21461echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021462if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021464else
21465 cat >conftest.$ac_ext <<_ACEOF
21466/* confdefs.h. */
21467_ACEOF
21468cat confdefs.h >>conftest.$ac_ext
21469cat >>conftest.$ac_ext <<_ACEOF
21470/* end confdefs.h. */
21471$ac_includes_default
21472int
21473main ()
21474{
21475static struct stat ac_aggr;
21476if (ac_aggr.st_gen)
21477return 0;
21478 ;
21479 return 0;
21480}
21481_ACEOF
21482rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483if { (ac_try="$ac_compile"
21484case "(($ac_try" in
21485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21486 *) ac_try_echo=$ac_try;;
21487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021489 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021490 ac_status=$?
21491 grep -v '^ *+' conftest.er1 >conftest.err
21492 rm -f conftest.er1
21493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021495 (exit $ac_status); } && {
21496 test -z "$ac_c_werror_flag" ||
21497 test ! -s conftest.err
21498 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021499 ac_cv_member_struct_stat_st_gen=yes
21500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021501 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021502sed 's/^/| /' conftest.$ac_ext >&5
21503
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021505/* confdefs.h. */
21506_ACEOF
21507cat confdefs.h >>conftest.$ac_ext
21508cat >>conftest.$ac_ext <<_ACEOF
21509/* end confdefs.h. */
21510$ac_includes_default
21511int
21512main ()
21513{
21514static struct stat ac_aggr;
21515if (sizeof ac_aggr.st_gen)
21516return 0;
21517 ;
21518 return 0;
21519}
21520_ACEOF
21521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522if { (ac_try="$ac_compile"
21523case "(($ac_try" in
21524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21525 *) ac_try_echo=$ac_try;;
21526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021529 ac_status=$?
21530 grep -v '^ *+' conftest.er1 >conftest.err
21531 rm -f conftest.er1
21532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021534 (exit $ac_status); } && {
21535 test -z "$ac_c_werror_flag" ||
21536 test ! -s conftest.err
21537 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021538 ac_cv_member_struct_stat_st_gen=yes
21539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021540 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021541sed 's/^/| /' conftest.$ac_ext >&5
21542
Martin v. Löwiseba40652007-08-30 20:10:57 +000021543 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021545
21546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021548
21549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021550fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021551{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21552echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21553if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021554
21555cat >>confdefs.h <<_ACEOF
21556#define HAVE_STRUCT_STAT_ST_GEN 1
21557_ACEOF
21558
21559
21560fi
21561
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021562{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21563echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021564if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021565 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021566else
21567 cat >conftest.$ac_ext <<_ACEOF
21568/* confdefs.h. */
21569_ACEOF
21570cat confdefs.h >>conftest.$ac_ext
21571cat >>conftest.$ac_ext <<_ACEOF
21572/* end confdefs.h. */
21573$ac_includes_default
21574int
21575main ()
21576{
21577static struct stat ac_aggr;
21578if (ac_aggr.st_birthtime)
21579return 0;
21580 ;
21581 return 0;
21582}
21583_ACEOF
21584rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585if { (ac_try="$ac_compile"
21586case "(($ac_try" in
21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588 *) ac_try_echo=$ac_try;;
21589esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021592 ac_status=$?
21593 grep -v '^ *+' conftest.er1 >conftest.err
21594 rm -f conftest.er1
21595 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597 (exit $ac_status); } && {
21598 test -z "$ac_c_werror_flag" ||
21599 test ! -s conftest.err
21600 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021601 ac_cv_member_struct_stat_st_birthtime=yes
21602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021603 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021604sed 's/^/| /' conftest.$ac_ext >&5
21605
Martin v. Löwiseba40652007-08-30 20:10:57 +000021606 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021607/* confdefs.h. */
21608_ACEOF
21609cat confdefs.h >>conftest.$ac_ext
21610cat >>conftest.$ac_ext <<_ACEOF
21611/* end confdefs.h. */
21612$ac_includes_default
21613int
21614main ()
21615{
21616static struct stat ac_aggr;
21617if (sizeof ac_aggr.st_birthtime)
21618return 0;
21619 ;
21620 return 0;
21621}
21622_ACEOF
21623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624if { (ac_try="$ac_compile"
21625case "(($ac_try" in
21626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627 *) ac_try_echo=$ac_try;;
21628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021631 ac_status=$?
21632 grep -v '^ *+' conftest.er1 >conftest.err
21633 rm -f conftest.er1
21634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 (exit $ac_status); } && {
21637 test -z "$ac_c_werror_flag" ||
21638 test ! -s conftest.err
21639 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021640 ac_cv_member_struct_stat_st_birthtime=yes
21641else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021642 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021643sed 's/^/| /' conftest.$ac_ext >&5
21644
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647
21648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021649fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021650
21651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021652fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021653{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21654echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21655if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021656
21657cat >>confdefs.h <<_ACEOF
21658#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21659_ACEOF
21660
21661
21662fi
21663
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021664{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21665echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021666if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021668else
Martin v. Löwis11437992002-04-12 09:54:03 +000021669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021670/* confdefs.h. */
21671_ACEOF
21672cat confdefs.h >>conftest.$ac_ext
21673cat >>conftest.$ac_ext <<_ACEOF
21674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021675$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021676int
21677main ()
21678{
21679static struct stat ac_aggr;
21680if (ac_aggr.st_blocks)
21681return 0;
21682 ;
21683 return 0;
21684}
21685_ACEOF
21686rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687if { (ac_try="$ac_compile"
21688case "(($ac_try" in
21689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21690 *) ac_try_echo=$ac_try;;
21691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021695 grep -v '^ *+' conftest.er1 >conftest.err
21696 rm -f conftest.er1
21697 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 (exit $ac_status); } && {
21700 test -z "$ac_c_werror_flag" ||
21701 test ! -s conftest.err
21702 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021703 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021704else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021706sed 's/^/| /' conftest.$ac_ext >&5
21707
Martin v. Löwiseba40652007-08-30 20:10:57 +000021708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021709/* confdefs.h. */
21710_ACEOF
21711cat confdefs.h >>conftest.$ac_ext
21712cat >>conftest.$ac_ext <<_ACEOF
21713/* end confdefs.h. */
21714$ac_includes_default
21715int
21716main ()
21717{
21718static struct stat ac_aggr;
21719if (sizeof ac_aggr.st_blocks)
21720return 0;
21721 ;
21722 return 0;
21723}
21724_ACEOF
21725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021726if { (ac_try="$ac_compile"
21727case "(($ac_try" in
21728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21729 *) ac_try_echo=$ac_try;;
21730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021732 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021734 grep -v '^ *+' conftest.er1 >conftest.err
21735 rm -f conftest.er1
21736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738 (exit $ac_status); } && {
21739 test -z "$ac_c_werror_flag" ||
21740 test ! -s conftest.err
21741 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021742 ac_cv_member_struct_stat_st_blocks=yes
21743else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021745sed 's/^/| /' conftest.$ac_ext >&5
21746
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749
21750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752
21753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021754fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021755{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21756echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21757if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021758
Martin v. Löwis11437992002-04-12 09:54:03 +000021759cat >>confdefs.h <<_ACEOF
21760#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21761_ACEOF
21762
21763
21764cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021765#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021766_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021767
21768else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021770 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21772 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021773esac
21774
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021775fi
21776
Michael W. Hudson54241132001-12-07 15:38:26 +000021777
Martin v. Löwis11437992002-04-12 09:54:03 +000021778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021779{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21780echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021781if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021782 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021783else
Martin v. Löwis11437992002-04-12 09:54:03 +000021784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021785/* confdefs.h. */
21786_ACEOF
21787cat confdefs.h >>conftest.$ac_ext
21788cat >>conftest.$ac_ext <<_ACEOF
21789/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021790#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021791int
21792main ()
21793{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021794return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021795 ;
21796 return 0;
21797}
21798_ACEOF
21799rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800if { (ac_try="$ac_compile"
21801case "(($ac_try" in
21802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21803 *) ac_try_echo=$ac_try;;
21804esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021808 grep -v '^ *+' conftest.er1 >conftest.err
21809 rm -f conftest.er1
21810 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812 (exit $ac_status); } && {
21813 test -z "$ac_c_werror_flag" ||
21814 test ! -s conftest.err
21815 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021816 ac_cv_header_time_altzone=yes
21817else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021819sed 's/^/| /' conftest.$ac_ext >&5
21820
Martin v. Löwiseba40652007-08-30 20:10:57 +000021821 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822fi
21823
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21825fi
21826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021827{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21828echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021829if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021830
21831cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021832#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021833_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021834
21835fi
21836
Guido van Rossumda88dad1995-01-26 00:46:29 +000021837was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021838{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21839echo $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 +000021840cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021841/* confdefs.h. */
21842_ACEOF
21843cat confdefs.h >>conftest.$ac_ext
21844cat >>conftest.$ac_ext <<_ACEOF
21845/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021846
21847#include <sys/types.h>
21848#include <sys/select.h>
21849#include <sys/time.h>
21850
Martin v. Löwis11437992002-04-12 09:54:03 +000021851int
21852main ()
21853{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021854;
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ;
21856 return 0;
21857}
21858_ACEOF
21859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860if { (ac_try="$ac_compile"
21861case "(($ac_try" in
21862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21863 *) ac_try_echo=$ac_try;;
21864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021868 grep -v '^ *+' conftest.er1 >conftest.err
21869 rm -f conftest.er1
21870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 (exit $ac_status); } && {
21873 test -z "$ac_c_werror_flag" ||
21874 test ! -s conftest.err
21875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021876
21877
21878cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021879#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021880_ACEOF
21881
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021882 was_it_defined=yes
21883
Guido van Rossumf78abae1997-01-21 22:02:36 +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
Brett Cannon19fab762007-06-02 03:02:29 +000021888
Martin v. Löwiseba40652007-08-30 20:10:57 +000021889fi
21890
21891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021892{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21893echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021895{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21896echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021897if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021898 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021899else
Martin v. Löwis11437992002-04-12 09:54:03 +000021900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021901/* confdefs.h. */
21902_ACEOF
21903cat confdefs.h >>conftest.$ac_ext
21904cat >>conftest.$ac_ext <<_ACEOF
21905/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021906
21907# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021908int
21909main ()
21910{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021911struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 ;
21913 return 0;
21914}
21915_ACEOF
21916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917if { (ac_try="$ac_compile"
21918case "(($ac_try" in
21919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21920 *) ac_try_echo=$ac_try;;
21921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021925 grep -v '^ *+' conftest.er1 >conftest.err
21926 rm -f conftest.er1
21927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021929 (exit $ac_status); } && {
21930 test -z "$ac_c_werror_flag" ||
21931 test ! -s conftest.err
21932 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021933 ac_cv_struct_addrinfo=yes
21934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021936sed 's/^/| /' conftest.$ac_ext >&5
21937
Martin v. Löwiseba40652007-08-30 20:10:57 +000021938 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021939fi
21940
Martin v. Löwiseba40652007-08-30 20:10:57 +000021941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21942fi
21943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021944{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21945echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021946if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021947
21948cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021949#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021950_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021951
21952fi
21953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021954{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21955echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021956if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021957 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021958else
Martin v. Löwis11437992002-04-12 09:54:03 +000021959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021960/* confdefs.h. */
21961_ACEOF
21962cat confdefs.h >>conftest.$ac_ext
21963cat >>conftest.$ac_ext <<_ACEOF
21964/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021965
21966# include <sys/types.h>
21967# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021968int
21969main ()
21970{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021971struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021972 ;
21973 return 0;
21974}
21975_ACEOF
21976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021977if { (ac_try="$ac_compile"
21978case "(($ac_try" in
21979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21980 *) ac_try_echo=$ac_try;;
21981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021985 grep -v '^ *+' conftest.er1 >conftest.err
21986 rm -f conftest.er1
21987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989 (exit $ac_status); } && {
21990 test -z "$ac_c_werror_flag" ||
21991 test ! -s conftest.err
21992 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021993 ac_cv_struct_sockaddr_storage=yes
21994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021996sed 's/^/| /' conftest.$ac_ext >&5
21997
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021999fi
22000
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22002fi
22003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022004{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22005echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022006if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022007
22008cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022009#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022010_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022011
22012fi
22013
Guido van Rossum627b2d71993-12-24 10:39:16 +000022014# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022015
Michael W. Hudson54241132001-12-07 15:38:26 +000022016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022017{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22018echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022019if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022020 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022021else
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022023/* confdefs.h. */
22024_ACEOF
22025cat confdefs.h >>conftest.$ac_ext
22026cat >>conftest.$ac_ext <<_ACEOF
22027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022028$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022029int
22030main ()
22031{
22032static int test_array [1 - 2 * !(((char) -1) < 0)];
22033test_array [0] = 0
22034
22035 ;
22036 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022037}
Martin v. Löwis11437992002-04-12 09:54:03 +000022038_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
Michael W. Hudson54241132001-12-07 15:38:26 +000022056 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022059sed 's/^/| /' conftest.$ac_ext >&5
22060
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022063
22064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022065fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022066{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22067echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022068if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022069 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022070#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022071_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022072
22073fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022074
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022075{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22076echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022077if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022078 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022079else
22080 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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022086
Martin v. Löwis11437992002-04-12 09:54:03 +000022087int
22088main ()
22089{
22090/* FIXME: Include the comments suggested by Paul. */
22091#ifndef __cplusplus
22092 /* Ultrix mips cc rejects this. */
22093 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022095 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022096 char const *const *pcpcc;
22097 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022098 /* NEC SVR4.0.2 mips cc rejects this. */
22099 struct point {int x, y;};
22100 static struct point const zero = {0,0};
22101 /* AIX XL C 1.02.0.0 rejects this.
22102 It does not let you subtract one const X* pointer from another in
22103 an arm of an if-expression whose if-part is not a constant
22104 expression */
22105 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022108 ++pcpcc;
22109 ppc = (char**) pcpcc;
22110 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022111 { /* SCO 3.2v4 cc rejects this. */
22112 char *t;
22113 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022114
Martin v. Löwis11437992002-04-12 09:54:03 +000022115 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022116 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022117 }
22118 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22119 int x[] = {25, 17};
22120 const int *foo = &x[0];
22121 ++foo;
22122 }
22123 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22124 typedef const int *iptr;
22125 iptr p = 0;
22126 ++p;
22127 }
22128 { /* AIX XL C 1.02.0.0 rejects this saying
22129 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22130 struct s { int j; const int *ap[3]; };
22131 struct s *b; b->j = 5;
22132 }
22133 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22134 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022135 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022136 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022137 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022138#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022139
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 ;
22141 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022142}
Martin v. Löwis11437992002-04-12 09:54:03 +000022143_ACEOF
22144rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022145if { (ac_try="$ac_compile"
22146case "(($ac_try" in
22147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22148 *) ac_try_echo=$ac_try;;
22149esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022151 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022153 grep -v '^ *+' conftest.er1 >conftest.err
22154 rm -f conftest.er1
22155 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157 (exit $ac_status); } && {
22158 test -z "$ac_c_werror_flag" ||
22159 test ! -s conftest.err
22160 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022161 ac_cv_c_const=yes
22162else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022164sed 's/^/| /' conftest.$ac_ext >&5
22165
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022168
22169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022170fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022171{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22172echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022173if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022174
22175cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022177_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022178
22179fi
22180
Michael W. Hudson54241132001-12-07 15:38:26 +000022181
Guido van Rossumda88dad1995-01-26 00:46:29 +000022182works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022183{ echo "$as_me:$LINENO: checking for working volatile" >&5
22184echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022186/* confdefs.h. */
22187_ACEOF
22188cat confdefs.h >>conftest.$ac_ext
22189cat >>conftest.$ac_ext <<_ACEOF
22190/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022191
Martin v. Löwis11437992002-04-12 09:54:03 +000022192int
22193main ()
22194{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022195volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 ;
22197 return 0;
22198}
22199_ACEOF
22200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022201if { (ac_try="$ac_compile"
22202case "(($ac_try" in
22203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22204 *) ac_try_echo=$ac_try;;
22205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022209 grep -v '^ *+' conftest.er1 >conftest.err
22210 rm -f conftest.er1
22211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213 (exit $ac_status); } && {
22214 test -z "$ac_c_werror_flag" ||
22215 test ! -s conftest.err
22216 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022217 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022220sed 's/^/| /' conftest.$ac_ext >&5
22221
Martin v. Löwis11437992002-04-12 09:54:03 +000022222
22223cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022224#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022225_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022227
Guido van Rossum627b2d71993-12-24 10:39:16 +000022228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022229
22230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022231{ echo "$as_me:$LINENO: result: $works" >&5
22232echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022233
Guido van Rossumda88dad1995-01-26 00:46:29 +000022234works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022235{ echo "$as_me:$LINENO: checking for working signed char" >&5
22236echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022238/* confdefs.h. */
22239_ACEOF
22240cat confdefs.h >>conftest.$ac_ext
22241cat >>conftest.$ac_ext <<_ACEOF
22242/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022243
Martin v. Löwis11437992002-04-12 09:54:03 +000022244int
22245main ()
22246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022247signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 ;
22249 return 0;
22250}
22251_ACEOF
22252rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253if { (ac_try="$ac_compile"
22254case "(($ac_try" in
22255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22256 *) ac_try_echo=$ac_try;;
22257esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022259 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022260 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022261 grep -v '^ *+' conftest.er1 >conftest.err
22262 rm -f conftest.er1
22263 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265 (exit $ac_status); } && {
22266 test -z "$ac_c_werror_flag" ||
22267 test ! -s conftest.err
22268 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022269 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022270else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022272sed 's/^/| /' conftest.$ac_ext >&5
22273
Martin v. Löwis11437992002-04-12 09:54:03 +000022274
22275cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022276#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022277_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022278
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022279
Guido van Rossum7f43da71994-08-01 12:15:30 +000022280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022281
22282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022283{ echo "$as_me:$LINENO: result: $works" >&5
22284echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022285
Guido van Rossumda88dad1995-01-26 00:46:29 +000022286have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022287{ echo "$as_me:$LINENO: checking for prototypes" >&5
22288echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022290/* confdefs.h. */
22291_ACEOF
22292cat confdefs.h >>conftest.$ac_ext
22293cat >>conftest.$ac_ext <<_ACEOF
22294/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022295int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022296int
22297main ()
22298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022299return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022300 ;
22301 return 0;
22302}
22303_ACEOF
22304rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305if { (ac_try="$ac_compile"
22306case "(($ac_try" in
22307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22308 *) ac_try_echo=$ac_try;;
22309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022313 grep -v '^ *+' conftest.er1 >conftest.err
22314 rm -f conftest.er1
22315 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317 (exit $ac_status); } && {
22318 test -z "$ac_c_werror_flag" ||
22319 test ! -s conftest.err
22320 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022321
22322
22323cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022324#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022325_ACEOF
22326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022327 have_prototypes=yes
22328
Guido van Rossumf78abae1997-01-21 22:02:36 +000022329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022331sed 's/^/| /' conftest.$ac_ext >&5
22332
Martin v. Löwiseba40652007-08-30 20:10:57 +000022333
Guido van Rossum7f43da71994-08-01 12:15:30 +000022334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022335
22336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022337{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22338echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022339
Guido van Rossumda88dad1995-01-26 00:46:29 +000022340works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022341{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22342echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022343cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022344/* confdefs.h. */
22345_ACEOF
22346cat confdefs.h >>conftest.$ac_ext
22347cat >>conftest.$ac_ext <<_ACEOF
22348/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022349
22350#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022351int foo(int x, ...) {
22352 va_list va;
22353 va_start(va, x);
22354 va_arg(va, int);
22355 va_arg(va, char *);
22356 va_arg(va, double);
22357 return 0;
22358}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022359
Martin v. Löwis11437992002-04-12 09:54:03 +000022360int
22361main ()
22362{
Guido van Rossum90eea071996-08-30 20:58:57 +000022363return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022364 ;
22365 return 0;
22366}
22367_ACEOF
22368rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022369if { (ac_try="$ac_compile"
22370case "(($ac_try" in
22371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22372 *) ac_try_echo=$ac_try;;
22373esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022377 grep -v '^ *+' conftest.er1 >conftest.err
22378 rm -f conftest.er1
22379 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022381 (exit $ac_status); } && {
22382 test -z "$ac_c_werror_flag" ||
22383 test ! -s conftest.err
22384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022385
22386
22387cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022388#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022389_ACEOF
22390
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022391 works=yes
22392
Guido van Rossumf78abae1997-01-21 22:02:36 +000022393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022395sed 's/^/| /' conftest.$ac_ext >&5
22396
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397
Guido van Rossum627b2d71993-12-24 10:39:16 +000022398fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399
22400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022401{ echo "$as_me:$LINENO: result: $works" >&5
22402echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022403
Martin v. Löwisd6320502004-08-12 13:45:08 +000022404# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022405{ echo "$as_me:$LINENO: checking for socketpair" >&5
22406echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022407cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022408/* confdefs.h. */
22409_ACEOF
22410cat confdefs.h >>conftest.$ac_ext
22411cat >>conftest.$ac_ext <<_ACEOF
22412/* end confdefs.h. */
22413
22414#include <sys/types.h>
22415#include <sys/socket.h>
22416
22417int
22418main ()
22419{
22420void *x=socketpair
22421 ;
22422 return 0;
22423}
22424_ACEOF
22425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426if { (ac_try="$ac_compile"
22427case "(($ac_try" in
22428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22429 *) ac_try_echo=$ac_try;;
22430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022434 grep -v '^ *+' conftest.er1 >conftest.err
22435 rm -f conftest.er1
22436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438 (exit $ac_status); } && {
22439 test -z "$ac_c_werror_flag" ||
22440 test ! -s conftest.err
22441 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022442
22443cat >>confdefs.h <<\_ACEOF
22444#define HAVE_SOCKETPAIR 1
22445_ACEOF
22446
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022447 { echo "$as_me:$LINENO: result: yes" >&5
22448echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022450 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022451sed 's/^/| /' conftest.$ac_ext >&5
22452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022453 { echo "$as_me:$LINENO: result: no" >&5
22454echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022455
22456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022457
22458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022459
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022460# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022461{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22462echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022464/* confdefs.h. */
22465_ACEOF
22466cat confdefs.h >>conftest.$ac_ext
22467cat >>conftest.$ac_ext <<_ACEOF
22468/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022469#include <sys/types.h>
22470#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022471int
22472main ()
22473{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022474struct sockaddr x;
22475x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 ;
22477 return 0;
22478}
22479_ACEOF
22480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022481if { (ac_try="$ac_compile"
22482case "(($ac_try" in
22483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22484 *) ac_try_echo=$ac_try;;
22485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022489 grep -v '^ *+' conftest.er1 >conftest.err
22490 rm -f conftest.er1
22491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022493 (exit $ac_status); } && {
22494 test -z "$ac_c_werror_flag" ||
22495 test ! -s conftest.err
22496 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022497 { echo "$as_me:$LINENO: result: yes" >&5
22498echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022499
22500cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022501#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022502_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022503
22504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022506sed 's/^/| /' conftest.$ac_ext >&5
22507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022508 { echo "$as_me:$LINENO: result: no" >&5
22509echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511
22512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022513
Guido van Rossumda88dad1995-01-26 00:46:29 +000022514va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022515{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22516echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022518/* confdefs.h. */
22519_ACEOF
22520cat confdefs.h >>conftest.$ac_ext
22521cat >>conftest.$ac_ext <<_ACEOF
22522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022523
22524#ifdef HAVE_STDARG_PROTOTYPES
22525#include <stdarg.h>
22526#else
22527#include <varargs.h>
22528#endif
22529
Martin v. Löwis11437992002-04-12 09:54:03 +000022530int
22531main ()
22532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022533va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022534 ;
22535 return 0;
22536}
22537_ACEOF
22538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022539if { (ac_try="$ac_compile"
22540case "(($ac_try" in
22541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22542 *) ac_try_echo=$ac_try;;
22543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022547 grep -v '^ *+' conftest.er1 >conftest.err
22548 rm -f conftest.er1
22549 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022551 (exit $ac_status); } && {
22552 test -z "$ac_c_werror_flag" ||
22553 test ! -s conftest.err
22554 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022555 :
22556else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022558sed 's/^/| /' conftest.$ac_ext >&5
22559
Martin v. Löwis11437992002-04-12 09:54:03 +000022560
22561
22562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022563#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022564_ACEOF
22565
Guido van Rossumda88dad1995-01-26 00:46:29 +000022566 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022569
22570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022571{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22572echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022574# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022575
22576
22577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022578{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22579echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022580if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022582else
Martin v. Löwis11437992002-04-12 09:54:03 +000022583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022584/* confdefs.h. */
22585_ACEOF
22586cat confdefs.h >>conftest.$ac_ext
22587cat >>conftest.$ac_ext <<_ACEOF
22588/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022589/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22590 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22591#define gethostbyname_r innocuous_gethostbyname_r
22592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022593/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022594 which can conflict with char gethostbyname_r (); below.
22595 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022596 <limits.h> exists even on freestanding compilers. */
22597
22598#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022599# include <limits.h>
22600#else
22601# include <assert.h>
22602#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022603
22604#undef gethostbyname_r
22605
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606/* Override any GCC internal prototype to avoid an error.
22607 Use char because int might match the return type of a GCC
22608 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022609#ifdef __cplusplus
22610extern "C"
22611#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022612char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022613/* The GNU C library defines this for functions which it implements
22614 to always fail with ENOSYS. Some functions are actually named
22615 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022617choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022618#endif
22619
Skip Montanaro6dead952003-09-25 14:50:04 +000022620int
22621main ()
22622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022623return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 ;
22625 return 0;
22626}
22627_ACEOF
22628rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022629if { (ac_try="$ac_link"
22630case "(($ac_try" in
22631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22632 *) ac_try_echo=$ac_try;;
22633esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022637 grep -v '^ *+' conftest.er1 >conftest.err
22638 rm -f conftest.er1
22639 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022641 (exit $ac_status); } && {
22642 test -z "$ac_c_werror_flag" ||
22643 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022644 } && test -s conftest$ac_exeext &&
22645 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022646 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022649sed 's/^/| /' conftest.$ac_ext >&5
22650
Martin v. Löwiseba40652007-08-30 20:10:57 +000022651 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022653
22654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022655 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022656fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022657{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22658echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22659if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022660
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022662#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022663_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022665 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22666echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022667 OLD_CFLAGS=$CFLAGS
22668 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022670/* confdefs.h. */
22671_ACEOF
22672cat confdefs.h >>conftest.$ac_ext
22673cat >>conftest.$ac_ext <<_ACEOF
22674/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022675
22676# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022677
Martin v. Löwis11437992002-04-12 09:54:03 +000022678int
22679main ()
22680{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022681
22682 char *name;
22683 struct hostent *he, *res;
22684 char buffer[2048];
22685 int buflen = 2048;
22686 int h_errnop;
22687
22688 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022689
22690 ;
22691 return 0;
22692}
22693_ACEOF
22694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695if { (ac_try="$ac_compile"
22696case "(($ac_try" in
22697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22698 *) ac_try_echo=$ac_try;;
22699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022703 grep -v '^ *+' conftest.er1 >conftest.err
22704 rm -f conftest.er1
22705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 (exit $ac_status); } && {
22708 test -z "$ac_c_werror_flag" ||
22709 test ! -s conftest.err
22710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022711
22712 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022713#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022714_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022715
Martin v. Löwis11437992002-04-12 09:54:03 +000022716
22717cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022718#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022719_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022720
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022721 { echo "$as_me:$LINENO: result: yes" >&5
22722echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022726sed 's/^/| /' conftest.$ac_ext >&5
22727
Martin v. Löwis11437992002-04-12 09:54:03 +000022728
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022729 { echo "$as_me:$LINENO: result: no" >&5
22730echo "${ECHO_T}no" >&6; }
22731 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22732echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022734/* confdefs.h. */
22735_ACEOF
22736cat confdefs.h >>conftest.$ac_ext
22737cat >>conftest.$ac_ext <<_ACEOF
22738/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022739
22740# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022741
Martin v. Löwis11437992002-04-12 09:54:03 +000022742int
22743main ()
22744{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022745
22746 char *name;
22747 struct hostent *he;
22748 char buffer[2048];
22749 int buflen = 2048;
22750 int h_errnop;
22751
22752 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022753
22754 ;
22755 return 0;
22756}
22757_ACEOF
22758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022759if { (ac_try="$ac_compile"
22760case "(($ac_try" in
22761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22762 *) ac_try_echo=$ac_try;;
22763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022767 grep -v '^ *+' conftest.er1 >conftest.err
22768 rm -f conftest.er1
22769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022771 (exit $ac_status); } && {
22772 test -z "$ac_c_werror_flag" ||
22773 test ! -s conftest.err
22774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
22776 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022777#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022778_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022779
Martin v. Löwis11437992002-04-12 09:54:03 +000022780
22781cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022782#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022783_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022785 { echo "$as_me:$LINENO: result: yes" >&5
22786echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022787
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022790sed 's/^/| /' conftest.$ac_ext >&5
22791
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022793 { echo "$as_me:$LINENO: result: no" >&5
22794echo "${ECHO_T}no" >&6; }
22795 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22796echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022798/* confdefs.h. */
22799_ACEOF
22800cat confdefs.h >>conftest.$ac_ext
22801cat >>conftest.$ac_ext <<_ACEOF
22802/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022803
22804# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022805
Martin v. Löwis11437992002-04-12 09:54:03 +000022806int
22807main ()
22808{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022809
22810 char *name;
22811 struct hostent *he;
22812 struct hostent_data data;
22813
22814 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022815
22816 ;
22817 return 0;
22818}
22819_ACEOF
22820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821if { (ac_try="$ac_compile"
22822case "(($ac_try" in
22823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22824 *) ac_try_echo=$ac_try;;
22825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022829 grep -v '^ *+' conftest.er1 >conftest.err
22830 rm -f conftest.er1
22831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022833 (exit $ac_status); } && {
22834 test -z "$ac_c_werror_flag" ||
22835 test ! -s conftest.err
22836 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022837
22838 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022839#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022840_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022841
Martin v. Löwis11437992002-04-12 09:54:03 +000022842
22843cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022844#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022845_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022846
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022847 { echo "$as_me:$LINENO: result: yes" >&5
22848echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022852sed 's/^/| /' conftest.$ac_ext >&5
22853
Martin v. Löwis11437992002-04-12 09:54:03 +000022854
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022855 { echo "$as_me:$LINENO: result: no" >&5
22856echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022857
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859
22860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022861
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022863
22864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022865
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022867
22868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022869 CFLAGS=$OLD_CFLAGS
22870
22871else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022872
Martin v. Löwis11437992002-04-12 09:54:03 +000022873
22874for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022875do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22877{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022879if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022881else
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022888/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22889 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22890#define $ac_func innocuous_$ac_func
22891
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022892/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022893 which can conflict with char $ac_func (); below.
22894 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022895 <limits.h> exists even on freestanding compilers. */
22896
22897#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022898# include <limits.h>
22899#else
22900# include <assert.h>
22901#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022902
22903#undef $ac_func
22904
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905/* Override any GCC internal prototype to avoid an error.
22906 Use char because int might match the return type of a GCC
22907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022908#ifdef __cplusplus
22909extern "C"
22910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022911char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022912/* The GNU C library defines this for functions which it implements
22913 to always fail with ENOSYS. Some functions are actually named
22914 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022915#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022916choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022917#endif
22918
Skip Montanaro6dead952003-09-25 14:50:04 +000022919int
22920main ()
22921{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022922return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022923 ;
22924 return 0;
22925}
22926_ACEOF
22927rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022928if { (ac_try="$ac_link"
22929case "(($ac_try" in
22930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22931 *) ac_try_echo=$ac_try;;
22932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022934 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022936 grep -v '^ *+' conftest.er1 >conftest.err
22937 rm -f conftest.er1
22938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022940 (exit $ac_status); } && {
22941 test -z "$ac_c_werror_flag" ||
22942 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022943 } && test -s conftest$ac_exeext &&
22944 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022945 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022948sed 's/^/| /' conftest.$ac_ext >&5
22949
Martin v. Löwiseba40652007-08-30 20:10:57 +000022950 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022952
22953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022954 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022956ac_res=`eval echo '${'$as_ac_var'}'`
22957 { echo "$as_me:$LINENO: result: $ac_res" >&5
22958echo "${ECHO_T}$ac_res" >&6; }
22959if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022961#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022962_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022964fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022965done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022966
Michael W. Hudson54241132001-12-07 15:38:26 +000022967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022968fi
22969
Michael W. Hudson54241132001-12-07 15:38:26 +000022970
22971
22972
22973
22974
22975
Guido van Rossum627b2d71993-12-24 10:39:16 +000022976# checks for system services
22977# (none yet)
22978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022979# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022980{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22981echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022982if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022983 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022984else
Martin v. Löwis11437992002-04-12 09:54:03 +000022985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022986/* confdefs.h. */
22987_ACEOF
22988cat confdefs.h >>conftest.$ac_ext
22989cat >>conftest.$ac_ext <<_ACEOF
22990/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022991/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22992 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22993#define __fpu_control innocuous___fpu_control
22994
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022995/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022996 which can conflict with char __fpu_control (); below.
22997 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022998 <limits.h> exists even on freestanding compilers. */
22999
23000#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023001# include <limits.h>
23002#else
23003# include <assert.h>
23004#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023005
23006#undef __fpu_control
23007
Martin v. Löwiseba40652007-08-30 20:10:57 +000023008/* Override any GCC internal prototype to avoid an error.
23009 Use char because int might match the return type of a GCC
23010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023011#ifdef __cplusplus
23012extern "C"
23013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023014char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023015/* The GNU C library defines this for functions which it implements
23016 to always fail with ENOSYS. Some functions are actually named
23017 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023019choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023020#endif
23021
Skip Montanaro6dead952003-09-25 14:50:04 +000023022int
23023main ()
23024{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 ;
23027 return 0;
23028}
23029_ACEOF
23030rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023031if { (ac_try="$ac_link"
23032case "(($ac_try" in
23033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23034 *) ac_try_echo=$ac_try;;
23035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023037 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023039 grep -v '^ *+' conftest.er1 >conftest.err
23040 rm -f conftest.er1
23041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043 (exit $ac_status); } && {
23044 test -z "$ac_c_werror_flag" ||
23045 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023046 } && test -s conftest$ac_exeext &&
23047 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023051sed 's/^/| /' conftest.$ac_ext >&5
23052
Martin v. Löwiseba40652007-08-30 20:10:57 +000023053 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023055
23056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023057 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023058fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023059{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23060echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23061if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023062 :
23063else
Martin v. Löwis11437992002-04-12 09:54:03 +000023064
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23066echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023067if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023068 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023069else
Martin v. Löwis11437992002-04-12 09:54:03 +000023070 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023071LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023073/* confdefs.h. */
23074_ACEOF
23075cat confdefs.h >>conftest.$ac_ext
23076cat >>conftest.$ac_ext <<_ACEOF
23077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023078
Martin v. Löwiseba40652007-08-30 20:10:57 +000023079/* Override any GCC internal prototype to avoid an error.
23080 Use char because int might match the return type of a GCC
23081 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023082#ifdef __cplusplus
23083extern "C"
23084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023085char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023086int
23087main ()
23088{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023089return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023090 ;
23091 return 0;
23092}
23093_ACEOF
23094rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023095if { (ac_try="$ac_link"
23096case "(($ac_try" in
23097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23098 *) ac_try_echo=$ac_try;;
23099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023101 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023103 grep -v '^ *+' conftest.er1 >conftest.err
23104 rm -f conftest.er1
23105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023107 (exit $ac_status); } && {
23108 test -z "$ac_c_werror_flag" ||
23109 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023110 } && test -s conftest$ac_exeext &&
23111 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023112 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023115sed 's/^/| /' conftest.$ac_ext >&5
23116
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023119
23120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023122LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023124{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23125echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23126if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 cat >>confdefs.h <<_ACEOF
23128#define HAVE_LIBIEEE 1
23129_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023130
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023131 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023132
Guido van Rossum627b2d71993-12-24 10:39:16 +000023133fi
23134
Michael W. Hudson54241132001-12-07 15:38:26 +000023135
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023136fi
23137
Michael W. Hudson54241132001-12-07 15:38:26 +000023138
Guido van Rossum7f253911997-05-09 02:42:48 +000023139# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023140{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23141echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023142
Martin v. Löwiseba40652007-08-30 20:10:57 +000023143# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023144if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023145 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023146if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023147then
23148
23149cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023150#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023151_ACEOF
23152
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023153 { echo "$as_me:$LINENO: result: yes" >&5
23154echo "${ECHO_T}yes" >&6; }
23155else { echo "$as_me:$LINENO: result: no" >&5
23156echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023157fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023158else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023159 { echo "$as_me:$LINENO: result: no" >&5
23160echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023161fi
23162
Guido van Rossum7f253911997-05-09 02:42:48 +000023163
Guido van Rossum7f43da71994-08-01 12:15:30 +000023164# check for --with-libm=...
23165
Guido van Rossum563e7081996-09-10 18:20:48 +000023166case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023167Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023168BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023169*) LIBM=-lm
23170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023171{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23172echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023173
Martin v. Löwiseba40652007-08-30 20:10:57 +000023174# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023175if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023177if test "$withval" = no
23178then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023179 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23180echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023181elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023182then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023183 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23184echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23185else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23186echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023187 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023188fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023190 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23191echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023192fi
23193
Guido van Rossum7f43da71994-08-01 12:15:30 +000023194
23195# check for --with-libc=...
23196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023197{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23198echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023199
Martin v. Löwiseba40652007-08-30 20:10:57 +000023200# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023201if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023202 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023203if test "$withval" = no
23204then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023205 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23206echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023207elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023208then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023209 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23210echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23211else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23212echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023213 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023214fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023215else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023216 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23217echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023218fi
23219
Guido van Rossum7f43da71994-08-01 12:15:30 +000023220
Christian Heimes0a8143f2007-12-18 23:22:54 +000023221# ************************************
23222# * Check for mathematical functions *
23223# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023224
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023225LIBS_SAVE=$LIBS
23226LIBS="$LIBS $LIBM"
23227
Mark Dickinson04b27232009-01-04 12:29:36 +000023228# Detect whether system arithmetic is subject to x87-style double
23229# rounding issues. The result of this test has little meaning on non
23230# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23231# mode is round-to-nearest and double rounding issues are present, and
23232# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023233{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23234echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023235if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023236 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023237else
23238
23239if test "$cross_compiling" = yes; then
23240 ac_cv_x87_double_rounding=no
23241else
23242 cat >conftest.$ac_ext <<_ACEOF
23243/* confdefs.h. */
23244_ACEOF
23245cat confdefs.h >>conftest.$ac_ext
23246cat >>conftest.$ac_ext <<_ACEOF
23247/* end confdefs.h. */
23248
23249#include <stdlib.h>
23250#include <math.h>
23251int main() {
23252 volatile double x, y, z;
23253 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23254 x = 0.99999999999999989; /* 1-2**-53 */
23255 y = 1./x;
23256 if (y != 1.)
23257 exit(0);
23258 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23259 x = 1e16;
23260 y = 2.99999;
23261 z = x + y;
23262 if (z != 1e16+4.)
23263 exit(0);
23264 /* both tests show evidence of double rounding */
23265 exit(1);
23266}
23267
23268_ACEOF
23269rm -f conftest$ac_exeext
23270if { (ac_try="$ac_link"
23271case "(($ac_try" in
23272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23273 *) ac_try_echo=$ac_try;;
23274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023276 (eval "$ac_link") 2>&5
23277 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23280 { (case "(($ac_try" in
23281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23282 *) ac_try_echo=$ac_try;;
23283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023285 (eval "$ac_try") 2>&5
23286 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023288 (exit $ac_status); }; }; then
23289 ac_cv_x87_double_rounding=no
23290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023291 echo "$as_me: program exited with status $ac_status" >&5
23292echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023293sed 's/^/| /' conftest.$ac_ext >&5
23294
23295( exit $ac_status )
23296ac_cv_x87_double_rounding=yes
23297fi
23298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23299fi
23300
23301
23302fi
23303
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023304{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23305echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023306if test "$ac_cv_x87_double_rounding" = yes
23307then
23308
23309cat >>confdefs.h <<\_ACEOF
23310#define X87_DOUBLE_ROUNDING 1
23311_ACEOF
23312
23313fi
23314
Jesse Noller355b1262009-04-02 00:03:28 +000023315# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023316{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23317echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023318if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23319 echo $ECHO_N "(cached) $ECHO_C" >&6
23320else
23321 if test "$cross_compiling" = yes; then
23322 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023323else
23324 cat >conftest.$ac_ext <<_ACEOF
23325/* confdefs.h. */
23326_ACEOF
23327cat confdefs.h >>conftest.$ac_ext
23328cat >>conftest.$ac_ext <<_ACEOF
23329/* end confdefs.h. */
23330
23331#include <unistd.h>
23332#include <fcntl.h>
23333#include <stdio.h>
23334#include <semaphore.h>
23335#include <sys/stat.h>
23336
23337int main(void){
23338 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23339 int count;
23340 int res;
23341 if(a==SEM_FAILED){
23342 perror("sem_open");
23343 return 1;
23344
23345 }
23346 res = sem_getvalue(a, &count);
23347 sem_close(a);
23348 return res==-1 ? 1 : 0;
23349}
23350
Jesse Noller355b1262009-04-02 00:03:28 +000023351_ACEOF
23352rm -f conftest$ac_exeext
23353if { (ac_try="$ac_link"
23354case "(($ac_try" in
23355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23356 *) ac_try_echo=$ac_try;;
23357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023359 (eval "$ac_link") 2>&5
23360 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23363 { (case "(($ac_try" in
23364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23365 *) ac_try_echo=$ac_try;;
23366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023368 (eval "$ac_try") 2>&5
23369 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023371 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023372 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023374 echo "$as_me: program exited with status $ac_status" >&5
23375echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023376sed 's/^/| /' conftest.$ac_ext >&5
23377
23378( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023379ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023380fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23382fi
23383
23384
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023385
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023386fi
23387
23388{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23389echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23390if test $ac_cv_broken_sem_getvalue = yes
23391then
23392
23393cat >>confdefs.h <<\_ACEOF
23394#define HAVE_BROKEN_SEM_GETVALUE 1
23395_ACEOF
23396
23397fi
23398
Mark Dickinson265d7382008-04-21 22:32:24 +000023399# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23400# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023401{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23402echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023403if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023404 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023405else
23406
23407if test "$cross_compiling" = yes; then
23408 ac_cv_tanh_preserves_zero_sign=no
23409else
23410 cat >conftest.$ac_ext <<_ACEOF
23411/* confdefs.h. */
23412_ACEOF
23413cat confdefs.h >>conftest.$ac_ext
23414cat >>conftest.$ac_ext <<_ACEOF
23415/* end confdefs.h. */
23416
23417#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023418#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023419int main() {
23420 /* return 0 if either negative zeros don't exist
23421 on this platform or if negative zeros exist
23422 and tanh(-0.) == -0. */
23423 if (atan2(0., -1.) == atan2(-0., -1.) ||
23424 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23425 else exit(1);
23426}
23427
23428_ACEOF
23429rm -f conftest$ac_exeext
23430if { (ac_try="$ac_link"
23431case "(($ac_try" in
23432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23433 *) ac_try_echo=$ac_try;;
23434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023436 (eval "$ac_link") 2>&5
23437 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23440 { (case "(($ac_try" in
23441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23442 *) ac_try_echo=$ac_try;;
23443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023445 (eval "$ac_try") 2>&5
23446 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023448 (exit $ac_status); }; }; then
23449 ac_cv_tanh_preserves_zero_sign=yes
23450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023451 echo "$as_me: program exited with status $ac_status" >&5
23452echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023453sed 's/^/| /' conftest.$ac_ext >&5
23454
23455( exit $ac_status )
23456ac_cv_tanh_preserves_zero_sign=no
23457fi
23458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23459fi
23460
23461
23462fi
23463
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023464{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23465echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023466if test "$ac_cv_tanh_preserves_zero_sign" = yes
23467then
23468
23469cat >>confdefs.h <<\_ACEOF
23470#define TANH_PRESERVES_ZERO_SIGN 1
23471_ACEOF
23472
23473fi
23474
Martin v. Löwis11437992002-04-12 09:54:03 +000023475
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023476
Michael W. Hudson54241132001-12-07 15:38:26 +000023477
Christian Heimes0a8143f2007-12-18 23:22:54 +000023478
23479
23480
23481
23482
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023483
Mark Dickinson65898e02009-09-05 10:27:00 +000023484for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23485do
23486as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23487{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23488echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23489if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23490 echo $ECHO_N "(cached) $ECHO_C" >&6
23491else
23492 cat >conftest.$ac_ext <<_ACEOF
23493/* confdefs.h. */
23494_ACEOF
23495cat confdefs.h >>conftest.$ac_ext
23496cat >>conftest.$ac_ext <<_ACEOF
23497/* end confdefs.h. */
23498/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23500#define $ac_func innocuous_$ac_func
23501
23502/* System header to define __stub macros and hopefully few prototypes,
23503 which can conflict with char $ac_func (); below.
23504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23505 <limits.h> exists even on freestanding compilers. */
23506
23507#ifdef __STDC__
23508# include <limits.h>
23509#else
23510# include <assert.h>
23511#endif
23512
23513#undef $ac_func
23514
23515/* Override any GCC internal prototype to avoid an error.
23516 Use char because int might match the return type of a GCC
23517 builtin and then its argument prototype would still apply. */
23518#ifdef __cplusplus
23519extern "C"
23520#endif
23521char $ac_func ();
23522/* The GNU C library defines this for functions which it implements
23523 to always fail with ENOSYS. Some functions are actually named
23524 something starting with __ and the normal name is an alias. */
23525#if defined __stub_$ac_func || defined __stub___$ac_func
23526choke me
23527#endif
23528
23529int
23530main ()
23531{
23532return $ac_func ();
23533 ;
23534 return 0;
23535}
23536_ACEOF
23537rm -f conftest.$ac_objext conftest$ac_exeext
23538if { (ac_try="$ac_link"
23539case "(($ac_try" in
23540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23541 *) ac_try_echo=$ac_try;;
23542esac
23543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23544 (eval "$ac_link") 2>conftest.er1
23545 ac_status=$?
23546 grep -v '^ *+' conftest.er1 >conftest.err
23547 rm -f conftest.er1
23548 cat conftest.err >&5
23549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23550 (exit $ac_status); } && {
23551 test -z "$ac_c_werror_flag" ||
23552 test ! -s conftest.err
23553 } && test -s conftest$ac_exeext &&
23554 $as_test_x conftest$ac_exeext; then
23555 eval "$as_ac_var=yes"
23556else
23557 echo "$as_me: failed program was:" >&5
23558sed 's/^/| /' conftest.$ac_ext >&5
23559
23560 eval "$as_ac_var=no"
23561fi
23562
23563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23564 conftest$ac_exeext conftest.$ac_ext
23565fi
23566ac_res=`eval echo '${'$as_ac_var'}'`
23567 { echo "$as_me:$LINENO: result: $ac_res" >&5
23568echo "${ECHO_T}$ac_res" >&6; }
23569if test `eval echo '${'$as_ac_var'}'` = yes; then
23570 cat >>confdefs.h <<_ACEOF
23571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23572_ACEOF
23573
23574fi
23575done
23576
23577
23578
23579
23580
23581
23582for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000023583do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023584as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23585{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23586echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023587if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023588 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023589else
23590 cat >conftest.$ac_ext <<_ACEOF
23591/* confdefs.h. */
23592_ACEOF
23593cat confdefs.h >>conftest.$ac_ext
23594cat >>conftest.$ac_ext <<_ACEOF
23595/* end confdefs.h. */
23596/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23597 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23598#define $ac_func innocuous_$ac_func
23599
23600/* System header to define __stub macros and hopefully few prototypes,
23601 which can conflict with char $ac_func (); below.
23602 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23603 <limits.h> exists even on freestanding compilers. */
23604
23605#ifdef __STDC__
23606# include <limits.h>
23607#else
23608# include <assert.h>
23609#endif
23610
23611#undef $ac_func
23612
23613/* Override any GCC internal prototype to avoid an error.
23614 Use char because int might match the return type of a GCC
23615 builtin and then its argument prototype would still apply. */
23616#ifdef __cplusplus
23617extern "C"
23618#endif
23619char $ac_func ();
23620/* The GNU C library defines this for functions which it implements
23621 to always fail with ENOSYS. Some functions are actually named
23622 something starting with __ and the normal name is an alias. */
23623#if defined __stub_$ac_func || defined __stub___$ac_func
23624choke me
23625#endif
23626
23627int
23628main ()
23629{
23630return $ac_func ();
23631 ;
23632 return 0;
23633}
23634_ACEOF
23635rm -f conftest.$ac_objext conftest$ac_exeext
23636if { (ac_try="$ac_link"
23637case "(($ac_try" in
23638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23639 *) ac_try_echo=$ac_try;;
23640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023642 (eval "$ac_link") 2>conftest.er1
23643 ac_status=$?
23644 grep -v '^ *+' conftest.er1 >conftest.err
23645 rm -f conftest.er1
23646 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023648 (exit $ac_status); } && {
23649 test -z "$ac_c_werror_flag" ||
23650 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023651 } && test -s conftest$ac_exeext &&
23652 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023653 eval "$as_ac_var=yes"
23654else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023655 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023656sed 's/^/| /' conftest.$ac_ext >&5
23657
23658 eval "$as_ac_var=no"
23659fi
23660
23661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23662 conftest$ac_exeext conftest.$ac_ext
23663fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023664ac_res=`eval echo '${'$as_ac_var'}'`
23665 { echo "$as_me:$LINENO: result: $ac_res" >&5
23666echo "${ECHO_T}$ac_res" >&6; }
23667if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023668 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023669#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023670_ACEOF
23671
23672fi
23673done
23674
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023675{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23676echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023677if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023678 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023679else
23680 cat >conftest.$ac_ext <<_ACEOF
23681/* confdefs.h. */
23682_ACEOF
23683cat confdefs.h >>conftest.$ac_ext
23684cat >>conftest.$ac_ext <<_ACEOF
23685/* end confdefs.h. */
23686#include <math.h>
23687
23688int
23689main ()
23690{
23691#ifndef isinf
23692 (void) isinf;
23693#endif
23694
23695 ;
23696 return 0;
23697}
23698_ACEOF
23699rm -f conftest.$ac_objext
23700if { (ac_try="$ac_compile"
23701case "(($ac_try" in
23702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23703 *) ac_try_echo=$ac_try;;
23704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023706 (eval "$ac_compile") 2>conftest.er1
23707 ac_status=$?
23708 grep -v '^ *+' conftest.er1 >conftest.err
23709 rm -f conftest.er1
23710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023712 (exit $ac_status); } && {
23713 test -z "$ac_c_werror_flag" ||
23714 test ! -s conftest.err
23715 } && test -s conftest.$ac_objext; then
23716 ac_cv_have_decl_isinf=yes
23717else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023718 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023719sed 's/^/| /' conftest.$ac_ext >&5
23720
23721 ac_cv_have_decl_isinf=no
23722fi
23723
23724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23725fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023726{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23727echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23728if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023729
23730cat >>confdefs.h <<_ACEOF
23731#define HAVE_DECL_ISINF 1
23732_ACEOF
23733
23734
23735else
23736 cat >>confdefs.h <<_ACEOF
23737#define HAVE_DECL_ISINF 0
23738_ACEOF
23739
23740
23741fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023742{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23743echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023744if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023745 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023746else
23747 cat >conftest.$ac_ext <<_ACEOF
23748/* confdefs.h. */
23749_ACEOF
23750cat confdefs.h >>conftest.$ac_ext
23751cat >>conftest.$ac_ext <<_ACEOF
23752/* end confdefs.h. */
23753#include <math.h>
23754
23755int
23756main ()
23757{
23758#ifndef isnan
23759 (void) isnan;
23760#endif
23761
23762 ;
23763 return 0;
23764}
23765_ACEOF
23766rm -f conftest.$ac_objext
23767if { (ac_try="$ac_compile"
23768case "(($ac_try" in
23769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23770 *) ac_try_echo=$ac_try;;
23771esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023773 (eval "$ac_compile") 2>conftest.er1
23774 ac_status=$?
23775 grep -v '^ *+' conftest.er1 >conftest.err
23776 rm -f conftest.er1
23777 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023779 (exit $ac_status); } && {
23780 test -z "$ac_c_werror_flag" ||
23781 test ! -s conftest.err
23782 } && test -s conftest.$ac_objext; then
23783 ac_cv_have_decl_isnan=yes
23784else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023785 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023786sed 's/^/| /' conftest.$ac_ext >&5
23787
23788 ac_cv_have_decl_isnan=no
23789fi
23790
23791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23792fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023793{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23794echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23795if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023796
23797cat >>confdefs.h <<_ACEOF
23798#define HAVE_DECL_ISNAN 1
23799_ACEOF
23800
23801
23802else
23803 cat >>confdefs.h <<_ACEOF
23804#define HAVE_DECL_ISNAN 0
23805_ACEOF
23806
23807
23808fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023809{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23810echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023811if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023812 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023813else
23814 cat >conftest.$ac_ext <<_ACEOF
23815/* confdefs.h. */
23816_ACEOF
23817cat confdefs.h >>conftest.$ac_ext
23818cat >>conftest.$ac_ext <<_ACEOF
23819/* end confdefs.h. */
23820#include <math.h>
23821
23822int
23823main ()
23824{
23825#ifndef isfinite
23826 (void) isfinite;
23827#endif
23828
23829 ;
23830 return 0;
23831}
23832_ACEOF
23833rm -f conftest.$ac_objext
23834if { (ac_try="$ac_compile"
23835case "(($ac_try" in
23836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23837 *) ac_try_echo=$ac_try;;
23838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023840 (eval "$ac_compile") 2>conftest.er1
23841 ac_status=$?
23842 grep -v '^ *+' conftest.er1 >conftest.err
23843 rm -f conftest.er1
23844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023846 (exit $ac_status); } && {
23847 test -z "$ac_c_werror_flag" ||
23848 test ! -s conftest.err
23849 } && test -s conftest.$ac_objext; then
23850 ac_cv_have_decl_isfinite=yes
23851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023852 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023853sed 's/^/| /' conftest.$ac_ext >&5
23854
23855 ac_cv_have_decl_isfinite=no
23856fi
23857
23858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23859fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023860{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23861echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23862if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023863
23864cat >>confdefs.h <<_ACEOF
23865#define HAVE_DECL_ISFINITE 1
23866_ACEOF
23867
23868
23869else
23870 cat >>confdefs.h <<_ACEOF
23871#define HAVE_DECL_ISFINITE 0
23872_ACEOF
23873
23874
23875fi
23876
23877
Christian Heimes0a8143f2007-12-18 23:22:54 +000023878
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023879LIBS=$LIBS_SAVE
23880
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023881# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023882{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23883echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023884# Check whether --enable-big-digits was given.
23885if test "${enable_big_digits+set}" = set; then
23886 enableval=$enable_big_digits; case $enable_big_digits in
23887yes)
23888 enable_big_digits=30 ;;
23889no)
23890 enable_big_digits=15 ;;
2389115|30)
23892 ;;
23893*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023894 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23895echo "$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 +000023896 { (exit 1); exit 1; }; } ;;
23897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023898{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23899echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023900
23901cat >>confdefs.h <<_ACEOF
23902#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23903_ACEOF
23904
23905
23906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023907 { echo "$as_me:$LINENO: result: no value specified" >&5
23908echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023909fi
23910
23911
Guido van Rossumef2255b2000-03-10 22:30:29 +000023912# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023913if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023914 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23915echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023916if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023918fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023919{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23920echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023921else
Martin v. Löwis11437992002-04-12 09:54:03 +000023922 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023923{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23924echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023926/* confdefs.h. */
23927_ACEOF
23928cat confdefs.h >>conftest.$ac_ext
23929cat >>conftest.$ac_ext <<_ACEOF
23930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023931$ac_includes_default
23932#include <wchar.h>
23933_ACEOF
23934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023935if { (ac_try="$ac_compile"
23936case "(($ac_try" in
23937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23938 *) ac_try_echo=$ac_try;;
23939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023943 grep -v '^ *+' conftest.er1 >conftest.err
23944 rm -f conftest.er1
23945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023947 (exit $ac_status); } && {
23948 test -z "$ac_c_werror_flag" ||
23949 test ! -s conftest.err
23950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023951 ac_header_compiler=yes
23952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023954sed 's/^/| /' conftest.$ac_ext >&5
23955
Martin v. Löwiseba40652007-08-30 20:10:57 +000023956 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023958
23959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023960{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23961echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023962
23963# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023964{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23965echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023967/* confdefs.h. */
23968_ACEOF
23969cat confdefs.h >>conftest.$ac_ext
23970cat >>conftest.$ac_ext <<_ACEOF
23971/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023972#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023973_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974if { (ac_try="$ac_cpp conftest.$ac_ext"
23975case "(($ac_try" in
23976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23977 *) ac_try_echo=$ac_try;;
23978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023982 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023983 rm -f conftest.er1
23984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023986 (exit $ac_status); } >/dev/null && {
23987 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23988 test ! -s conftest.err
23989 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023990 ac_header_preproc=yes
23991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023993sed 's/^/| /' conftest.$ac_ext >&5
23994
Martin v. Löwis11437992002-04-12 09:54:03 +000023995 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023997
Martin v. Löwis11437992002-04-12 09:54:03 +000023998rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023999{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24000echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024001
24002# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024003case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24004 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024005 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24006echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24007 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24008echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024009 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024010 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024011 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024012 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24013echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24014 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24015echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24016 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24017echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24018 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24019echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24020 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24021echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24022 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24023echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024024 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024025## -------------------------------------- ##
24026## Report this to http://bugs.python.org/ ##
24027## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024028_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024029 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024030 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024032{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24033echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024034if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024036else
24037 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024038fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024039{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24040echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024041
24042fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024043if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024044
24045
24046cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024047#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024048_ACEOF
24049
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024050 wchar_h="yes"
24051
Guido van Rossumef2255b2000-03-10 22:30:29 +000024052else
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024054
24055fi
24056
Michael W. Hudson54241132001-12-07 15:38:26 +000024057
Martin v. Löwis11437992002-04-12 09:54:03 +000024058
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024059# determine wchar_t size
24060if test "$wchar_h" = yes
24061then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024062 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24063echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24064if test "${ac_cv_type_wchar_t+set}" = set; then
24065 echo $ECHO_N "(cached) $ECHO_C" >&6
24066else
24067 cat >conftest.$ac_ext <<_ACEOF
24068/* confdefs.h. */
24069_ACEOF
24070cat confdefs.h >>conftest.$ac_ext
24071cat >>conftest.$ac_ext <<_ACEOF
24072/* end confdefs.h. */
24073#include <wchar.h>
24074
24075typedef wchar_t ac__type_new_;
24076int
24077main ()
24078{
24079if ((ac__type_new_ *) 0)
24080 return 0;
24081if (sizeof (ac__type_new_))
24082 return 0;
24083 ;
24084 return 0;
24085}
24086_ACEOF
24087rm -f conftest.$ac_objext
24088if { (ac_try="$ac_compile"
24089case "(($ac_try" in
24090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24091 *) ac_try_echo=$ac_try;;
24092esac
24093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24094 (eval "$ac_compile") 2>conftest.er1
24095 ac_status=$?
24096 grep -v '^ *+' conftest.er1 >conftest.err
24097 rm -f conftest.er1
24098 cat conftest.err >&5
24099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24100 (exit $ac_status); } && {
24101 test -z "$ac_c_werror_flag" ||
24102 test ! -s conftest.err
24103 } && test -s conftest.$ac_objext; then
24104 ac_cv_type_wchar_t=yes
24105else
24106 echo "$as_me: failed program was:" >&5
24107sed 's/^/| /' conftest.$ac_ext >&5
24108
24109 ac_cv_type_wchar_t=no
24110fi
24111
24112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24113fi
24114{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24115echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24116
24117# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24120# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024121{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24122echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024123if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024124 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024125else
Martin v. Löwis11437992002-04-12 09:54:03 +000024126 if test "$cross_compiling" = yes; then
24127 # Depending upon the size, compute the lo and hi bounds.
24128cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024129/* confdefs.h. */
24130_ACEOF
24131cat confdefs.h >>conftest.$ac_ext
24132cat >>conftest.$ac_ext <<_ACEOF
24133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024134#include <wchar.h>
24135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024136 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024137int
24138main ()
24139{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024141test_array [0] = 0
24142
24143 ;
24144 return 0;
24145}
24146_ACEOF
24147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024148if { (ac_try="$ac_compile"
24149case "(($ac_try" in
24150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24151 *) ac_try_echo=$ac_try;;
24152esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024154 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024156 grep -v '^ *+' conftest.er1 >conftest.err
24157 rm -f conftest.er1
24158 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024160 (exit $ac_status); } && {
24161 test -z "$ac_c_werror_flag" ||
24162 test ! -s conftest.err
24163 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024164 ac_lo=0 ac_mid=0
24165 while :; do
24166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024167/* confdefs.h. */
24168_ACEOF
24169cat confdefs.h >>conftest.$ac_ext
24170cat >>conftest.$ac_ext <<_ACEOF
24171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024172#include <wchar.h>
24173
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024174 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024175int
24176main ()
24177{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024178static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024179test_array [0] = 0
24180
24181 ;
24182 return 0;
24183}
24184_ACEOF
24185rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024186if { (ac_try="$ac_compile"
24187case "(($ac_try" in
24188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24189 *) ac_try_echo=$ac_try;;
24190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024194 grep -v '^ *+' conftest.er1 >conftest.err
24195 rm -f conftest.er1
24196 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024198 (exit $ac_status); } && {
24199 test -z "$ac_c_werror_flag" ||
24200 test ! -s conftest.err
24201 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024202 ac_hi=$ac_mid; break
24203else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024205sed 's/^/| /' conftest.$ac_ext >&5
24206
Martin v. Löwiseba40652007-08-30 20:10:57 +000024207 ac_lo=`expr $ac_mid + 1`
24208 if test $ac_lo -le $ac_mid; then
24209 ac_lo= ac_hi=
24210 break
24211 fi
24212 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214
24215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024216 done
24217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024219sed 's/^/| /' conftest.$ac_ext >&5
24220
Martin v. Löwiseba40652007-08-30 20:10:57 +000024221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024222/* confdefs.h. */
24223_ACEOF
24224cat confdefs.h >>conftest.$ac_ext
24225cat >>conftest.$ac_ext <<_ACEOF
24226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024227#include <wchar.h>
24228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024229 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024230int
24231main ()
24232{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024233static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024234test_array [0] = 0
24235
24236 ;
24237 return 0;
24238}
24239_ACEOF
24240rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024241if { (ac_try="$ac_compile"
24242case "(($ac_try" in
24243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24244 *) ac_try_echo=$ac_try;;
24245esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024247 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024249 grep -v '^ *+' conftest.er1 >conftest.err
24250 rm -f conftest.er1
24251 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024253 (exit $ac_status); } && {
24254 test -z "$ac_c_werror_flag" ||
24255 test ! -s conftest.err
24256 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024257 ac_hi=-1 ac_mid=-1
24258 while :; do
24259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024260/* confdefs.h. */
24261_ACEOF
24262cat confdefs.h >>conftest.$ac_ext
24263cat >>conftest.$ac_ext <<_ACEOF
24264/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024265#include <wchar.h>
24266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024267 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024268int
24269main ()
24270{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024272test_array [0] = 0
24273
24274 ;
24275 return 0;
24276}
24277_ACEOF
24278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024279if { (ac_try="$ac_compile"
24280case "(($ac_try" in
24281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24282 *) ac_try_echo=$ac_try;;
24283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024287 grep -v '^ *+' conftest.er1 >conftest.err
24288 rm -f conftest.er1
24289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024291 (exit $ac_status); } && {
24292 test -z "$ac_c_werror_flag" ||
24293 test ! -s conftest.err
24294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024295 ac_lo=$ac_mid; break
24296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024298sed 's/^/| /' conftest.$ac_ext >&5
24299
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300 ac_hi=`expr '(' $ac_mid ')' - 1`
24301 if test $ac_mid -le $ac_hi; then
24302 ac_lo= ac_hi=
24303 break
24304 fi
24305 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024307
24308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024309 done
24310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024312sed 's/^/| /' conftest.$ac_ext >&5
24313
Martin v. Löwiseba40652007-08-30 20:10:57 +000024314 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024316
24317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024319
24320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024321# Binary search between lo and hi bounds.
24322while test "x$ac_lo" != "x$ac_hi"; do
24323 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024325/* confdefs.h. */
24326_ACEOF
24327cat confdefs.h >>conftest.$ac_ext
24328cat >>conftest.$ac_ext <<_ACEOF
24329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024330#include <wchar.h>
24331
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024332 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024333int
24334main ()
24335{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024337test_array [0] = 0
24338
24339 ;
24340 return 0;
24341}
24342_ACEOF
24343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024344if { (ac_try="$ac_compile"
24345case "(($ac_try" in
24346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24347 *) ac_try_echo=$ac_try;;
24348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024352 grep -v '^ *+' conftest.er1 >conftest.err
24353 rm -f conftest.er1
24354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024356 (exit $ac_status); } && {
24357 test -z "$ac_c_werror_flag" ||
24358 test ! -s conftest.err
24359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024360 ac_hi=$ac_mid
24361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024363sed 's/^/| /' conftest.$ac_ext >&5
24364
Martin v. Löwiseba40652007-08-30 20:10:57 +000024365 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024367
24368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024369done
24370case $ac_lo in
24371?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024372'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024374See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024375echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024376See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024377 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378 else
24379 ac_cv_sizeof_wchar_t=0
24380 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024381esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024382else
Martin v. Löwis11437992002-04-12 09:54:03 +000024383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024384/* confdefs.h. */
24385_ACEOF
24386cat confdefs.h >>conftest.$ac_ext
24387cat >>conftest.$ac_ext <<_ACEOF
24388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024389#include <wchar.h>
24390
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024391 typedef wchar_t ac__type_sizeof_;
24392static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24393static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024394#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024395#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024396int
24397main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024398{
Martin v. Löwis11437992002-04-12 09:54:03 +000024399
24400 FILE *f = fopen ("conftest.val", "w");
24401 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024402 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024403 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024405 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024406 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024408 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024409 }
24410 else
24411 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024413 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024414 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024415 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024416 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024418
24419 ;
24420 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024421}
Martin v. Löwis11437992002-04-12 09:54:03 +000024422_ACEOF
24423rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024424if { (ac_try="$ac_link"
24425case "(($ac_try" in
24426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24427 *) ac_try_echo=$ac_try;;
24428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024431 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024434 { (case "(($ac_try" in
24435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24436 *) ac_try_echo=$ac_try;;
24437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024442 (exit $ac_status); }; }; then
24443 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024445 echo "$as_me: program exited with status $ac_status" >&5
24446echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024447sed 's/^/| /' conftest.$ac_ext >&5
24448
Martin v. Löwis11437992002-04-12 09:54:03 +000024449( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024450if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024451 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024452See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024453echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024454See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024455 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456 else
24457 ac_cv_sizeof_wchar_t=0
24458 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024460rm -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 +000024461fi
24462rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024463fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024464{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24465echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024466
24467
24468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024470#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024471_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024472
Michael W. Hudson54241132001-12-07 15:38:26 +000024473
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024474fi
24475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024476{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24477echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024478have_ucs4_tcl=no
24479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024480/* confdefs.h. */
24481_ACEOF
24482cat confdefs.h >>conftest.$ac_ext
24483cat >>conftest.$ac_ext <<_ACEOF
24484/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024485
24486#include <tcl.h>
24487#if TCL_UTF_MAX != 6
24488# error "NOT UCS4_TCL"
24489#endif
24490int
24491main ()
24492{
24493
24494 ;
24495 return 0;
24496}
24497_ACEOF
24498rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024499if { (ac_try="$ac_compile"
24500case "(($ac_try" in
24501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24502 *) ac_try_echo=$ac_try;;
24503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024505 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024506 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024507 grep -v '^ *+' conftest.er1 >conftest.err
24508 rm -f conftest.er1
24509 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511 (exit $ac_status); } && {
24512 test -z "$ac_c_werror_flag" ||
24513 test ! -s conftest.err
24514 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024515
24516
24517cat >>confdefs.h <<\_ACEOF
24518#define HAVE_UCS4_TCL 1
24519_ACEOF
24520
24521 have_ucs4_tcl=yes
24522
24523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024525sed 's/^/| /' conftest.$ac_ext >&5
24526
Martin v. Löwiseba40652007-08-30 20:10:57 +000024527
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529
24530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024531{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24532echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024533
Skip Montanaro6dead952003-09-25 14:50:04 +000024534# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024535if test "$wchar_h" = yes
24536then
24537 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024538 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24539echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024540 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024541 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024542else
24543
24544 if test "$cross_compiling" = yes; then
24545 ac_cv_wchar_t_signed=yes
24546else
24547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024548/* confdefs.h. */
24549_ACEOF
24550cat confdefs.h >>conftest.$ac_ext
24551cat >>conftest.$ac_ext <<_ACEOF
24552/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024553
24554 #include <wchar.h>
24555 int main()
24556 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024557 /* Success: exit code 0 */
24558 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024559 }
24560
24561_ACEOF
24562rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024563if { (ac_try="$ac_link"
24564case "(($ac_try" in
24565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24566 *) ac_try_echo=$ac_try;;
24567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024569 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024570 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024573 { (case "(($ac_try" in
24574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24575 *) ac_try_echo=$ac_try;;
24576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024578 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024579 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024581 (exit $ac_status); }; }; then
24582 ac_cv_wchar_t_signed=yes
24583else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024584 echo "$as_me: program exited with status $ac_status" >&5
24585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024586sed 's/^/| /' conftest.$ac_ext >&5
24587
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024588( exit $ac_status )
24589ac_cv_wchar_t_signed=no
24590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591rm -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 +000024592fi
24593
Martin v. Löwiseba40652007-08-30 20:10:57 +000024594
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024595fi
24596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024597 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24598echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024599fi
24600
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024601{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24602echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024603# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024604if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024606else
24607 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608fi
24609
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024610
24611if test $enable_unicode = yes
24612then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024613 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024614 case "$have_ucs4_tcl" in
24615 yes) enable_unicode="ucs4"
24616 ;;
24617 *) enable_unicode="ucs2"
24618 ;;
24619 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024620fi
24621
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024622
24623
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024624case "$enable_unicode" in
24625ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024627#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024628_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024629
24630 ;;
24631ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024632 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024633#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024634_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024635
24636 ;;
24637esac
24638
Michael W. Hudson54241132001-12-07 15:38:26 +000024639
Martin v. Löwis11437992002-04-12 09:54:03 +000024640
24641
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024642
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024643if test "$enable_unicode" = "no"
24644then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024645 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024646 { echo "$as_me:$LINENO: result: not used" >&5
24647echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024648else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024649 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024650
24651cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024652#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024653_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024654
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024655
24656 # wchar_t is only usable if it maps to an unsigned type
24657 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024658 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024659 then
24660 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024661
Martin v. Löwis11437992002-04-12 09:54:03 +000024662cat >>confdefs.h <<\_ACEOF
24663#define HAVE_USABLE_WCHAR_T 1
24664_ACEOF
24665
24666 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024667#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024668_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024669
24670 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24671 then
24672 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024673 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024674#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024675_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024676
24677 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24678 then
24679 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024681#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024682_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024683
24684 else
24685 PY_UNICODE_TYPE="no type found"
24686 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024687 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24688echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024689fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024690
24691# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024692{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24693echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024694if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024695 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024697 # See if sys/param.h defines the BYTE_ORDER macro.
24698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024699/* confdefs.h. */
24700_ACEOF
24701cat confdefs.h >>conftest.$ac_ext
24702cat >>conftest.$ac_ext <<_ACEOF
24703/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024704#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024705#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024706
Martin v. Löwis11437992002-04-12 09:54:03 +000024707int
24708main ()
24709{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024710#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24711 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24712 bogus endian macros
24713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024714
24715 ;
24716 return 0;
24717}
24718_ACEOF
24719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024720if { (ac_try="$ac_compile"
24721case "(($ac_try" in
24722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24723 *) ac_try_echo=$ac_try;;
24724esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024728 grep -v '^ *+' conftest.er1 >conftest.err
24729 rm -f conftest.er1
24730 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024732 (exit $ac_status); } && {
24733 test -z "$ac_c_werror_flag" ||
24734 test ! -s conftest.err
24735 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024736 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024737cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024738/* confdefs.h. */
24739_ACEOF
24740cat confdefs.h >>conftest.$ac_ext
24741cat >>conftest.$ac_ext <<_ACEOF
24742/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024743#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024744#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024745
Martin v. Löwis11437992002-04-12 09:54:03 +000024746int
24747main ()
24748{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024749#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024750 not big endian
24751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024752
24753 ;
24754 return 0;
24755}
24756_ACEOF
24757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024758if { (ac_try="$ac_compile"
24759case "(($ac_try" in
24760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24761 *) ac_try_echo=$ac_try;;
24762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024766 grep -v '^ *+' conftest.er1 >conftest.err
24767 rm -f conftest.er1
24768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024770 (exit $ac_status); } && {
24771 test -z "$ac_c_werror_flag" ||
24772 test ! -s conftest.err
24773 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024774 ac_cv_c_bigendian=yes
24775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024777sed 's/^/| /' conftest.$ac_ext >&5
24778
Martin v. Löwiseba40652007-08-30 20:10:57 +000024779 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024781
24782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024783else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024785sed 's/^/| /' conftest.$ac_ext >&5
24786
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024787 # It does not; compile a test program.
24788if test "$cross_compiling" = yes; then
24789 # try to guess the endianness by grepping values into an object file
24790 ac_cv_c_bigendian=unknown
24791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024792/* confdefs.h. */
24793_ACEOF
24794cat confdefs.h >>conftest.$ac_ext
24795cat >>conftest.$ac_ext <<_ACEOF
24796/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024797short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24798short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24799void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24800short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24801short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24802void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024803int
24804main ()
24805{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024806 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024807 ;
24808 return 0;
24809}
24810_ACEOF
24811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024812if { (ac_try="$ac_compile"
24813case "(($ac_try" in
24814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24815 *) ac_try_echo=$ac_try;;
24816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024820 grep -v '^ *+' conftest.er1 >conftest.err
24821 rm -f conftest.er1
24822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024824 (exit $ac_status); } && {
24825 test -z "$ac_c_werror_flag" ||
24826 test ! -s conftest.err
24827 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024828 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024829 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024831if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24832 if test "$ac_cv_c_bigendian" = unknown; then
24833 ac_cv_c_bigendian=no
24834 else
24835 # finding both strings is unlikely to happen, but who knows?
24836 ac_cv_c_bigendian=unknown
24837 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024838fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024841sed 's/^/| /' conftest.$ac_ext >&5
24842
Martin v. Löwiseba40652007-08-30 20:10:57 +000024843
Martin v. Löwis11437992002-04-12 09:54:03 +000024844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024845
24846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024847else
24848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024849/* confdefs.h. */
24850_ACEOF
24851cat confdefs.h >>conftest.$ac_ext
24852cat >>conftest.$ac_ext <<_ACEOF
24853/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024854$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024855int
24856main ()
24857{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024859 /* Are we little or big endian? From Harbison&Steele. */
24860 union
24861 {
24862 long int l;
24863 char c[sizeof (long int)];
24864 } u;
24865 u.l = 1;
24866 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024867
24868 ;
24869 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024870}
Martin v. Löwis11437992002-04-12 09:54:03 +000024871_ACEOF
24872rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024873if { (ac_try="$ac_link"
24874case "(($ac_try" in
24875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24876 *) ac_try_echo=$ac_try;;
24877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024879 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024880 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 { (case "(($ac_try" in
24884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24885 *) ac_try_echo=$ac_try;;
24886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024891 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024892 ac_cv_c_bigendian=no
24893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024894 echo "$as_me: program exited with status $ac_status" >&5
24895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024896sed 's/^/| /' conftest.$ac_ext >&5
24897
Martin v. Löwis11437992002-04-12 09:54:03 +000024898( exit $ac_status )
24899ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024901rm -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 +000024902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903
24904
Martin v. Löwis11437992002-04-12 09:54:03 +000024905fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024906
24907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24908fi
24909{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24910echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24911case $ac_cv_c_bigendian in
24912 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024913
24914cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024915#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024916_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024917 ;;
24918 no)
24919 ;;
24920 *)
24921 { { echo "$as_me:$LINENO: error: unknown endianness
24922presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24923echo "$as_me: error: unknown endianness
24924presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024925 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024926esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024927
Michael W. Hudson54241132001-12-07 15:38:26 +000024928
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024929# Check whether right shifting a negative integer extends the sign bit
24930# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024931{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24932echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024933if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024934 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024935else
Martin v. Löwis11437992002-04-12 09:54:03 +000024936
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024937if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024938 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024939else
Martin v. Löwis11437992002-04-12 09:54:03 +000024940 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024941/* confdefs.h. */
24942_ACEOF
24943cat confdefs.h >>conftest.$ac_ext
24944cat >>conftest.$ac_ext <<_ACEOF
24945/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024946
24947int main()
24948{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024949 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024950}
24951
Martin v. Löwis11437992002-04-12 09:54:03 +000024952_ACEOF
24953rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024954if { (ac_try="$ac_link"
24955case "(($ac_try" in
24956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24957 *) ac_try_echo=$ac_try;;
24958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024960 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024961 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024964 { (case "(($ac_try" in
24965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24966 *) ac_try_echo=$ac_try;;
24967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024969 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024970 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024972 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024973 ac_cv_rshift_extends_sign=yes
24974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024975 echo "$as_me: program exited with status $ac_status" >&5
24976echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024977sed 's/^/| /' conftest.$ac_ext >&5
24978
Martin v. Löwis11437992002-04-12 09:54:03 +000024979( exit $ac_status )
24980ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982rm -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 +000024983fi
24984
Martin v. Löwiseba40652007-08-30 20:10:57 +000024985
24986fi
24987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024988{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24989echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024990if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024991then
Martin v. Löwis11437992002-04-12 09:54:03 +000024992
24993cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024994#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024995_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024996
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024997fi
24998
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024999# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025000{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25001echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025002if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025004else
Martin v. Löwis11437992002-04-12 09:54:03 +000025005
25006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025007/* confdefs.h. */
25008_ACEOF
25009cat confdefs.h >>conftest.$ac_ext
25010cat >>conftest.$ac_ext <<_ACEOF
25011/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025012#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025013int
25014main ()
25015{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025016
25017 FILE *f = fopen("/dev/null", "r");
25018 flockfile(f);
25019 getc_unlocked(f);
25020 funlockfile(f);
25021
Martin v. Löwis11437992002-04-12 09:54:03 +000025022 ;
25023 return 0;
25024}
25025_ACEOF
25026rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025027if { (ac_try="$ac_link"
25028case "(($ac_try" in
25029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25030 *) ac_try_echo=$ac_try;;
25031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025035 grep -v '^ *+' conftest.er1 >conftest.err
25036 rm -f conftest.er1
25037 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025039 (exit $ac_status); } && {
25040 test -z "$ac_c_werror_flag" ||
25041 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025042 } && test -s conftest$ac_exeext &&
25043 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025044 ac_cv_have_getc_unlocked=yes
25045else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025046 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025047sed 's/^/| /' conftest.$ac_ext >&5
25048
Martin v. Löwiseba40652007-08-30 20:10:57 +000025049 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051
25052rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025053 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025054fi
25055
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025056{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25057echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025058if test "$ac_cv_have_getc_unlocked" = yes
25059then
Martin v. Löwis11437992002-04-12 09:54:03 +000025060
25061cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025062#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025063_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025064
25065fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025066
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025067# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025068# save the value of LIBS so we don't actually link Python with readline
25069LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025070
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025071# On some systems we need to link readline to a termcap compatible
25072# library. NOTE: Keep the precedence of listed libraries synchronised
25073# with setup.py.
25074py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025075{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25076echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025077for py_libtermcap in "" ncursesw ncurses curses termcap; do
25078 if test -z "$py_libtermcap"; then
25079 READLINE_LIBS="-lreadline"
25080 else
25081 READLINE_LIBS="-lreadline -l$py_libtermcap"
25082 fi
25083 LIBS="$READLINE_LIBS $LIBS_no_readline"
25084 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025085/* confdefs.h. */
25086_ACEOF
25087cat confdefs.h >>conftest.$ac_ext
25088cat >>conftest.$ac_ext <<_ACEOF
25089/* end confdefs.h. */
25090
Martin v. Löwiseba40652007-08-30 20:10:57 +000025091/* Override any GCC internal prototype to avoid an error.
25092 Use char because int might match the return type of a GCC
25093 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025094#ifdef __cplusplus
25095extern "C"
25096#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025097char readline ();
25098int
25099main ()
25100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025101return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025102 ;
25103 return 0;
25104}
25105_ACEOF
25106rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025107if { (ac_try="$ac_link"
25108case "(($ac_try" in
25109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25110 *) ac_try_echo=$ac_try;;
25111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025113 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025114 ac_status=$?
25115 grep -v '^ *+' conftest.er1 >conftest.err
25116 rm -f conftest.er1
25117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025119 (exit $ac_status); } && {
25120 test -z "$ac_c_werror_flag" ||
25121 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025122 } && test -s conftest$ac_exeext &&
25123 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025124 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025126 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025127sed 's/^/| /' conftest.$ac_ext >&5
25128
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025129
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025131
25132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025133 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025134 if test $py_cv_lib_readline = yes; then
25135 break
25136 fi
25137done
25138# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25139#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025140if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025141 { echo "$as_me:$LINENO: result: none" >&5
25142echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025144 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25145echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025146
25147cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025148#define HAVE_LIBREADLINE 1
25149_ACEOF
25150
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025151fi
25152
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025153# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025154{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25155echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025156if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025157 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025158else
25159 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025160LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025161cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025162/* confdefs.h. */
25163_ACEOF
25164cat confdefs.h >>conftest.$ac_ext
25165cat >>conftest.$ac_ext <<_ACEOF
25166/* end confdefs.h. */
25167
Martin v. Löwiseba40652007-08-30 20:10:57 +000025168/* Override any GCC internal prototype to avoid an error.
25169 Use char because int might match the return type of a GCC
25170 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025171#ifdef __cplusplus
25172extern "C"
25173#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025174char rl_callback_handler_install ();
25175int
25176main ()
25177{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025178return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025179 ;
25180 return 0;
25181}
25182_ACEOF
25183rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025184if { (ac_try="$ac_link"
25185case "(($ac_try" in
25186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25187 *) ac_try_echo=$ac_try;;
25188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025190 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025192 grep -v '^ *+' conftest.er1 >conftest.err
25193 rm -f conftest.er1
25194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025196 (exit $ac_status); } && {
25197 test -z "$ac_c_werror_flag" ||
25198 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025199 } && test -s conftest$ac_exeext &&
25200 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025201 ac_cv_lib_readline_rl_callback_handler_install=yes
25202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025203 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025204sed 's/^/| /' conftest.$ac_ext >&5
25205
Martin v. Löwiseba40652007-08-30 20:10:57 +000025206 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025208
25209rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025210 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025211LIBS=$ac_check_lib_save_LIBS
25212fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025213{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25214echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25215if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025216
25217cat >>confdefs.h <<\_ACEOF
25218#define HAVE_RL_CALLBACK 1
25219_ACEOF
25220
25221fi
25222
25223
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025224# check for readline 2.2
25225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025226/* confdefs.h. */
25227_ACEOF
25228cat confdefs.h >>conftest.$ac_ext
25229cat >>conftest.$ac_ext <<_ACEOF
25230/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025231#include <readline/readline.h>
25232_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233if { (ac_try="$ac_cpp conftest.$ac_ext"
25234case "(($ac_try" in
25235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25236 *) ac_try_echo=$ac_try;;
25237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025240 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025241 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025242 rm -f conftest.er1
25243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245 (exit $ac_status); } >/dev/null && {
25246 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25247 test ! -s conftest.err
25248 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025249 have_readline=yes
25250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025252sed 's/^/| /' conftest.$ac_ext >&5
25253
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025254 have_readline=no
25255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025256
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025257rm -f conftest.err conftest.$ac_ext
25258if test $have_readline = yes
25259then
25260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025261/* confdefs.h. */
25262_ACEOF
25263cat confdefs.h >>conftest.$ac_ext
25264cat >>conftest.$ac_ext <<_ACEOF
25265/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025266#include <readline/readline.h>
25267
25268_ACEOF
25269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025270 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025271
25272cat >>confdefs.h <<\_ACEOF
25273#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25274_ACEOF
25275
25276fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025277rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025278
25279fi
25280
Martin v. Löwis0daad592001-09-30 21:09:59 +000025281# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025282{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25283echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025284if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025286else
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025288LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025290/* confdefs.h. */
25291_ACEOF
25292cat confdefs.h >>conftest.$ac_ext
25293cat >>conftest.$ac_ext <<_ACEOF
25294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025295
Martin v. Löwiseba40652007-08-30 20:10:57 +000025296/* Override any GCC internal prototype to avoid an error.
25297 Use char because int might match the return type of a GCC
25298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025299#ifdef __cplusplus
25300extern "C"
25301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025302char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025303int
25304main ()
25305{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025307 ;
25308 return 0;
25309}
25310_ACEOF
25311rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025312if { (ac_try="$ac_link"
25313case "(($ac_try" in
25314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25315 *) ac_try_echo=$ac_try;;
25316esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025318 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025320 grep -v '^ *+' conftest.er1 >conftest.err
25321 rm -f conftest.er1
25322 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025324 (exit $ac_status); } && {
25325 test -z "$ac_c_werror_flag" ||
25326 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025327 } && test -s conftest$ac_exeext &&
25328 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025329 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025332sed 's/^/| /' conftest.$ac_ext >&5
25333
Martin v. Löwiseba40652007-08-30 20:10:57 +000025334 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025336
25337rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025339LIBS=$ac_check_lib_save_LIBS
25340fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025341{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25342echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25343if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025344
Martin v. Löwis11437992002-04-12 09:54:03 +000025345cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025346#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025347_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025348
Martin v. Löwis0daad592001-09-30 21:09:59 +000025349fi
25350
Michael W. Hudson54241132001-12-07 15:38:26 +000025351
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025352# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025353{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25354echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025355if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025357else
25358 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025359LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025360cat >conftest.$ac_ext <<_ACEOF
25361/* confdefs.h. */
25362_ACEOF
25363cat confdefs.h >>conftest.$ac_ext
25364cat >>conftest.$ac_ext <<_ACEOF
25365/* end confdefs.h. */
25366
25367/* Override any GCC internal prototype to avoid an error.
25368 Use char because int might match the return type of a GCC
25369 builtin and then its argument prototype would still apply. */
25370#ifdef __cplusplus
25371extern "C"
25372#endif
25373char rl_completion_display_matches_hook ();
25374int
25375main ()
25376{
25377return rl_completion_display_matches_hook ();
25378 ;
25379 return 0;
25380}
25381_ACEOF
25382rm -f conftest.$ac_objext conftest$ac_exeext
25383if { (ac_try="$ac_link"
25384case "(($ac_try" in
25385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25386 *) ac_try_echo=$ac_try;;
25387esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025389 (eval "$ac_link") 2>conftest.er1
25390 ac_status=$?
25391 grep -v '^ *+' conftest.er1 >conftest.err
25392 rm -f conftest.er1
25393 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025395 (exit $ac_status); } && {
25396 test -z "$ac_c_werror_flag" ||
25397 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025398 } && test -s conftest$ac_exeext &&
25399 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025400 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025402 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025403sed 's/^/| /' conftest.$ac_ext >&5
25404
25405 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25406fi
25407
25408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25409 conftest$ac_exeext conftest.$ac_ext
25410LIBS=$ac_check_lib_save_LIBS
25411fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025412{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25413echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25414if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025415
25416cat >>confdefs.h <<\_ACEOF
25417#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25418_ACEOF
25419
25420fi
25421
25422
Martin v. Löwis0daad592001-09-30 21:09:59 +000025423# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025424{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25425echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025426if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025427 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025428else
Martin v. Löwis11437992002-04-12 09:54:03 +000025429 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025430LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025432/* confdefs.h. */
25433_ACEOF
25434cat confdefs.h >>conftest.$ac_ext
25435cat >>conftest.$ac_ext <<_ACEOF
25436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025437
Martin v. Löwiseba40652007-08-30 20:10:57 +000025438/* Override any GCC internal prototype to avoid an error.
25439 Use char because int might match the return type of a GCC
25440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025441#ifdef __cplusplus
25442extern "C"
25443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025444char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025445int
25446main ()
25447{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025448return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025449 ;
25450 return 0;
25451}
25452_ACEOF
25453rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025454if { (ac_try="$ac_link"
25455case "(($ac_try" in
25456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25457 *) ac_try_echo=$ac_try;;
25458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025460 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025462 grep -v '^ *+' conftest.er1 >conftest.err
25463 rm -f conftest.er1
25464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025466 (exit $ac_status); } && {
25467 test -z "$ac_c_werror_flag" ||
25468 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025469 } && test -s conftest$ac_exeext &&
25470 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025471 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025472else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025474sed 's/^/| /' conftest.$ac_ext >&5
25475
Martin v. Löwiseba40652007-08-30 20:10:57 +000025476 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025478
25479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025481LIBS=$ac_check_lib_save_LIBS
25482fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025483{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25484echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25485if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025486
Martin v. Löwis11437992002-04-12 09:54:03 +000025487cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025488#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025489_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025490
Guido van Rossum353ae582001-07-10 16:45:32 +000025491fi
25492
Jack Jansendd19cf82001-12-06 22:36:17 +000025493
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025494# also in readline 4.2
25495cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025496/* confdefs.h. */
25497_ACEOF
25498cat confdefs.h >>conftest.$ac_ext
25499cat >>conftest.$ac_ext <<_ACEOF
25500/* end confdefs.h. */
25501#include <readline/readline.h>
25502_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025503if { (ac_try="$ac_cpp conftest.$ac_ext"
25504case "(($ac_try" in
25505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25506 *) ac_try_echo=$ac_try;;
25507esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025510 ac_status=$?
25511 grep -v '^ *+' conftest.er1 >conftest.err
25512 rm -f conftest.er1
25513 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025515 (exit $ac_status); } >/dev/null && {
25516 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25517 test ! -s conftest.err
25518 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025519 have_readline=yes
25520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025521 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025522sed 's/^/| /' conftest.$ac_ext >&5
25523
25524 have_readline=no
25525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025526
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025527rm -f conftest.err conftest.$ac_ext
25528if test $have_readline = yes
25529then
25530 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025531/* confdefs.h. */
25532_ACEOF
25533cat confdefs.h >>conftest.$ac_ext
25534cat >>conftest.$ac_ext <<_ACEOF
25535/* end confdefs.h. */
25536#include <readline/readline.h>
25537
25538_ACEOF
25539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25540 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25541
25542cat >>confdefs.h <<\_ACEOF
25543#define HAVE_RL_CATCH_SIGNAL 1
25544_ACEOF
25545
25546fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025547rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548
25549fi
25550
Martin v. Löwis82bca632006-02-10 20:49:30 +000025551# End of readline checks: restore LIBS
25552LIBS=$LIBS_no_readline
25553
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025554{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25555echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025556if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025557 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025558else
Martin v. Löwis11437992002-04-12 09:54:03 +000025559
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025560if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025561 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025562else
Martin v. Löwis11437992002-04-12 09:54:03 +000025563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025564/* confdefs.h. */
25565_ACEOF
25566cat confdefs.h >>conftest.$ac_ext
25567cat >>conftest.$ac_ext <<_ACEOF
25568/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025569
25570int main()
25571{
25572 int val1 = nice(1);
25573 if (val1 != -1 && val1 == nice(2))
25574 exit(0);
25575 exit(1);
25576}
25577
Martin v. Löwis11437992002-04-12 09:54:03 +000025578_ACEOF
25579rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025580if { (ac_try="$ac_link"
25581case "(($ac_try" in
25582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25583 *) ac_try_echo=$ac_try;;
25584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025586 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025587 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025590 { (case "(($ac_try" in
25591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25592 *) ac_try_echo=$ac_try;;
25593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025595 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025596 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025598 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025599 ac_cv_broken_nice=yes
25600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025601 echo "$as_me: program exited with status $ac_status" >&5
25602echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025603sed 's/^/| /' conftest.$ac_ext >&5
25604
Martin v. Löwis11437992002-04-12 09:54:03 +000025605( exit $ac_status )
25606ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025608rm -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 +000025609fi
25610
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611
25612fi
25613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025614{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25615echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025616if test "$ac_cv_broken_nice" = yes
25617then
Martin v. Löwis11437992002-04-12 09:54:03 +000025618
25619cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025620#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025621_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025622
25623fi
25624
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025625{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25626echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025627if test "${ac_cv_broken_poll+set}" = set; then
25628 echo $ECHO_N "(cached) $ECHO_C" >&6
25629else
25630 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025631 ac_cv_broken_poll=no
25632else
25633 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025634/* confdefs.h. */
25635_ACEOF
25636cat confdefs.h >>conftest.$ac_ext
25637cat >>conftest.$ac_ext <<_ACEOF
25638/* end confdefs.h. */
25639
25640#include <poll.h>
25641
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025642int main()
25643{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025644 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025645 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025646
25647 close (42);
25648
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025649 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025650 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025651 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025652 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025653 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025654 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025655 return 1;
25656}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025657
25658_ACEOF
25659rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025660if { (ac_try="$ac_link"
25661case "(($ac_try" in
25662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25663 *) ac_try_echo=$ac_try;;
25664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025670 { (case "(($ac_try" in
25671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25672 *) ac_try_echo=$ac_try;;
25673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025675 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025676 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025678 (exit $ac_status); }; }; then
25679 ac_cv_broken_poll=yes
25680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025681 echo "$as_me: program exited with status $ac_status" >&5
25682echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025683sed 's/^/| /' conftest.$ac_ext >&5
25684
25685( exit $ac_status )
25686ac_cv_broken_poll=no
25687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025688rm -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 +000025689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025690
25691
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025692fi
25693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025694{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25695echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025696if test "$ac_cv_broken_poll" = yes
25697then
25698
25699cat >>confdefs.h <<\_ACEOF
25700#define HAVE_BROKEN_POLL 1
25701_ACEOF
25702
25703fi
25704
Brett Cannon43802422005-02-10 20:48:03 +000025705# 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 +000025706# (which is not required by ISO C or UNIX spec) and/or if we support
25707# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025708{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25709echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025710if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025711 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025712else
25713 cat >conftest.$ac_ext <<_ACEOF
25714/* confdefs.h. */
25715_ACEOF
25716cat confdefs.h >>conftest.$ac_ext
25717cat >>conftest.$ac_ext <<_ACEOF
25718/* end confdefs.h. */
25719#include <sys/types.h>
25720#include <$ac_cv_struct_tm>
25721
25722
25723int
25724main ()
25725{
25726static struct tm ac_aggr;
25727if (ac_aggr.tm_zone)
25728return 0;
25729 ;
25730 return 0;
25731}
25732_ACEOF
25733rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025734if { (ac_try="$ac_compile"
25735case "(($ac_try" in
25736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25737 *) ac_try_echo=$ac_try;;
25738esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025740 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025741 ac_status=$?
25742 grep -v '^ *+' conftest.er1 >conftest.err
25743 rm -f conftest.er1
25744 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746 (exit $ac_status); } && {
25747 test -z "$ac_c_werror_flag" ||
25748 test ! -s conftest.err
25749 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025750 ac_cv_member_struct_tm_tm_zone=yes
25751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025752 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025753sed 's/^/| /' conftest.$ac_ext >&5
25754
Martin v. Löwiseba40652007-08-30 20:10:57 +000025755 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025756/* confdefs.h. */
25757_ACEOF
25758cat confdefs.h >>conftest.$ac_ext
25759cat >>conftest.$ac_ext <<_ACEOF
25760/* end confdefs.h. */
25761#include <sys/types.h>
25762#include <$ac_cv_struct_tm>
25763
25764
25765int
25766main ()
25767{
25768static struct tm ac_aggr;
25769if (sizeof ac_aggr.tm_zone)
25770return 0;
25771 ;
25772 return 0;
25773}
25774_ACEOF
25775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776if { (ac_try="$ac_compile"
25777case "(($ac_try" in
25778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25779 *) ac_try_echo=$ac_try;;
25780esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025782 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025783 ac_status=$?
25784 grep -v '^ *+' conftest.er1 >conftest.err
25785 rm -f conftest.er1
25786 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788 (exit $ac_status); } && {
25789 test -z "$ac_c_werror_flag" ||
25790 test ! -s conftest.err
25791 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025792 ac_cv_member_struct_tm_tm_zone=yes
25793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025794 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025795sed 's/^/| /' conftest.$ac_ext >&5
25796
Martin v. Löwiseba40652007-08-30 20:10:57 +000025797 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025799
25800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802
25803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025804fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025805{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25806echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25807if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025808
25809cat >>confdefs.h <<_ACEOF
25810#define HAVE_STRUCT_TM_TM_ZONE 1
25811_ACEOF
25812
25813
25814fi
25815
25816if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25817
25818cat >>confdefs.h <<\_ACEOF
25819#define HAVE_TM_ZONE 1
25820_ACEOF
25821
25822else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025823 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25824echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025826 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827else
25828 cat >conftest.$ac_ext <<_ACEOF
25829/* confdefs.h. */
25830_ACEOF
25831cat confdefs.h >>conftest.$ac_ext
25832cat >>conftest.$ac_ext <<_ACEOF
25833/* end confdefs.h. */
25834#include <time.h>
25835
25836int
25837main ()
25838{
25839#ifndef tzname
25840 (void) tzname;
25841#endif
25842
25843 ;
25844 return 0;
25845}
25846_ACEOF
25847rm -f conftest.$ac_objext
25848if { (ac_try="$ac_compile"
25849case "(($ac_try" in
25850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25851 *) ac_try_echo=$ac_try;;
25852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025854 (eval "$ac_compile") 2>conftest.er1
25855 ac_status=$?
25856 grep -v '^ *+' conftest.er1 >conftest.err
25857 rm -f conftest.er1
25858 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025860 (exit $ac_status); } && {
25861 test -z "$ac_c_werror_flag" ||
25862 test ! -s conftest.err
25863 } && test -s conftest.$ac_objext; then
25864 ac_cv_have_decl_tzname=yes
25865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025866 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025867sed 's/^/| /' conftest.$ac_ext >&5
25868
25869 ac_cv_have_decl_tzname=no
25870fi
25871
25872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25873fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25875echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25876if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025877
25878cat >>confdefs.h <<_ACEOF
25879#define HAVE_DECL_TZNAME 1
25880_ACEOF
25881
25882
25883else
25884 cat >>confdefs.h <<_ACEOF
25885#define HAVE_DECL_TZNAME 0
25886_ACEOF
25887
25888
25889fi
25890
25891
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025892 { echo "$as_me:$LINENO: checking for tzname" >&5
25893echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025894if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025895 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025896else
25897 cat >conftest.$ac_ext <<_ACEOF
25898/* confdefs.h. */
25899_ACEOF
25900cat confdefs.h >>conftest.$ac_ext
25901cat >>conftest.$ac_ext <<_ACEOF
25902/* end confdefs.h. */
25903#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025904#if !HAVE_DECL_TZNAME
25905extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025906#endif
25907
25908int
25909main ()
25910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025911return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025912 ;
25913 return 0;
25914}
25915_ACEOF
25916rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917if { (ac_try="$ac_link"
25918case "(($ac_try" in
25919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920 *) ac_try_echo=$ac_try;;
25921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025923 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025924 ac_status=$?
25925 grep -v '^ *+' conftest.er1 >conftest.err
25926 rm -f conftest.er1
25927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025929 (exit $ac_status); } && {
25930 test -z "$ac_c_werror_flag" ||
25931 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025932 } && test -s conftest$ac_exeext &&
25933 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025934 ac_cv_var_tzname=yes
25935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025936 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025937sed 's/^/| /' conftest.$ac_ext >&5
25938
Martin v. Löwiseba40652007-08-30 20:10:57 +000025939 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025941
25942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025943 conftest$ac_exeext conftest.$ac_ext
25944fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025945{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25946echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025947 if test $ac_cv_var_tzname = yes; then
25948
25949cat >>confdefs.h <<\_ACEOF
25950#define HAVE_TZNAME 1
25951_ACEOF
25952
25953 fi
25954fi
25955
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025956
Martin v. Löwis1d459062005-03-14 21:23:33 +000025957# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025958{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25959echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025960if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025961 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025962else
25963
25964if test "$cross_compiling" = yes; then
25965 ac_cv_working_tzset=no
25966else
25967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025968/* confdefs.h. */
25969_ACEOF
25970cat confdefs.h >>conftest.$ac_ext
25971cat >>conftest.$ac_ext <<_ACEOF
25972/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025973
25974#include <stdlib.h>
25975#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025976#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025977
25978#if HAVE_TZNAME
25979extern char *tzname[];
25980#endif
25981
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025982int main()
25983{
Brett Cannon18367812003-09-19 00:59:16 +000025984 /* Note that we need to ensure that not only does tzset(3)
25985 do 'something' with localtime, but it works as documented
25986 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025987 This includes making sure that tzname is set properly if
25988 tm->tm_zone does not exist since it is the alternative way
25989 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025990
25991 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025992 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025993 */
25994
Martin v. Löwis1d459062005-03-14 21:23:33 +000025995 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025996 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25997
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025998 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025999 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026000 if (localtime(&groundhogday)->tm_hour != 0)
26001 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026002#if HAVE_TZNAME
26003 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26004 if (strcmp(tzname[0], "UTC") ||
26005 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26006 exit(1);
26007#endif
Brett Cannon18367812003-09-19 00:59:16 +000026008
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026009 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026010 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026011 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026012 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026013#if HAVE_TZNAME
26014 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26015 exit(1);
26016#endif
Brett Cannon18367812003-09-19 00:59:16 +000026017
26018 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26019 tzset();
26020 if (localtime(&groundhogday)->tm_hour != 11)
26021 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026022#if HAVE_TZNAME
26023 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26024 exit(1);
26025#endif
26026
26027#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026028 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26029 exit(1);
26030 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26031 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026032#endif
Brett Cannon18367812003-09-19 00:59:16 +000026033
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026034 exit(0);
26035}
26036
26037_ACEOF
26038rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026039if { (ac_try="$ac_link"
26040case "(($ac_try" in
26041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26042 *) ac_try_echo=$ac_try;;
26043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026045 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026046 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026048 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026049 { (case "(($ac_try" in
26050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26051 *) ac_try_echo=$ac_try;;
26052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026055 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026057 (exit $ac_status); }; }; then
26058 ac_cv_working_tzset=yes
26059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026060 echo "$as_me: program exited with status $ac_status" >&5
26061echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026062sed 's/^/| /' conftest.$ac_ext >&5
26063
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026064( exit $ac_status )
26065ac_cv_working_tzset=no
26066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067rm -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 +000026068fi
26069
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070
26071fi
26072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026073{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26074echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026075if test "$ac_cv_working_tzset" = yes
26076then
26077
26078cat >>confdefs.h <<\_ACEOF
26079#define HAVE_WORKING_TZSET 1
26080_ACEOF
26081
26082fi
26083
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026084# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026085{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26086echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026087if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026088 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026089else
26090 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026091/* confdefs.h. */
26092_ACEOF
26093cat confdefs.h >>conftest.$ac_ext
26094cat >>conftest.$ac_ext <<_ACEOF
26095/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026096#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026097int
26098main ()
26099{
26100
26101struct stat st;
26102st.st_mtim.tv_nsec = 1;
26103
26104 ;
26105 return 0;
26106}
26107_ACEOF
26108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026109if { (ac_try="$ac_compile"
26110case "(($ac_try" in
26111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26112 *) ac_try_echo=$ac_try;;
26113esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026117 grep -v '^ *+' conftest.er1 >conftest.err
26118 rm -f conftest.er1
26119 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026121 (exit $ac_status); } && {
26122 test -z "$ac_c_werror_flag" ||
26123 test ! -s conftest.err
26124 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026125 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026128sed 's/^/| /' conftest.$ac_ext >&5
26129
Martin v. Löwiseba40652007-08-30 20:10:57 +000026130 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026131fi
26132
Martin v. Löwiseba40652007-08-30 20:10:57 +000026133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26134fi
26135
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026136{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26137echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026138if test "$ac_cv_stat_tv_nsec" = yes
26139then
26140
26141cat >>confdefs.h <<\_ACEOF
26142#define HAVE_STAT_TV_NSEC 1
26143_ACEOF
26144
26145fi
26146
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026147# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026148{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26149echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026150if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026151 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026152else
26153 cat >conftest.$ac_ext <<_ACEOF
26154/* confdefs.h. */
26155_ACEOF
26156cat confdefs.h >>conftest.$ac_ext
26157cat >>conftest.$ac_ext <<_ACEOF
26158/* end confdefs.h. */
26159#include <sys/stat.h>
26160int
26161main ()
26162{
26163
26164struct stat st;
26165st.st_mtimespec.tv_nsec = 1;
26166
26167 ;
26168 return 0;
26169}
26170_ACEOF
26171rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026172if { (ac_try="$ac_compile"
26173case "(($ac_try" in
26174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26175 *) ac_try_echo=$ac_try;;
26176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026179 ac_status=$?
26180 grep -v '^ *+' conftest.er1 >conftest.err
26181 rm -f conftest.er1
26182 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026184 (exit $ac_status); } && {
26185 test -z "$ac_c_werror_flag" ||
26186 test ! -s conftest.err
26187 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026188 ac_cv_stat_tv_nsec2=yes
26189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026191sed 's/^/| /' conftest.$ac_ext >&5
26192
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026194fi
26195
Martin v. Löwiseba40652007-08-30 20:10:57 +000026196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26197fi
26198
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026199{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26200echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026201if test "$ac_cv_stat_tv_nsec2" = yes
26202then
26203
26204cat >>confdefs.h <<\_ACEOF
26205#define HAVE_STAT_TV_NSEC2 1
26206_ACEOF
26207
26208fi
26209
Jack Jansen666b1e72001-10-31 12:11:48 +000026210# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026211{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26212echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026213if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026214 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026215else
Martin v. Löwis11437992002-04-12 09:54:03 +000026216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026217/* confdefs.h. */
26218_ACEOF
26219cat confdefs.h >>conftest.$ac_ext
26220cat >>conftest.$ac_ext <<_ACEOF
26221/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026222#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026223int
26224main ()
26225{
Jack Jansen666b1e72001-10-31 12:11:48 +000026226
26227 int rtn;
26228 rtn = mvwdelch(0,0,0);
26229
Martin v. Löwis11437992002-04-12 09:54:03 +000026230 ;
26231 return 0;
26232}
26233_ACEOF
26234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026235if { (ac_try="$ac_compile"
26236case "(($ac_try" in
26237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26238 *) ac_try_echo=$ac_try;;
26239esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026243 grep -v '^ *+' conftest.er1 >conftest.err
26244 rm -f conftest.er1
26245 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026247 (exit $ac_status); } && {
26248 test -z "$ac_c_werror_flag" ||
26249 test ! -s conftest.err
26250 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026251 ac_cv_mvwdelch_is_expression=yes
26252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026254sed 's/^/| /' conftest.$ac_ext >&5
26255
Martin v. Löwiseba40652007-08-30 20:10:57 +000026256 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026257fi
26258
Martin v. Löwiseba40652007-08-30 20:10:57 +000026259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26260fi
26261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026262{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26263echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026264
26265if test "$ac_cv_mvwdelch_is_expression" = yes
26266then
Martin v. Löwis11437992002-04-12 09:54:03 +000026267
26268cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026269#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026270_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026271
26272fi
26273
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026274{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26275echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026276if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026278else
Martin v. Löwis11437992002-04-12 09:54:03 +000026279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026280/* confdefs.h. */
26281_ACEOF
26282cat confdefs.h >>conftest.$ac_ext
26283cat >>conftest.$ac_ext <<_ACEOF
26284/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026285#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026286int
26287main ()
26288{
Jack Jansen666b1e72001-10-31 12:11:48 +000026289
26290 WINDOW *w;
26291 w->_flags = 0;
26292
Martin v. Löwis11437992002-04-12 09:54:03 +000026293 ;
26294 return 0;
26295}
26296_ACEOF
26297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026298if { (ac_try="$ac_compile"
26299case "(($ac_try" in
26300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26301 *) ac_try_echo=$ac_try;;
26302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026306 grep -v '^ *+' conftest.er1 >conftest.err
26307 rm -f conftest.er1
26308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026310 (exit $ac_status); } && {
26311 test -z "$ac_c_werror_flag" ||
26312 test ! -s conftest.err
26313 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026314 ac_cv_window_has_flags=yes
26315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026317sed 's/^/| /' conftest.$ac_ext >&5
26318
Martin v. Löwiseba40652007-08-30 20:10:57 +000026319 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026320fi
26321
Martin v. Löwiseba40652007-08-30 20:10:57 +000026322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26323fi
26324
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026325{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26326echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026327
Jack Jansen666b1e72001-10-31 12:11:48 +000026328
26329if test "$ac_cv_window_has_flags" = yes
26330then
Martin v. Löwis11437992002-04-12 09:54:03 +000026331
26332cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026333#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026334_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026335
26336fi
26337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026338{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26339echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026340cat >conftest.$ac_ext <<_ACEOF
26341/* confdefs.h. */
26342_ACEOF
26343cat confdefs.h >>conftest.$ac_ext
26344cat >>conftest.$ac_ext <<_ACEOF
26345/* end confdefs.h. */
26346#include <curses.h>
26347int
26348main ()
26349{
26350void *x=is_term_resized
26351 ;
26352 return 0;
26353}
26354_ACEOF
26355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026356if { (ac_try="$ac_compile"
26357case "(($ac_try" in
26358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26359 *) ac_try_echo=$ac_try;;
26360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026362 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026363 ac_status=$?
26364 grep -v '^ *+' conftest.er1 >conftest.err
26365 rm -f conftest.er1
26366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026368 (exit $ac_status); } && {
26369 test -z "$ac_c_werror_flag" ||
26370 test ! -s conftest.err
26371 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026372
26373cat >>confdefs.h <<\_ACEOF
26374#define HAVE_CURSES_IS_TERM_RESIZED 1
26375_ACEOF
26376
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026377 { echo "$as_me:$LINENO: result: yes" >&5
26378echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026380 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026381sed 's/^/| /' conftest.$ac_ext >&5
26382
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026383 { echo "$as_me:$LINENO: result: no" >&5
26384echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026385
26386fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026387
Martin v. Löwiseba40652007-08-30 20:10:57 +000026388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26389
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026390{ echo "$as_me:$LINENO: checking for resize_term" >&5
26391echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026392cat >conftest.$ac_ext <<_ACEOF
26393/* confdefs.h. */
26394_ACEOF
26395cat confdefs.h >>conftest.$ac_ext
26396cat >>conftest.$ac_ext <<_ACEOF
26397/* end confdefs.h. */
26398#include <curses.h>
26399int
26400main ()
26401{
26402void *x=resize_term
26403 ;
26404 return 0;
26405}
26406_ACEOF
26407rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026408if { (ac_try="$ac_compile"
26409case "(($ac_try" in
26410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26411 *) ac_try_echo=$ac_try;;
26412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026414 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026415 ac_status=$?
26416 grep -v '^ *+' conftest.er1 >conftest.err
26417 rm -f conftest.er1
26418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026420 (exit $ac_status); } && {
26421 test -z "$ac_c_werror_flag" ||
26422 test ! -s conftest.err
26423 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026424
26425cat >>confdefs.h <<\_ACEOF
26426#define HAVE_CURSES_RESIZE_TERM 1
26427_ACEOF
26428
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026429 { echo "$as_me:$LINENO: result: yes" >&5
26430echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026431else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026432 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026433sed 's/^/| /' conftest.$ac_ext >&5
26434
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026435 { echo "$as_me:$LINENO: result: no" >&5
26436echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026437
26438fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026439
Martin v. Löwiseba40652007-08-30 20:10:57 +000026440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026442{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26443echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026444cat >conftest.$ac_ext <<_ACEOF
26445/* confdefs.h. */
26446_ACEOF
26447cat confdefs.h >>conftest.$ac_ext
26448cat >>conftest.$ac_ext <<_ACEOF
26449/* end confdefs.h. */
26450#include <curses.h>
26451int
26452main ()
26453{
26454void *x=resizeterm
26455 ;
26456 return 0;
26457}
26458_ACEOF
26459rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026460if { (ac_try="$ac_compile"
26461case "(($ac_try" in
26462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26463 *) ac_try_echo=$ac_try;;
26464esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026466 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026467 ac_status=$?
26468 grep -v '^ *+' conftest.er1 >conftest.err
26469 rm -f conftest.er1
26470 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026472 (exit $ac_status); } && {
26473 test -z "$ac_c_werror_flag" ||
26474 test ! -s conftest.err
26475 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026476
26477cat >>confdefs.h <<\_ACEOF
26478#define HAVE_CURSES_RESIZETERM 1
26479_ACEOF
26480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026481 { echo "$as_me:$LINENO: result: yes" >&5
26482echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026484 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026485sed 's/^/| /' conftest.$ac_ext >&5
26486
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026487 { echo "$as_me:$LINENO: result: no" >&5
26488echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026489
26490fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026491
Martin v. Löwiseba40652007-08-30 20:10:57 +000026492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026494{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26495echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026496
26497if test -r /dev/ptmx
26498then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026499 { echo "$as_me:$LINENO: result: yes" >&5
26500echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026501
26502cat >>confdefs.h <<\_ACEOF
26503#define HAVE_DEV_PTMX 1
26504_ACEOF
26505
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026507 { echo "$as_me:$LINENO: result: no" >&5
26508echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026509fi
26510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026511{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26512echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026513
26514if test -r /dev/ptc
26515then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026516 { echo "$as_me:$LINENO: result: yes" >&5
26517echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026518
26519cat >>confdefs.h <<\_ACEOF
26520#define HAVE_DEV_PTC 1
26521_ACEOF
26522
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026524 { echo "$as_me:$LINENO: result: no" >&5
26525echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026526fi
26527
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026528{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26529echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026530if test "${ac_cv_have_size_t_format+set}" = set; then
26531 echo $ECHO_N "(cached) $ECHO_C" >&6
26532else
26533 if test "$cross_compiling" = yes; then
26534 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026535else
26536 cat >conftest.$ac_ext <<_ACEOF
26537/* confdefs.h. */
26538_ACEOF
26539cat confdefs.h >>conftest.$ac_ext
26540cat >>conftest.$ac_ext <<_ACEOF
26541/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026542
Brett Cannon09d12362006-05-11 05:11:33 +000026543#include <stdio.h>
26544#include <stddef.h>
26545#include <string.h>
26546
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026547#ifdef HAVE_SYS_TYPES_H
26548#include <sys/types.h>
26549#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026550
26551#ifdef HAVE_SSIZE_T
26552typedef ssize_t Py_ssize_t;
26553#elif SIZEOF_VOID_P == SIZEOF_LONG
26554typedef long Py_ssize_t;
26555#else
26556typedef int Py_ssize_t;
26557#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026558
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026559int main()
26560{
26561 char buffer[256];
26562
Brett Cannon09d12362006-05-11 05:11:33 +000026563 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26564 return 1;
26565
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026566 if (strcmp(buffer, "123"))
26567 return 1;
26568
26569 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26570 return 1;
26571
26572 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026573 return 1;
26574
26575 return 0;
26576}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026577
Brett Cannon09d12362006-05-11 05:11:33 +000026578_ACEOF
26579rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026580if { (ac_try="$ac_link"
26581case "(($ac_try" in
26582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26583 *) ac_try_echo=$ac_try;;
26584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026586 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026587 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026590 { (case "(($ac_try" in
26591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26592 *) ac_try_echo=$ac_try;;
26593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026595 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026596 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026598 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026599 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026600else
26601 echo "$as_me: program exited with status $ac_status" >&5
26602echo "$as_me: failed program was:" >&5
26603sed 's/^/| /' conftest.$ac_ext >&5
26604
26605( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026606ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026607fi
26608rm -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 +000026609fi
26610
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026611
26612
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026613fi
26614
26615{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26616echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26617if test $ac_cv_have_size_t_format = yes
26618then
26619
26620cat >>confdefs.h <<\_ACEOF
26621#define PY_FORMAT_SIZE_T "z"
26622_ACEOF
26623
26624fi
26625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026626{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26627echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026628if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026629 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026630else
Martin v. Löwis11437992002-04-12 09:54:03 +000026631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026632/* confdefs.h. */
26633_ACEOF
26634cat confdefs.h >>conftest.$ac_ext
26635cat >>conftest.$ac_ext <<_ACEOF
26636/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026637
26638#ifdef HAVE_SYS_TYPES_H
26639#include <sys/types.h>
26640#endif
26641#ifdef HAVE_SYS_SOCKET_H
26642#include <sys/socket.h>
26643#endif
26644
26645
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026646typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026647int
26648main ()
26649{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026650if ((ac__type_new_ *) 0)
26651 return 0;
26652if (sizeof (ac__type_new_))
26653 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026654 ;
26655 return 0;
26656}
26657_ACEOF
26658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026659if { (ac_try="$ac_compile"
26660case "(($ac_try" in
26661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26662 *) ac_try_echo=$ac_try;;
26663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026667 grep -v '^ *+' conftest.er1 >conftest.err
26668 rm -f conftest.er1
26669 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026671 (exit $ac_status); } && {
26672 test -z "$ac_c_werror_flag" ||
26673 test ! -s conftest.err
26674 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026675 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026678sed 's/^/| /' conftest.$ac_ext >&5
26679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026680 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026682
26683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026684fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026685{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26686echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26687if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026688 :
26689else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026690
Martin v. Löwis01c04012002-11-11 14:58:44 +000026691cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026692#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026693_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026694
26695fi
26696
Michael W. Hudson54241132001-12-07 15:38:26 +000026697
Michael W. Hudson54241132001-12-07 15:38:26 +000026698
26699
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026700for h in `(cd $srcdir;echo Python/thread_*.h)`
26701do
26702 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26703done
26704
Michael W. Hudson54241132001-12-07 15:38:26 +000026705
Neal Norwitzd24499d2005-12-18 21:36:39 +000026706SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026707{ echo "$as_me:$LINENO: checking for build directories" >&5
26708echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026709for dir in $SRCDIRS; do
26710 if test ! -d $dir; then
26711 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026712 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026713done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026714{ echo "$as_me:$LINENO: result: done" >&5
26715echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026716
Guido van Rossum627b2d71993-12-24 10:39:16 +000026717# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026718ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026719
Martin v. Löwis11437992002-04-12 09:54:03 +000026720cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026721# This file is a shell script that caches the results of configure
26722# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026723# scripts and configure runs, see configure's option --config-cache.
26724# It is not useful on other systems. If it contains results you don't
26725# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026726#
Martin v. Löwis11437992002-04-12 09:54:03 +000026727# config.status only pays attention to the cache file if you give it
26728# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026729#
Skip Montanaro6dead952003-09-25 14:50:04 +000026730# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026731# loading this file, other *unset* `ac_cv_foo' will be assigned the
26732# following values.
26733
26734_ACEOF
26735
Guido van Rossumf78abae1997-01-21 22:02:36 +000026736# The following way of writing the cache mishandles newlines in values,
26737# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026738# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026739# Ultrix sh set writes to stderr and can't be redirected directly,
26740# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026741(
26742 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26743 eval ac_val=\$$ac_var
26744 case $ac_val in #(
26745 *${as_nl}*)
26746 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026747 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26748echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026749 esac
26750 case $ac_var in #(
26751 _ | IFS | as_nl) ;; #(
26752 *) $as_unset $ac_var ;;
26753 esac ;;
26754 esac
26755 done
26756
Martin v. Löwis11437992002-04-12 09:54:03 +000026757 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026758 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26759 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026760 # `set' does not quote correctly, so add quotes (double-quote
26761 # substitution turns \\\\ into \\, and sed turns \\ into \).
26762 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026763 "s/'/'\\\\''/g;
26764 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026765 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026766 *)
26767 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026768 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026769 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026770 esac |
26771 sort
26772) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026773 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026774 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026775 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026776 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026777 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26778 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026779 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26780 :end' >>confcache
26781if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26782 if test -w "$cache_file"; then
26783 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026784 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26785echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026786 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026787 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026788 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26789echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026790 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026791fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026792rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026793
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026794test "x$prefix" = xNONE && prefix=$ac_default_prefix
26795# Let make expand exec_prefix.
26796test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026798DEFS=-DHAVE_CONFIG_H
26799
Skip Montanaro6dead952003-09-25 14:50:04 +000026800ac_libobjs=
26801ac_ltlibobjs=
26802for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26803 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026804 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026805 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026806 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26807 # will be set to the directory where LIBOBJS objects are built.
26808 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26809 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026810done
26811LIBOBJS=$ac_libobjs
26812
26813LTLIBOBJS=$ac_ltlibobjs
26814
26815
Martin v. Löwis11437992002-04-12 09:54:03 +000026816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026817: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026818ac_clean_files_save=$ac_clean_files
26819ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026820{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26821echo "$as_me: creating $CONFIG_STATUS" >&6;}
26822cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026823#! $SHELL
26824# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026825# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026826# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026827# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026828
Martin v. Löwis11437992002-04-12 09:54:03 +000026829debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026830ac_cs_recheck=false
26831ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026832SHELL=\${CONFIG_SHELL-$SHELL}
26833_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026834
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026835cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026836## --------------------- ##
26837## M4sh Initialization. ##
26838## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026839
Martin v. Löwiseba40652007-08-30 20:10:57 +000026840# Be more Bourne compatible
26841DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026842if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26843 emulate sh
26844 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026845 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026846 # is contrary to our usage. Disable this feature.
26847 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026848 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026849else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026850 case `(set -o) 2>/dev/null` in
26851 *posix*) set -o posix ;;
26852esac
26853
Martin v. Löwis11437992002-04-12 09:54:03 +000026854fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026855
Skip Montanaro6dead952003-09-25 14:50:04 +000026856
Martin v. Löwis11437992002-04-12 09:54:03 +000026857
26858
Martin v. Löwiseba40652007-08-30 20:10:57 +000026859# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026860# Avoid depending upon Character Ranges.
26861as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26862as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26863as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26864as_cr_digits='0123456789'
26865as_cr_alnum=$as_cr_Letters$as_cr_digits
26866
26867# The user is always right.
26868if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026869 echo "#! /bin/sh" >conf$$.sh
26870 echo "exit 0" >>conf$$.sh
26871 chmod +x conf$$.sh
26872 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26873 PATH_SEPARATOR=';'
26874 else
26875 PATH_SEPARATOR=:
26876 fi
26877 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026878fi
26879
Martin v. Löwiseba40652007-08-30 20:10:57 +000026880# Support unset when possible.
26881if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26882 as_unset=unset
26883else
26884 as_unset=false
26885fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026886
Martin v. Löwiseba40652007-08-30 20:10:57 +000026887
26888# IFS
26889# We need space, tab and new line, in precisely that order. Quoting is
26890# there to prevent editors from complaining about space-tab.
26891# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26892# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026893as_nl='
26894'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026895IFS=" "" $as_nl"
26896
26897# Find who we are. Look in the path if we contain no directory separator.
26898case $0 in
26899 *[\\/]* ) as_myself=$0 ;;
26900 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026901for as_dir in $PATH
26902do
26903 IFS=$as_save_IFS
26904 test -z "$as_dir" && as_dir=.
26905 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26906done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026907IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026908
Martin v. Löwiseba40652007-08-30 20:10:57 +000026909 ;;
26910esac
26911# We did not find ourselves, most probably we were run as `sh COMMAND'
26912# in which case we are not to be found in the path.
26913if test "x$as_myself" = x; then
26914 as_myself=$0
26915fi
26916if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026917 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026918 { (exit 1); exit 1; }
26919fi
26920
26921# Work around bugs in pre-3.0 UWIN ksh.
26922for as_var in ENV MAIL MAILPATH
26923do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26924done
26925PS1='$ '
26926PS2='> '
26927PS4='+ '
26928
26929# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026930for as_var in \
26931 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26932 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26933 LC_TELEPHONE LC_TIME
26934do
26935 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26936 eval $as_var=C; export $as_var
26937 else
26938 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26939 fi
26940done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026941
26942# Required to use basename.
26943if expr a : '\(a\)' >/dev/null 2>&1 &&
26944 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26945 as_expr=expr
26946else
26947 as_expr=false
26948fi
26949
26950if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26951 as_basename=basename
26952else
26953 as_basename=false
26954fi
26955
26956
26957# Name of the executable.
26958as_me=`$as_basename -- "$0" ||
26959$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26960 X"$0" : 'X\(//\)$' \| \
26961 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026962echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026963 sed '/^.*\/\([^/][^/]*\)\/*$/{
26964 s//\1/
26965 q
26966 }
26967 /^X\/\(\/\/\)$/{
26968 s//\1/
26969 q
26970 }
26971 /^X\/\(\/\).*/{
26972 s//\1/
26973 q
26974 }
26975 s/.*/./; q'`
26976
26977# CDPATH.
26978$as_unset CDPATH
26979
26980
26981
Martin v. Löwis11437992002-04-12 09:54:03 +000026982 as_lineno_1=$LINENO
26983 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026984 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026985 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026986
Martin v. Löwis11437992002-04-12 09:54:03 +000026987 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26988 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026989 # line-number line after each line using $LINENO; the second 'sed'
26990 # does the real work. The second script uses 'N' to pair each
26991 # line-number line with the line containing $LINENO, and appends
26992 # trailing '-' during substitution so that $LINENO is not a special
26993 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026994 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026995 # scripts with optimization help from Paolo Bonzini. Blame Lee
26996 # E. McMahon (1931-1989) for sed's syntax. :-)
26997 sed -n '
26998 p
26999 /[$]LINENO/=
27000 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027001 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027002 s/[$]LINENO.*/&-/
27003 t lineno
27004 b
27005 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027006 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027007 :loop
27008 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027009 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027011 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027012 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027013 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027014 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027015
Martin v. Löwis11437992002-04-12 09:54:03 +000027016 # Don't try to exec as it changes $[0], causing all sort of problems
27017 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027018 # original and so on. Autoconf is especially sensitive to this).
27019 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027020 # Exit status is that of the last command.
27021 exit
27022}
27023
27024
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27026 as_dirname=dirname
27027else
27028 as_dirname=false
27029fi
27030
27031ECHO_C= ECHO_N= ECHO_T=
27032case `echo -n x` in
27033-n*)
27034 case `echo 'x\c'` in
27035 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27036 *) ECHO_C='\c';;
27037 esac;;
27038*)
27039 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027041
Martin v. Löwiseba40652007-08-30 20:10:57 +000027042if expr a : '\(a\)' >/dev/null 2>&1 &&
27043 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027044 as_expr=expr
27045else
27046 as_expr=false
27047fi
27048
27049rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027050if test -d conf$$.dir; then
27051 rm -f conf$$.dir/conf$$.file
27052else
27053 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027054 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027055fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027056echo >conf$$.file
27057if ln -s conf$$.file conf$$ 2>/dev/null; then
27058 as_ln_s='ln -s'
27059 # ... but there are two gotchas:
27060 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27061 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27062 # In both cases, we have to default to `cp -p'.
27063 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027064 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027065elif ln conf$$.file conf$$ 2>/dev/null; then
27066 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027067else
27068 as_ln_s='cp -p'
27069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027070rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27071rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027072
Skip Montanaro6dead952003-09-25 14:50:04 +000027073if mkdir -p . 2>/dev/null; then
27074 as_mkdir_p=:
27075else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027076 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027077 as_mkdir_p=false
27078fi
27079
Martin v. Löwiseba40652007-08-30 20:10:57 +000027080if test -x / >/dev/null 2>&1; then
27081 as_test_x='test -x'
27082else
27083 if ls -dL / >/dev/null 2>&1; then
27084 as_ls_L_option=L
27085 else
27086 as_ls_L_option=
27087 fi
27088 as_test_x='
27089 eval sh -c '\''
27090 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027091 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027092 else
27093 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027094 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095 esac;
27096 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27097 ???[sx]*):;;*)false;;esac;fi
27098 '\'' sh
27099 '
27100fi
27101as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027102
27103# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027104as_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 +000027105
27106# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027107as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027108
27109
Martin v. Löwis11437992002-04-12 09:54:03 +000027110exec 6>&1
27111
Martin v. Löwiseba40652007-08-30 20:10:57 +000027112# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027113# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027114# values after options handling.
27115ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027116This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027117generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027118
27119 CONFIG_FILES = $CONFIG_FILES
27120 CONFIG_HEADERS = $CONFIG_HEADERS
27121 CONFIG_LINKS = $CONFIG_LINKS
27122 CONFIG_COMMANDS = $CONFIG_COMMANDS
27123 $ $0 $@
27124
Martin v. Löwiseba40652007-08-30 20:10:57 +000027125on `(hostname || uname -n) 2>/dev/null | sed 1q`
27126"
27127
Martin v. Löwis11437992002-04-12 09:54:03 +000027128_ACEOF
27129
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027130cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027131# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027132config_files="$ac_config_files"
27133config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027134
Martin v. Löwiseba40652007-08-30 20:10:57 +000027135_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027136
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027137cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027138ac_cs_usage="\
27139\`$as_me' instantiates files from templates according to the
27140current configuration.
27141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027142Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027143
27144 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027146 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027147 -d, --debug don't remove temporary files
27148 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027149 --file=FILE[:TEMPLATE]
27150 instantiate the configuration file FILE
27151 --header=FILE[:TEMPLATE]
27152 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027153
27154Configuration files:
27155$config_files
27156
27157Configuration headers:
27158$config_headers
27159
27160Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027161
Martin v. Löwiseba40652007-08-30 20:10:57 +000027162_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027163cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027164ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027165python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027166configured by $0, generated by GNU Autoconf 2.61,
27167 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027168
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027169Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027170This config.status script is free software; the Free Software Foundation
27171gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027172
27173ac_pwd='$ac_pwd'
27174srcdir='$srcdir'
27175INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027176_ACEOF
27177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027178cat >>$CONFIG_STATUS <<\_ACEOF
27179# If no file are specified by the user, then we need to provide default
27180# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027181ac_need_defaults=:
27182while test $# != 0
27183do
27184 case $1 in
27185 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027186 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27187 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027188 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027189 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027190 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027191 ac_option=$1
27192 ac_optarg=$2
27193 ac_shift=shift
27194 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027195 esac
27196
Skip Montanaro6dead952003-09-25 14:50:04 +000027197 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027198 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027199 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27200 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027201 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027202 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027203 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027204 debug=: ;;
27205 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027206 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027207 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027208 ac_need_defaults=false;;
27209 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027210 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027211 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027212 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027213 --he | --h)
27214 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027215 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027216Try \`$0 --help' for more information." >&2
27217 { (exit 1); exit 1; }; };;
27218 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027219 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027220 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27221 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27222 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027223
27224 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027225 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027226Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027227 { (exit 1); exit 1; }; } ;;
27228
Martin v. Löwiseba40652007-08-30 20:10:57 +000027229 *) ac_config_targets="$ac_config_targets $1"
27230 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027231
27232 esac
27233 shift
27234done
27235
Skip Montanaro6dead952003-09-25 14:50:04 +000027236ac_configure_extra_args=
27237
27238if $ac_cs_silent; then
27239 exec 6>/dev/null
27240 ac_configure_extra_args="$ac_configure_extra_args --silent"
27241fi
27242
27243_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027244cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027245if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027246 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27247 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027248 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027249 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027250fi
27251
Martin v. Löwis11437992002-04-12 09:54:03 +000027252_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027253cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027254exec 5>>config.log
27255{
27256 echo
27257 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27258## Running $as_me. ##
27259_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027260 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027261} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027262
Martin v. Löwiseba40652007-08-30 20:10:57 +000027263_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027264cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027265_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027267cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027268
27269# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027270for ac_config_target in $ac_config_targets
27271do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027272 case $ac_config_target in
27273 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27274 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27275 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27276 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027277 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27278 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027279 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27280 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027281 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027283 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27284echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027285 { (exit 1); exit 1; }; };;
27286 esac
27287done
27288
Martin v. Löwiseba40652007-08-30 20:10:57 +000027289
Martin v. Löwis11437992002-04-12 09:54:03 +000027290# If the user did not use the arguments to specify the items to instantiate,
27291# then the envvar interface is used. Set only those that are not.
27292# We use the long form for the default assignment because of an extremely
27293# bizarre bug on SunOS 4.1.3.
27294if $ac_need_defaults; then
27295 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27296 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27297fi
27298
Skip Montanaro6dead952003-09-25 14:50:04 +000027299# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027300# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027301# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027302# Hook for its removal unless debugging.
27303# Note that there is a small window in which the directory will not be cleaned:
27304# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027305$debug ||
27306{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027307 tmp=
27308 trap 'exit_status=$?
27309 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27310' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027311 trap '{ (exit 1); exit 1; }' 1 2 13 15
27312}
Martin v. Löwis11437992002-04-12 09:54:03 +000027313# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027314
Martin v. Löwis11437992002-04-12 09:54:03 +000027315{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027316 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027317 test -n "$tmp" && test -d "$tmp"
27318} ||
27319{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027320 tmp=./conf$$-$RANDOM
27321 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027322} ||
27323{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027324 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027325 { (exit 1); exit 1; }
27326}
27327
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027328#
27329# Set up the sed scripts for CONFIG_FILES section.
27330#
27331
27332# No need to generate the scripts if there are no CONFIG_FILES.
27333# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027334if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027335
27336_ACEOF
27337
Martin v. Löwiseba40652007-08-30 20:10:57 +000027338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027339
Martin v. Löwiseba40652007-08-30 20:10:57 +000027340ac_delim='%!_!# '
27341for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027342 cat >conf$$subs.sed <<_ACEOF
27343SHELL!$SHELL$ac_delim
27344PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27345PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27346PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27347PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27348PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27349PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27350exec_prefix!$exec_prefix$ac_delim
27351prefix!$prefix$ac_delim
27352program_transform_name!$program_transform_name$ac_delim
27353bindir!$bindir$ac_delim
27354sbindir!$sbindir$ac_delim
27355libexecdir!$libexecdir$ac_delim
27356datarootdir!$datarootdir$ac_delim
27357datadir!$datadir$ac_delim
27358sysconfdir!$sysconfdir$ac_delim
27359sharedstatedir!$sharedstatedir$ac_delim
27360localstatedir!$localstatedir$ac_delim
27361includedir!$includedir$ac_delim
27362oldincludedir!$oldincludedir$ac_delim
27363docdir!$docdir$ac_delim
27364infodir!$infodir$ac_delim
27365htmldir!$htmldir$ac_delim
27366dvidir!$dvidir$ac_delim
27367pdfdir!$pdfdir$ac_delim
27368psdir!$psdir$ac_delim
27369libdir!$libdir$ac_delim
27370localedir!$localedir$ac_delim
27371mandir!$mandir$ac_delim
27372DEFS!$DEFS$ac_delim
27373ECHO_C!$ECHO_C$ac_delim
27374ECHO_N!$ECHO_N$ac_delim
27375ECHO_T!$ECHO_T$ac_delim
27376LIBS!$LIBS$ac_delim
27377build_alias!$build_alias$ac_delim
27378host_alias!$host_alias$ac_delim
27379target_alias!$target_alias$ac_delim
27380VERSION!$VERSION$ac_delim
27381SOVERSION!$SOVERSION$ac_delim
27382CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27383UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27384ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27385PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27386PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27387PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27388PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27389PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27390FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27391FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27392FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27393FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27394FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27395MACHDEP!$MACHDEP$ac_delim
27396SGI_ABI!$SGI_ABI$ac_delim
27397EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27398EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27399CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27400EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27401CC!$CC$ac_delim
27402CFLAGS!$CFLAGS$ac_delim
27403LDFLAGS!$LDFLAGS$ac_delim
27404CPPFLAGS!$CPPFLAGS$ac_delim
27405ac_ct_CC!$ac_ct_CC$ac_delim
27406EXEEXT!$EXEEXT$ac_delim
27407OBJEXT!$OBJEXT$ac_delim
27408CXX!$CXX$ac_delim
27409MAINCC!$MAINCC$ac_delim
27410CPP!$CPP$ac_delim
27411GREP!$GREP$ac_delim
27412EGREP!$EGREP$ac_delim
27413BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27414LIBRARY!$LIBRARY$ac_delim
27415LDLIBRARY!$LDLIBRARY$ac_delim
27416DLLLIBRARY!$DLLLIBRARY$ac_delim
27417BLDLIBRARY!$BLDLIBRARY$ac_delim
27418LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27419INSTSONAME!$INSTSONAME$ac_delim
27420RUNSHARED!$RUNSHARED$ac_delim
27421LINKCC!$LINKCC$ac_delim
27422GNULD!$GNULD$ac_delim
27423RANLIB!$RANLIB$ac_delim
27424AR!$AR$ac_delim
27425ARFLAGS!$ARFLAGS$ac_delim
27426SVNVERSION!$SVNVERSION$ac_delim
27427INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27428INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27429INSTALL_DATA!$INSTALL_DATA$ac_delim
27430LN!$LN$ac_delim
27431OPT!$OPT$ac_delim
27432BASECFLAGS!$BASECFLAGS$ac_delim
27433UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27434OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27435LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27436SO!$SO$ac_delim
27437LDSHARED!$LDSHARED$ac_delim
27438BLDSHARED!$BLDSHARED$ac_delim
27439CCSHARED!$CCSHARED$ac_delim
27440_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027442 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 +000027443 break
27444 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027445 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27446echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027447 { (exit 1); exit 1; }; }
27448 else
27449 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027450 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027451done
27452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027453ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27454if test -n "$ac_eof"; then
27455 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27456 ac_eof=`expr $ac_eof + 1`
27457fi
27458
27459cat >>$CONFIG_STATUS <<_ACEOF
27460cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27461/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027462_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463sed '
27464s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27465s/^/s,@/; s/!/@,|#_!!_#|/
27466:n
27467t n
27468s/'"$ac_delim"'$/,g/; t
27469s/$/\\/; p
27470N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27471' >>$CONFIG_STATUS <conf$$subs.sed
27472rm -f conf$$subs.sed
27473cat >>$CONFIG_STATUS <<_ACEOF
27474CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027475_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027476
27477
27478ac_delim='%!_!# '
27479for ac_last_try in false false false false false :; do
27480 cat >conf$$subs.sed <<_ACEOF
27481LINKFORSHARED!$LINKFORSHARED$ac_delim
27482CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27483SHLIBS!$SHLIBS$ac_delim
27484USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27485SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27486USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27487LDLAST!$LDLAST$ac_delim
27488THREADOBJ!$THREADOBJ$ac_delim
27489DLINCLDIR!$DLINCLDIR$ac_delim
27490DYNLOADFILE!$DYNLOADFILE$ac_delim
27491MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27492TRUE!$TRUE$ac_delim
27493LIBOBJS!$LIBOBJS$ac_delim
27494HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27495HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27496HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27497HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27498HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27499LIBM!$LIBM$ac_delim
27500LIBC!$LIBC$ac_delim
27501UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27502THREADHEADERS!$THREADHEADERS$ac_delim
27503SRCDIRS!$SRCDIRS$ac_delim
27504LTLIBOBJS!$LTLIBOBJS$ac_delim
27505_ACEOF
27506
27507 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27508 break
27509 elif $ac_last_try; then
27510 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27511echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027512 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027513 else
27514 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27515 fi
27516done
27517
27518ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27519if test -n "$ac_eof"; then
27520 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27521 ac_eof=`expr $ac_eof + 1`
27522fi
27523
27524cat >>$CONFIG_STATUS <<_ACEOF
27525cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27526/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027527_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027528sed '
27529s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27530s/^/s,@/; s/!/@,|#_!!_#|/
27531:n
27532t n
27533s/'"$ac_delim"'$/,g/; t
27534s/$/\\/; p
27535N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27536' >>$CONFIG_STATUS <conf$$subs.sed
27537rm -f conf$$subs.sed
27538cat >>$CONFIG_STATUS <<_ACEOF
27539:end
27540s/|#_!!_#|//g
27541CEOF$ac_eof
27542_ACEOF
27543
Martin v. Löwiseba40652007-08-30 20:10:57 +000027544
27545# VPATH may cause trouble with some makes, so we remove $(srcdir),
27546# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27547# trailing colons and then remove the whole line if VPATH becomes empty
27548# (actually we leave an empty line to preserve line numbers).
27549if test "x$srcdir" = x.; then
27550 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27551s/:*\$(srcdir):*/:/
27552s/:*\${srcdir}:*/:/
27553s/:*@srcdir@:*/:/
27554s/^\([^=]*=[ ]*\):*/\1/
27555s/:*$//
27556s/^[^=]*=[ ]*$//
27557}'
27558fi
27559
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027560cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027561fi # test -n "$CONFIG_FILES"
27562
Martin v. Löwiseba40652007-08-30 20:10:57 +000027563
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027564for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027565do
27566 case $ac_tag in
27567 :[FHLC]) ac_mode=$ac_tag; continue;;
27568 esac
27569 case $ac_mode$ac_tag in
27570 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027571 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27572echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027573 { (exit 1); exit 1; }; };;
27574 :[FH]-) ac_tag=-:-;;
27575 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27576 esac
27577 ac_save_IFS=$IFS
27578 IFS=:
27579 set x $ac_tag
27580 IFS=$ac_save_IFS
27581 shift
27582 ac_file=$1
27583 shift
27584
27585 case $ac_mode in
27586 :L) ac_source=$1;;
27587 :[FH])
27588 ac_file_inputs=
27589 for ac_f
27590 do
27591 case $ac_f in
27592 -) ac_f="$tmp/stdin";;
27593 *) # Look for the file first in the build tree, then in the source tree
27594 # (if the path is not absolute). The absolute path cannot be DOS-style,
27595 # because $ac_f cannot contain `:'.
27596 test -f "$ac_f" ||
27597 case $ac_f in
27598 [\\/$]*) false;;
27599 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27600 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027601 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27602echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027603 { (exit 1); exit 1; }; };;
27604 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027605 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027606 done
27607
27608 # Let's still pretend it is `configure' which instantiates (i.e., don't
27609 # use $as_me), people would be surprised to read:
27610 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027611 configure_input="Generated from "`IFS=:
27612 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027613 if test x"$ac_file" != x-; then
27614 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027615 { echo "$as_me:$LINENO: creating $ac_file" >&5
27616echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027617 fi
27618
27619 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027620 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027621 esac
27622 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027623 esac
27624
Martin v. Löwiseba40652007-08-30 20:10:57 +000027625 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027626$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027627 X"$ac_file" : 'X\(//\)[^/]' \| \
27628 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027629 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027630echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027631 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27632 s//\1/
27633 q
27634 }
27635 /^X\(\/\/\)[^/].*/{
27636 s//\1/
27637 q
27638 }
27639 /^X\(\/\/\)$/{
27640 s//\1/
27641 q
27642 }
27643 /^X\(\/\).*/{
27644 s//\1/
27645 q
27646 }
27647 s/.*/./; q'`
27648 { as_dir="$ac_dir"
27649 case $as_dir in #(
27650 -*) as_dir=./$as_dir;;
27651 esac
27652 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027653 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027654 while :; do
27655 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027656 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027657 *) as_qdir=$as_dir;;
27658 esac
27659 as_dirs="'$as_qdir' $as_dirs"
27660 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027661$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027662 X"$as_dir" : 'X\(//\)[^/]' \| \
27663 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027664 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027665echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027666 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27667 s//\1/
27668 q
27669 }
27670 /^X\(\/\/\)[^/].*/{
27671 s//\1/
27672 q
27673 }
27674 /^X\(\/\/\)$/{
27675 s//\1/
27676 q
27677 }
27678 /^X\(\/\).*/{
27679 s//\1/
27680 q
27681 }
27682 s/.*/./; q'`
27683 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027684 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027685 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027686 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27687echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027688 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027689 ac_builddir=.
27690
Martin v. Löwiseba40652007-08-30 20:10:57 +000027691case "$ac_dir" in
27692.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27693*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027694 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027695 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027696 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027697 case $ac_top_builddir_sub in
27698 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27699 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27700 esac ;;
27701esac
27702ac_abs_top_builddir=$ac_pwd
27703ac_abs_builddir=$ac_pwd$ac_dir_suffix
27704# for backward compatibility:
27705ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027706
27707case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027708 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027709 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027710 ac_top_srcdir=$ac_top_builddir_sub
27711 ac_abs_top_srcdir=$ac_pwd ;;
27712 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027713 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027714 ac_top_srcdir=$srcdir
27715 ac_abs_top_srcdir=$srcdir ;;
27716 *) # Relative name.
27717 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27718 ac_top_srcdir=$ac_top_build_prefix$srcdir
27719 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027720esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027721ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027722
Martin v. Löwis11437992002-04-12 09:54:03 +000027723
Martin v. Löwiseba40652007-08-30 20:10:57 +000027724 case $ac_mode in
27725 :F)
27726 #
27727 # CONFIG_FILE
27728 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027729
27730 case $INSTALL in
27731 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027732 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027733 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027734_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027736cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027737# If the template does not know about datarootdir, expand it.
27738# FIXME: This hack should be removed a few years after 2.60.
27739ac_datarootdir_hack=; ac_datarootdir_seen=
27740
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027741case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027742 p
27743 q
27744}
27745/@datadir@/p
27746/@docdir@/p
27747/@infodir@/p
27748/@localedir@/p
27749/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027750' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027751*datarootdir*) ac_datarootdir_seen=yes;;
27752*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027753 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27754echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027755_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027756cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027757 ac_datarootdir_hack='
27758 s&@datadir@&$datadir&g
27759 s&@docdir@&$docdir&g
27760 s&@infodir@&$infodir&g
27761 s&@localedir@&$localedir&g
27762 s&@mandir@&$mandir&g
27763 s&\\\${datarootdir}&$datarootdir&g' ;;
27764esac
27765_ACEOF
27766
27767# Neutralize VPATH when `$srcdir' = `.'.
27768# Shell code in configure.ac might set extrasub.
27769# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027770cat >>$CONFIG_STATUS <<_ACEOF
27771 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027772$extrasub
27773_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027774cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027775:t
27776/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027777s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027778s&@top_builddir@&$ac_top_builddir_sub&;t t
27779s&@srcdir@&$ac_srcdir&;t t
27780s&@abs_srcdir@&$ac_abs_srcdir&;t t
27781s&@top_srcdir@&$ac_top_srcdir&;t t
27782s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27783s&@builddir@&$ac_builddir&;t t
27784s&@abs_builddir@&$ac_abs_builddir&;t t
27785s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27786s&@INSTALL@&$ac_INSTALL&;t t
27787$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027788" $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 +000027789
Martin v. Löwiseba40652007-08-30 20:10:57 +000027790test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27791 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27792 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027793 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027794which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027795echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027796which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027797
Martin v. Löwiseba40652007-08-30 20:10:57 +000027798 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027799 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027800 -) cat "$tmp/out"; rm -f "$tmp/out";;
27801 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27802 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027803 ;;
27804 :H)
27805 #
27806 # CONFIG_HEADER
27807 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027808_ACEOF
27809
27810# Transform confdefs.h into a sed script `conftest.defines', that
27811# substitutes the proper values into config.h.in to produce config.h.
27812rm -f conftest.defines conftest.tail
27813# First, append a space to every undef/define line, to ease matching.
27814echo 's/$/ /' >conftest.defines
27815# Then, protect against being on the right side of a sed subst, or in
27816# an unquoted here document, in config.status. If some macros were
27817# called several times there might be several #defines for the same
27818# symbol, which is useless. But do not sort them, since the last
27819# AC_DEFINE must be honored.
27820ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27821# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27822# NAME is the cpp macro being defined, VALUE is the value it is being given.
27823# PARAMS is the parameter list in the macro definition--in most cases, it's
27824# just an empty string.
27825ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27826ac_dB='\\)[ (].*,\\1define\\2'
27827ac_dC=' '
27828ac_dD=' ,'
27829
27830uniq confdefs.h |
27831 sed -n '
27832 t rset
27833 :rset
27834 s/^[ ]*#[ ]*define[ ][ ]*//
27835 t ok
27836 d
27837 :ok
27838 s/[\\&,]/\\&/g
27839 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27840 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27841 ' >>conftest.defines
27842
27843# Remove the space that was appended to ease matching.
27844# Then replace #undef with comments. This is necessary, for
27845# example, in the case of _POSIX_SOURCE, which is predefined and required
27846# on some systems where configure will not decide to define it.
27847# (The regexp can be short, since the line contains either #define or #undef.)
27848echo 's/ $//
27849s,^[ #]*u.*,/* & */,' >>conftest.defines
27850
27851# Break up conftest.defines:
27852ac_max_sed_lines=50
27853
27854# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27855# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27856# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27857# et cetera.
27858ac_in='$ac_file_inputs'
27859ac_out='"$tmp/out1"'
27860ac_nxt='"$tmp/out2"'
27861
27862while :
27863do
27864 # Write a here document:
27865 cat >>$CONFIG_STATUS <<_ACEOF
27866 # First, check the format of the line:
27867 cat >"\$tmp/defines.sed" <<\\CEOF
27868/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27869/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27870b
27871:def
27872_ACEOF
27873 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27874 echo 'CEOF
27875 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27876 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27877 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27878 grep . conftest.tail >/dev/null || break
27879 rm -f conftest.defines
27880 mv conftest.tail conftest.defines
27881done
27882rm -f conftest.defines conftest.tail
27883
27884echo "ac_result=$ac_in" >>$CONFIG_STATUS
27885cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027886 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027887 echo "/* $configure_input */" >"$tmp/config.h"
27888 cat "$ac_result" >>"$tmp/config.h"
27889 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27890 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27891echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027892 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027893 rm -f $ac_file
27894 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027895 fi
27896 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027897 echo "/* $configure_input */"
27898 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027899 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027900 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027901 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027902
Martin v. Löwiseba40652007-08-30 20:10:57 +000027903
27904 esac
27905
27906done # for ac_tag
27907
Guido van Rossum627b2d71993-12-24 10:39:16 +000027908
Martin v. Löwis11437992002-04-12 09:54:03 +000027909{ (exit 0); exit 0; }
27910_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027911chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027912ac_clean_files=$ac_clean_files_save
27913
27914
27915# configure is writing to config.log, and then calls config.status.
27916# config.status does its own redirection, appending to config.log.
27917# Unfortunately, on DOS this fails, as config.log is still kept open
27918# by configure, so config.status won't be able to write to it; its
27919# output is simply discarded. So we exec the FD to /dev/null,
27920# effectively closing config.log, so it can be properly (re)opened and
27921# appended to by config.status. When coming back to configure, we
27922# need to make the FD available again.
27923if test "$no_create" != yes; then
27924 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027925 ac_config_status_args=
27926 test "$silent" = yes &&
27927 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027928 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027929 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027930 exec 5>>config.log
27931 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27932 # would make configure fail if this is the last instruction.
27933 $ac_cs_success || { (exit 1); exit 1; }
27934fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027935
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027936
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027937echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027938if test ! -f Modules/Setup
27939then
27940 cp $srcdir/Modules/Setup.dist Modules/Setup
27941fi
27942
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027943echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027944if test ! -f Modules/Setup.local
27945then
27946 echo "# Edit this file for local setup changes" >Modules/Setup.local
27947fi
27948
27949echo "creating Makefile"
27950$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27951 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027952 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027953
27954case $ac_sys_system in
27955BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027956 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027957
27958 Support for BeOS is deprecated as of Python 2.6.
27959 See PEP 11 for the gory details.
27960 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027961echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027962
27963 Support for BeOS is deprecated as of Python 2.6.
27964 See PEP 11 for the gory details.
27965 " >&2;}
27966 ;;
27967*) ;;
27968esac
27969
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027970mv config.c Modules