blob: 82f60bec2f0483eeafc12ec652b4626f1a187521 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002# From configure.in Revision: 74978 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001339 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914
1915
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001916UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001917{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1918echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001919
1920# Check whether --with-universal-archs was given.
1921if test "${with_universal_archs+set}" = set; then
1922 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001923 { echo "$as_me:$LINENO: result: $withval" >&5
1924echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001925 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001926 if test "${enable_universalsdk}" ; then
1927 :
1928 else
1929 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1930echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1931 { (exit 1); exit 1; }; }
1932 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001933
1934else
1935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001936 { echo "$as_me:$LINENO: result: 32-bit" >&5
1937echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001938
1939fi
1940
1941
1942
1943
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001944
1945# Check whether --with-framework-name was given.
1946if test "${with_framework_name+set}" = set; then
1947 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001948 if test "${enable_framework}"; then
1949 :
1950 else
1951 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1952echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1953 { (exit 1); exit 1; }; }
1954 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001955 PYTHONFRAMEWORK=${withval}
1956 PYTHONFRAMEWORKDIR=${withval}.framework
1957 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1958
1959else
1960
1961 PYTHONFRAMEWORK=Python
1962 PYTHONFRAMEWORKDIR=Python.framework
1963 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1964
1965fi
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001968if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001969 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001970 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001971 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001972 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001973 esac
1974 case $enableval in
1975 no)
1976 PYTHONFRAMEWORK=
1977 PYTHONFRAMEWORKDIR=no-framework
1978 PYTHONFRAMEWORKPREFIX=
1979 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001980 FRAMEWORKINSTALLFIRST=
1981 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001982 FRAMEWORKALTINSTALLFIRST=
1983 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001984 if test "x${prefix}" = "xNONE"; then
1985 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1986 else
1987 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1988 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001989 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001990 ;;
1991 *)
1992 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001994 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001995 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1996 if test "$UNIVERSAL_ARCHS" = "all"
1997 then
1998 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001999 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002000 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00002001 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002002 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2003 fi
2004
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002005 if test "x${prefix}" = "xNONE" ; then
2006 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2007 else
2008 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2009 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002011
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002012 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002013 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002014 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002015
Martin v. Löwiseba40652007-08-30 20:10:57 +00002016 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002017
Martin v. Löwiseba40652007-08-30 20:10:57 +00002018 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002019
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002020 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2021
2022 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2023
Jack Jansene578a632001-08-15 01:27:14 +00002024 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002025
Guido van Rossum563e7081996-09-10 18:20:48 +00002026else
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Jack Jansene578a632001-08-15 01:27:14 +00002028 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002029 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORKPREFIX=
2031 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002032 FRAMEWORKINSTALLFIRST=
2033 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002034 FRAMEWORKALTINSTALLFIRST=
2035 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002036 if test "x${prefix}" = "xNONE" ; then
2037 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2038 else
2039 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2040 fi
Jack Jansene578a632001-08-15 01:27:14 +00002041 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002042
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002043 if test "$UNIVERSAL_ARCHS" = "all"
2044 then
2045 FRAMEWORKINSTALLLAST=update4wayuniversal
2046 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2047 fi
2048
Martin v. Löwiseba40652007-08-30 20:10:57 +00002049fi
2050
Michael W. Hudson54241132001-12-07 15:38:26 +00002051
2052
2053
2054
Jack Jansene578a632001-08-15 01:27:14 +00002055
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002056
2057
Ronald Oussoren5b787322006-06-06 19:50:24 +00002058
2059
2060
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002061
Jack Jansene578a632001-08-15 01:27:14 +00002062##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002063## AC_HELP_STRING(--with-dyld,
2064## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002065##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002066# Set name for machine-dependent library files
2067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002068{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2069echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002070if test -z "$MACHDEP"
2071then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002073 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002074 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002075 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002076 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002077 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002079 ac_md_system=`echo $ac_sys_system |
2080 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2081 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002082 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002083 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002084
Guido van Rossum07397971997-04-29 21:49:50 +00002085 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002086 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002087 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002088 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002089 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002090 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002091 esac
2092fi
Guido van Rossum91922671997-10-09 20:24:13 +00002093
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002094# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2095# disable features if it is defined, without any means to access these
2096# features as extensions. For these systems, we skip the definition of
2097# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2098# some feature, make sure there is no alternative way to access this
2099# feature. Also, when using wildcards, make sure you have verified the
2100# need for not defining _XOPEN_SOURCE on all systems matching the
2101# wildcard, and that the wildcard does not include future systems
2102# (which may remove their limitations).
2103case $ac_sys_system/$ac_sys_release in
2104 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2105 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002106 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002107 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002108 define_xopen_source=no
2109 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2110 # also defined. This can be overridden by defining _BSD_SOURCE
2111 # As this has a different meaning on Linux, only define it on OpenBSD
2112
2113cat >>confdefs.h <<\_ACEOF
2114#define _BSD_SOURCE 1
2115_ACEOF
2116
2117 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002118 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2119 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2120 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002121 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002122 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002123 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2124 # of union __?sigval. Reported by Stuart Bishop.
2125 SunOS/5.6)
2126 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002127 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2128 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002129 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002130 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002131 define_xopen_source=no;;
2132 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002133 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002134 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002135 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002136 # On FreeBSD 4, the math functions C89 does not cover are never defined
2137 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2138 FreeBSD/4.*)
2139 define_xopen_source=no;;
2140 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2141 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2142 # identifies itself as Darwin/7.*
2143 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2144 # disables platform specific features beyond repair.
2145 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2146 # has no effect, don't bother defining them
2147 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002148 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002149 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2150 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2151 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002152 AIX/4)
2153 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002154 AIX/5)
2155 if test `uname -r` -eq 1; then
2156 define_xopen_source=no
2157 fi
2158 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002159 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2160 # defining NI_NUMERICHOST.
2161 QNX/6.3.2)
2162 define_xopen_source=no
2163 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002164
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002165esac
2166
2167if test $define_xopen_source = yes
2168then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2170 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002171 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2172 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002173 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002174 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002175
2176cat >>confdefs.h <<\_ACEOF
2177#define _XOPEN_SOURCE 500
2178_ACEOF
2179
2180 ;;
2181 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
2183cat >>confdefs.h <<\_ACEOF
2184#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002185_ACEOF
2186
Skip Montanarof0d5f792004-08-15 14:08:23 +00002187 ;;
2188 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189
2190 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2191 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2192 # several APIs are not declared. Since this is also needed in some
2193 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002194 # except for Solaris 10, where it must not be defined,
2195 # as it implies XPG4.2
2196 case $ac_sys_system/$ac_sys_release in
2197 SunOS/5.10)
2198 ;;
2199 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002200
2201cat >>confdefs.h <<\_ACEOF
2202#define _XOPEN_SOURCE_EXTENDED 1
2203_ACEOF
2204
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 ;;
2206 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002207
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002208
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002209cat >>confdefs.h <<\_ACEOF
2210#define _POSIX_C_SOURCE 200112L
2211_ACEOF
2212
2213
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002214fi
2215
Guido van Rossum91922671997-10-09 20:24:13 +00002216#
2217# SGI compilers allow the specification of the both the ABI and the
2218# ISA on the command line. Depending on the values of these switches,
2219# different and often incompatable code will be generated.
2220#
2221# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2222# thus supply support for various ABI/ISA combinations. The MACHDEP
2223# variable is also adjusted.
2224#
2225
2226if test ! -z "$SGI_ABI"
2227then
2228 CC="cc $SGI_ABI"
2229 LDFLAGS="$SGI_ABI $LDFLAGS"
2230 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2231fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002232{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2233echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002234
Jack Jansen83f898c2002-12-30 22:23:40 +00002235# And add extra plat-mac for darwin
2236
Jack Jansen7b59b422003-03-17 15:44:10 +00002237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002238{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2239echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002240if test -z "$EXTRAPLATDIR"
2241then
2242 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002243 darwin)
2244 EXTRAPLATDIR="\$(PLATMACDIRS)"
2245 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2246 ;;
2247 *)
2248 EXTRAPLATDIR=""
2249 EXTRAMACHDEPPATH=""
2250 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002251 esac
2252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002253{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2254echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002255
Jack Jansen6b08a402004-06-03 12:41:45 +00002256# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2257# it may influence the way we can build extensions, so distutils
2258# needs to check it
2259
Ronald Oussoren988117f2006-04-29 11:31:35 +00002260
Jack Jansen6b08a402004-06-03 12:41:45 +00002261CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002262EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002263
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002264{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2265echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002266ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2268echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002269
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002271
2272# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2273# for debug/optimization stuff. BASECFLAGS is for flags that are required
2274# just to get things to compile and link. Users are free to override OPT
2275# when running configure or make. The build should not break if they do.
2276# BASECFLAGS should generally not be messed with, however.
2277
2278# XXX shouldn't some/most/all of this code be merged with the stuff later
2279# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002280{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2281echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Martin v. Löwiseba40652007-08-30 20:10:57 +00002283# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002284if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002285 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002286 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002287 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002288 without_gcc=yes;;
2289 yes) CC=gcc
2290 without_gcc=no;;
2291 *) CC=$withval
2292 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002293 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002296 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002297 AIX*) CC=cc_r
2298 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002300 case $BE_HOST_CPU in
2301 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002302 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002303 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002304 BASECFLAGS="$BASECFLAGS -export pragma"
2305 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002306 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002307 ;;
2308 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002309 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002310 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002311 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002312 ;;
2313 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002314 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2315echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002316 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002317 ;;
2318 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002319 AR="\$(srcdir)/Modules/ar_beos"
2320 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002321 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002322 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002323 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002324fi
2325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002326{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2327echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002328
Guido van Rossum8b131c51995-03-09 14:10:13 +00002329# If the user switches compilers, we can't believe the cache
2330if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2331then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002332 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002333(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002334echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002335(it is also a good idea to do 'make clean' before compiling)" >&2;}
2336 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002337fi
2338
Martin v. Löwis11437992002-04-12 09:54:03 +00002339ac_ext=c
2340ac_cpp='$CPP $CPPFLAGS'
2341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2343ac_compiler_gnu=$ac_cv_c_compiler_gnu
2344if test -n "$ac_tool_prefix"; then
2345 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2346set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002347{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002349if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002350 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002351else
2352 if test -n "$CC"; then
2353 ac_cv_prog_CC="$CC" # Let the user override the test.
2354else
Martin v. Löwis11437992002-04-12 09:54:03 +00002355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2356for as_dir in $PATH
2357do
2358 IFS=$as_save_IFS
2359 test -z "$as_dir" && as_dir=.
2360 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002362 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 break 2
2365 fi
2366done
2367done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002368IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002369
Jack Jansendd19cf82001-12-06 22:36:17 +00002370fi
2371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002372CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002373if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002374 { echo "$as_me:$LINENO: result: $CC" >&5
2375echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377 { echo "$as_me:$LINENO: result: no" >&5
2378echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379fi
2380
Martin v. Löwiseba40652007-08-30 20:10:57 +00002381
Martin v. Löwis11437992002-04-12 09:54:03 +00002382fi
2383if test -z "$ac_cv_prog_CC"; then
2384 ac_ct_CC=$CC
2385 # Extract the first word of "gcc", so it can be a program name with args.
2386set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002387{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2388echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002389if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002391else
2392 if test -n "$ac_ct_CC"; then
2393 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2394else
2395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2396for as_dir in $PATH
2397do
2398 IFS=$as_save_IFS
2399 test -z "$as_dir" && as_dir=.
2400 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002402 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 break 2
2405 fi
2406done
2407done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002408IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002409
2410fi
2411fi
2412ac_ct_CC=$ac_cv_prog_ac_ct_CC
2413if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002414 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2415echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002417 { echo "$as_me:$LINENO: result: no" >&5
2418echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002419fi
2420
Martin v. Löwiseba40652007-08-30 20:10:57 +00002421 if test "x$ac_ct_CC" = x; then
2422 CC=""
2423 else
2424 case $cross_compiling:$ac_tool_warned in
2425yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002426{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2427whose name does not start with the host triplet. If you think this
2428configuration is useful to you, please write to autoconf@gnu.org." >&5
2429echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2430whose name does not start with the host triplet. If you think this
2431configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432ac_tool_warned=yes ;;
2433esac
2434 CC=$ac_ct_CC
2435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002436else
2437 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002438fi
2439
Jack Jansendd19cf82001-12-06 22:36:17 +00002440if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441 if test -n "$ac_tool_prefix"; then
2442 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002443set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002444{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2445echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002446if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002447 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002448else
2449 if test -n "$CC"; then
2450 ac_cv_prog_CC="$CC" # Let the user override the test.
2451else
Martin v. Löwis11437992002-04-12 09:54:03 +00002452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2453for as_dir in $PATH
2454do
2455 IFS=$as_save_IFS
2456 test -z "$as_dir" && as_dir=.
2457 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002460 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 break 2
2462 fi
2463done
2464done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467fi
2468fi
2469CC=$ac_cv_prog_CC
2470if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002471 { echo "$as_me:$LINENO: result: $CC" >&5
2472echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474 { echo "$as_me:$LINENO: result: no" >&5
2475echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002480fi
2481if test -z "$CC"; then
2482 # Extract the first word of "cc", so it can be a program name with args.
2483set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002488else
2489 if test -n "$CC"; then
2490 ac_cv_prog_CC="$CC" # Let the user override the test.
2491else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002492 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
2498 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2501 ac_prog_rejected=yes
2502 continue
2503 fi
2504 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002505 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 break 2
2507 fi
2508done
2509done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002511
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512if test $ac_prog_rejected = yes; then
2513 # We found a bogon in the path, so make sure we never use it.
2514 set dummy $ac_cv_prog_CC
2515 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517 # We chose a different compiler from the bogus one.
2518 # However, it has the same basename, so the bogon will be chosen
2519 # first if we set CC to just the basename; use the full file name.
2520 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002522 fi
2523fi
2524fi
2525fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002526CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002527if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002528 { echo "$as_me:$LINENO: result: $CC" >&5
2529echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002530else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002531 { echo "$as_me:$LINENO: result: no" >&5
2532echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002533fi
2534
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536fi
2537if test -z "$CC"; then
2538 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 do
2541 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002543{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2544echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002546 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Martin v. Löwis11437992002-04-12 09:54:03 +00002551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2552for as_dir in $PATH
2553do
2554 IFS=$as_save_IFS
2555 test -z "$as_dir" && as_dir=.
2556 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002557 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002560 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002562done
2563done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002565
2566fi
2567fi
2568CC=$ac_cv_prog_CC
2569if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002570 { echo "$as_me:$LINENO: result: $CC" >&5
2571echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002572else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002573 { echo "$as_me:$LINENO: result: no" >&5
2574echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002575fi
2576
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 test -n "$CC" && break
2579 done
2580fi
2581if test -z "$CC"; then
2582 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002584do
2585 # Extract the first word of "$ac_prog", so it can be a program name with args.
2586set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002587{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2588echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002589if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002591else
2592 if test -n "$ac_ct_CC"; then
2593 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2594else
2595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2596for as_dir in $PATH
2597do
2598 IFS=$as_save_IFS
2599 test -z "$as_dir" && as_dir=.
2600 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002603 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 break 2
2605 fi
2606done
2607done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611fi
2612ac_ct_CC=$ac_cv_prog_ac_ct_CC
2613if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002614 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2615echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617 { echo "$as_me:$LINENO: result: no" >&5
2618echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
Martin v. Löwiseba40652007-08-30 20:10:57 +00002621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 test -n "$ac_ct_CC" && break
2623done
Michael W. Hudson54241132001-12-07 15:38:26 +00002624
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625 if test "x$ac_ct_CC" = x; then
2626 CC=""
2627 else
2628 case $cross_compiling:$ac_tool_warned in
2629yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002630{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2631whose name does not start with the host triplet. If you think this
2632configuration is useful to you, please write to autoconf@gnu.org." >&5
2633echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2634whose name does not start with the host triplet. If you think this
2635configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636ac_tool_warned=yes ;;
2637esac
2638 CC=$ac_ct_CC
2639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002640fi
2641
2642fi
2643
2644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002646See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002648See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
2651# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002652echo "$as_me:$LINENO: checking for C compiler version" >&5
2653ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler --version >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -v >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002674{ (ac_try="$ac_compiler -V >&5"
2675case "(($ac_try" in
2676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677 *) ac_try_echo=$ac_try;;
2678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002680 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 (exit $ac_status); }
2684
2685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002686/* confdefs.h. */
2687_ACEOF
2688cat confdefs.h >>conftest.$ac_ext
2689cat >>conftest.$ac_ext <<_ACEOF
2690/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692int
2693main ()
2694{
2695
2696 ;
2697 return 0;
2698}
2699_ACEOF
2700ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002701ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702# Try to create an executable without -o first, disregard a.out.
2703# It will help us diagnose broken compilers, and finding out an intuition
2704# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002705{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2706echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2707ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2708#
2709# List of possible output files, starting from the most likely.
2710# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2711# only as a last resort. b.out is created by i960 compilers.
2712ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2713#
2714# The IRIX 6 linker writes into existing files which may not be
2715# executable, retaining their permissions. Remove them first so a
2716# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717ac_rmfiles=
2718for ac_file in $ac_files
2719do
2720 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2723 esac
2724done
2725rm -f $ac_rmfiles
2726
2727if { (ac_try="$ac_link_default"
2728case "(($ac_try" in
2729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2730 *) ac_try_echo=$ac_try;;
2731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2738# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2739# in a Makefile. We should not override ac_cv_exeext if it was cached,
2740# so that the user can short-circuit this test for compilers unknown to
2741# Autoconf.
2742for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002743do
2744 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002746 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002747 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002748 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749 # We found the default executable, but exeext='' is most
2750 # certainly right.
2751 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002752 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2754 then :; else
2755 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2756 fi
2757 # We set ac_cv_exeext here because the later test for it is not
2758 # safe: cross compilers may not add the suffix if given an `-o'
2759 # argument, so we may need to know it at that point already.
2760 # Even if this section looks crufty: it has the advantage of
2761 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002763 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002764 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767test "$ac_cv_exeext" = no && ac_cv_exeext=
2768
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002769else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 ac_file=''
2771fi
2772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773{ echo "$as_me:$LINENO: result: $ac_file" >&5
2774echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002775if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002777sed 's/^/| /' conftest.$ac_ext >&5
2778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002780See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002781echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002782See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002783 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002784fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002785
Martin v. Löwis11437992002-04-12 09:54:03 +00002786ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002789# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2791echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002792# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2793# If not cross compiling, check that we can run a simple program.
2794if test "$cross_compiling" != yes; then
2795 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 { (case "(($ac_try" in
2797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2798 *) ac_try_echo=$ac_try;;
2799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002804 (exit $ac_status); }; }; then
2805 cross_compiling=no
2806 else
2807 if test "$cross_compiling" = maybe; then
2808 cross_compiling=yes
2809 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002811If you meant to cross compile, use \`--host'.
2812See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002814If you meant to cross compile, use \`--host'.
2815See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002816 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 fi
2818 fi
2819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002820{ echo "$as_me:$LINENO: result: yes" >&5
2821echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002822
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002823rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002824ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002825# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002826# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002827{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2828echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2829{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2830echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2833echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002834if { (ac_try="$ac_link"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002840 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 (exit $ac_status); }; then
2844 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2845# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2846# work properly (i.e., refer to `conftest.exe'), while it won't with
2847# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002848for ac_file in conftest.exe conftest conftest.*; do
2849 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002852 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002853 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 * ) break;;
2855 esac
2856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002860echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002861See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002863fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002864
Martin v. Löwis11437992002-04-12 09:54:03 +00002865rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002866{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2867echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
2869rm -f conftest.$ac_ext
2870EXEEXT=$ac_cv_exeext
2871ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002872{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2873echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002874if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002875 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002876else
Martin v. Löwis11437992002-04-12 09:54:03 +00002877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002878/* confdefs.h. */
2879_ACEOF
2880cat confdefs.h >>conftest.$ac_ext
2881cat >>conftest.$ac_ext <<_ACEOF
2882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Martin v. Löwis11437992002-04-12 09:54:03 +00002884int
2885main ()
2886{
2887
2888 ;
2889 return 0;
2890}
2891_ACEOF
2892rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893if { (ac_try="$ac_compile"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002903 for ac_file in conftest.o conftest.obj conftest.*; do
2904 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002907 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2908 break;;
2909 esac
2910done
2911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002912 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002913sed 's/^/| /' conftest.$ac_ext >&5
2914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002915{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002916See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002917echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002918See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002919 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920fi
2921
2922rm -f conftest.$ac_cv_objext conftest.$ac_ext
2923fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002924{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2925echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002926OBJEXT=$ac_cv_objext
2927ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002928{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2929echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002930if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002932else
2933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002934/* confdefs.h. */
2935_ACEOF
2936cat confdefs.h >>conftest.$ac_ext
2937cat >>conftest.$ac_ext <<_ACEOF
2938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Martin v. Löwis11437992002-04-12 09:54:03 +00002940int
2941main ()
2942{
2943#ifndef __GNUC__
2944 choke me
2945#endif
2946
2947 ;
2948 return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002952if { (ac_try="$ac_compile"
2953case "(($ac_try" in
2954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2955 *) ac_try_echo=$ac_try;;
2956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002960 grep -v '^ *+' conftest.er1 >conftest.err
2961 rm -f conftest.er1
2962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002964 (exit $ac_status); } && {
2965 test -z "$ac_c_werror_flag" ||
2966 test ! -s conftest.err
2967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 ac_compiler_gnu=yes
2969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002971sed 's/^/| /' conftest.$ac_ext >&5
2972
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975
2976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002977ac_cv_c_compiler_gnu=$ac_compiler_gnu
2978
2979fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2981echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2982GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002983ac_test_CFLAGS=${CFLAGS+set}
2984ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002985{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2986echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002987if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002988 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002989else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002990 ac_save_c_werror_flag=$ac_c_werror_flag
2991 ac_c_werror_flag=yes
2992 ac_cv_prog_cc_g=no
2993 CFLAGS="-g"
2994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002995/* confdefs.h. */
2996_ACEOF
2997cat confdefs.h >>conftest.$ac_ext
2998cat >>conftest.$ac_ext <<_ACEOF
2999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003000
Martin v. Löwis11437992002-04-12 09:54:03 +00003001int
3002main ()
3003{
3004
3005 ;
3006 return 0;
3007}
3008_ACEOF
3009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010if { (ac_try="$ac_compile"
3011case "(($ac_try" in
3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3013 *) ac_try_echo=$ac_try;;
3014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003018 grep -v '^ *+' conftest.er1 >conftest.err
3019 rm -f conftest.er1
3020 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022 (exit $ac_status); } && {
3023 test -z "$ac_c_werror_flag" ||
3024 test ! -s conftest.err
3025 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003026 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003029sed 's/^/| /' conftest.$ac_ext >&5
3030
Martin v. Löwiseba40652007-08-30 20:10:57 +00003031 CFLAGS=""
3032 cat >conftest.$ac_ext <<_ACEOF
3033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
3038
3039int
3040main ()
3041{
3042
3043 ;
3044 return 0;
3045}
3046_ACEOF
3047rm -f conftest.$ac_objext
3048if { (ac_try="$ac_compile"
3049case "(($ac_try" in
3050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3051 *) ac_try_echo=$ac_try;;
3052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003054 (eval "$ac_compile") 2>conftest.er1
3055 ac_status=$?
3056 grep -v '^ *+' conftest.er1 >conftest.err
3057 rm -f conftest.er1
3058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003060 (exit $ac_status); } && {
3061 test -z "$ac_c_werror_flag" ||
3062 test ! -s conftest.err
3063 } && test -s conftest.$ac_objext; then
3064 :
3065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003066 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067sed 's/^/| /' conftest.$ac_ext >&5
3068
3069 ac_c_werror_flag=$ac_save_c_werror_flag
3070 CFLAGS="-g"
3071 cat >conftest.$ac_ext <<_ACEOF
3072/* confdefs.h. */
3073_ACEOF
3074cat confdefs.h >>conftest.$ac_ext
3075cat >>conftest.$ac_ext <<_ACEOF
3076/* end confdefs.h. */
3077
3078int
3079main ()
3080{
3081
3082 ;
3083 return 0;
3084}
3085_ACEOF
3086rm -f conftest.$ac_objext
3087if { (ac_try="$ac_compile"
3088case "(($ac_try" in
3089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3090 *) ac_try_echo=$ac_try;;
3091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003093 (eval "$ac_compile") 2>conftest.er1
3094 ac_status=$?
3095 grep -v '^ *+' conftest.er1 >conftest.err
3096 rm -f conftest.er1
3097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099 (exit $ac_status); } && {
3100 test -z "$ac_c_werror_flag" ||
3101 test ! -s conftest.err
3102 } && test -s conftest.$ac_objext; then
3103 ac_cv_prog_cc_g=yes
3104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003105 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106sed 's/^/| /' conftest.$ac_ext >&5
3107
3108
Guido van Rossum627b2d71993-12-24 10:39:16 +00003109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003110
3111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113
3114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3115fi
3116
3117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3118 ac_c_werror_flag=$ac_save_c_werror_flag
3119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003120{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3121echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003124elif test $ac_cv_prog_cc_g = yes; then
3125 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126 CFLAGS="-g -O2"
3127 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003128 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003129 fi
3130else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003131 if test "$GCC" = yes; then
3132 CFLAGS="-O2"
3133 else
3134 CFLAGS=
3135 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003137{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3138echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003139if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003140 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003141else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003142 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003143ac_save_CC=$CC
3144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003145/* confdefs.h. */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h. */
3150#include <stdarg.h>
3151#include <stdio.h>
3152#include <sys/types.h>
3153#include <sys/stat.h>
3154/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3155struct buf { int x; };
3156FILE * (*rcsopen) (struct buf *, struct stat *, int);
3157static char *e (p, i)
3158 char **p;
3159 int i;
3160{
3161 return p[i];
3162}
3163static char *f (char * (*g) (char **, int), char **p, ...)
3164{
3165 char *s;
3166 va_list v;
3167 va_start (v,p);
3168 s = g (p, va_arg (v,int));
3169 va_end (v);
3170 return s;
3171}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003172
3173/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3174 function prototypes and stuff, but not '\xHH' hex character constants.
3175 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003177 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3178 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3183 inside strings and character constants. */
3184#define FOO(x) 'x'
3185int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3186
Skip Montanaro6dead952003-09-25 14:50:04 +00003187int test (int i, double x);
3188struct s1 {int (*f) (int a);};
3189struct s2 {int (*f) (double a);};
3190int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3191int argc;
3192char **argv;
3193int
3194main ()
3195{
3196return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3197 ;
3198 return 0;
3199}
3200_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003201for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3202 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003203do
3204 CC="$ac_save_CC $ac_arg"
3205 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003206if { (ac_try="$ac_compile"
3207case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003214 grep -v '^ *+' conftest.er1 >conftest.err
3215 rm -f conftest.er1
3216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 (exit $ac_status); } && {
3219 test -z "$ac_c_werror_flag" ||
3220 test ! -s conftest.err
3221 } && test -s conftest.$ac_objext; then
3222 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003225sed 's/^/| /' conftest.$ac_ext >&5
3226
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227
Skip Montanaro6dead952003-09-25 14:50:04 +00003228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229
3230rm -f core conftest.err conftest.$ac_objext
3231 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003232done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003233rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003234CC=$ac_save_CC
3235
3236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237# AC_CACHE_VAL
3238case "x$ac_cv_prog_cc_c89" in
3239 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003240 { echo "$as_me:$LINENO: result: none needed" >&5
3241echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003243 { echo "$as_me:$LINENO: result: unsupported" >&5
3244echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003245 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003246 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003247 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3248echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003249esac
3250
Skip Montanaro6dead952003-09-25 14:50:04 +00003251
Martin v. Löwis11437992002-04-12 09:54:03 +00003252ac_ext=c
3253ac_cpp='$CPP $CPPFLAGS'
3254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3256ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003258
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259
3260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003261{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3262echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003263
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003267
3268 case $withval in
3269 no) with_cxx_main=no
3270 MAINCC='$(CC)';;
3271 yes) with_cxx_main=yes
3272 MAINCC='$(CXX)';;
3273 *) with_cxx_main=yes
3274 MAINCC=$withval
3275 if test -z "$CXX"
3276 then
3277 CXX=$withval
3278 fi;;
3279 esac
3280else
3281
3282 with_cxx_main=no
3283 MAINCC='$(CC)'
3284
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285fi
3286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003287{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3288echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003289
3290preset_cxx="$CXX"
3291if test -z "$CXX"
3292then
3293 case "$CC" in
3294 gcc) # Extract the first word of "g++", so it can be a program name with args.
3295set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003300else
3301 case $CXX in
3302 [\\/]* | ?:[\\/]*)
3303 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3304 ;;
3305 *)
3306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3307for as_dir in notfound
3308do
3309 IFS=$as_save_IFS
3310 test -z "$as_dir" && as_dir=.
3311 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003313 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315 break 2
3316 fi
3317done
3318done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003319IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320
3321 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3322 ;;
3323esac
3324fi
3325CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003326if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327 { echo "$as_me:$LINENO: result: $CXX" >&5
3328echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003329else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 { echo "$as_me:$LINENO: result: no" >&5
3331echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003334 ;;
3335 cc) # Extract the first word of "c++", so it can be a program name with args.
3336set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003339if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341else
3342 case $CXX in
3343 [\\/]* | ?:[\\/]*)
3344 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3345 ;;
3346 *)
3347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3348for as_dir in notfound
3349do
3350 IFS=$as_save_IFS
3351 test -z "$as_dir" && as_dir=.
3352 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003354 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003355 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003356 break 2
3357 fi
3358done
3359done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003361
3362 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3363 ;;
3364esac
3365fi
3366CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003367if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003368 { echo "$as_me:$LINENO: result: $CXX" >&5
3369echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371 { echo "$as_me:$LINENO: result: no" >&5
3372echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003374
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003375 ;;
3376 esac
3377 if test "$CXX" = "notfound"
3378 then
3379 CXX=""
3380 fi
3381fi
3382if test -z "$CXX"
3383then
3384 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3385do
3386 # Extract the first word of "$ac_prog", so it can be a program name with args.
3387set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003388{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003390if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392else
3393 if test -n "$CXX"; then
3394 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3395else
3396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3397for as_dir in $PATH
3398do
3399 IFS=$as_save_IFS
3400 test -z "$as_dir" && as_dir=.
3401 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003403 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003405 break 2
3406 fi
3407done
3408done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410
3411fi
3412fi
3413CXX=$ac_cv_prog_CXX
3414if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003415 { echo "$as_me:$LINENO: result: $CXX" >&5
3416echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003418 { echo "$as_me:$LINENO: result: no" >&5
3419echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003420fi
3421
Martin v. Löwiseba40652007-08-30 20:10:57 +00003422
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423 test -n "$CXX" && break
3424done
3425test -n "$CXX" || CXX="notfound"
3426
3427 if test "$CXX" = "notfound"
3428 then
3429 CXX=""
3430 fi
3431fi
3432if test "$preset_cxx" != "$CXX"
3433then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003434 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003435
3436 By default, distutils will build C++ extension modules with \"$CXX\".
3437 If this is not intended, then set CXX on the configure command line.
3438 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003439echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003440
3441 By default, distutils will build C++ extension modules with \"$CXX\".
3442 If this is not intended, then set CXX on the configure command line.
3443 " >&2;}
3444fi
3445
3446
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003447# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003448
3449ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003454{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3455echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003456# On Suns, sometimes $CPP names a directory.
3457if test -n "$CPP" && test -d "$CPP"; then
3458 CPP=
3459fi
3460if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003463else
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 # Double quotes because CPP needs to be expanded
3465 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3466 do
3467 ac_preproc_ok=false
3468for ac_c_preproc_warn_flag in '' yes
3469do
3470 # Use a header file that comes with gcc, so configuring glibc
3471 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003472 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3473 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003474 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 # not just through cpp. "Syntax error" is here to catch this case.
3476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003477/* confdefs.h. */
3478_ACEOF
3479cat confdefs.h >>conftest.$ac_ext
3480cat >>conftest.$ac_ext <<_ACEOF
3481/* end confdefs.h. */
3482#ifdef __STDC__
3483# include <limits.h>
3484#else
3485# include <assert.h>
3486#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003487 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003488_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489if { (ac_try="$ac_cpp conftest.$ac_ext"
3490case "(($ac_try" in
3491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3492 *) ac_try_echo=$ac_try;;
3493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003495 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003497 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 rm -f conftest.er1
3499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501 (exit $ac_status); } >/dev/null && {
3502 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3503 test ! -s conftest.err
3504 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003505 :
3506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003508sed 's/^/| /' conftest.$ac_ext >&5
3509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: fails on valid input.
3511continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003513
Martin v. Löwis11437992002-04-12 09:54:03 +00003514rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003515
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # can be detected and how.
3518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* confdefs.h. */
3520_ACEOF
3521cat confdefs.h >>conftest.$ac_ext
3522cat >>conftest.$ac_ext <<_ACEOF
3523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003524#include <ac_nonexistent.h>
3525_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526if { (ac_try="$ac_cpp conftest.$ac_ext"
3527case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003533 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003534 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 rm -f conftest.er1
3536 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538 (exit $ac_status); } >/dev/null && {
3539 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3540 test ! -s conftest.err
3541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Broken: success on invalid input.
3543continue
3544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003546sed 's/^/| /' conftest.$ac_ext >&5
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # Passes both tests.
3549ac_preproc_ok=:
3550break
3551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552
Martin v. Löwis11437992002-04-12 09:54:03 +00003553rm -f conftest.err conftest.$ac_ext
3554
3555done
3556# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3557rm -f conftest.err conftest.$ac_ext
3558if $ac_preproc_ok; then
3559 break
3560fi
3561
3562 done
3563 ac_cv_prog_CPP=$CPP
3564
3565fi
3566 CPP=$ac_cv_prog_CPP
3567else
3568 ac_cv_prog_CPP=$CPP
3569fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003570{ echo "$as_me:$LINENO: result: $CPP" >&5
3571echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_preproc_ok=false
3573for ac_c_preproc_warn_flag in '' yes
3574do
3575 # Use a header file that comes with gcc, so configuring glibc
3576 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003577 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3578 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # On the NeXT, cc -E runs the code through the compiler's parser,
3580 # not just through cpp. "Syntax error" is here to catch this case.
3581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003582/* confdefs.h. */
3583_ACEOF
3584cat confdefs.h >>conftest.$ac_ext
3585cat >>conftest.$ac_ext <<_ACEOF
3586/* end confdefs.h. */
3587#ifdef __STDC__
3588# include <limits.h>
3589#else
3590# include <assert.h>
3591#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003592 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003593_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594if { (ac_try="$ac_cpp conftest.$ac_ext"
3595case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003602 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 rm -f conftest.er1
3604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606 (exit $ac_status); } >/dev/null && {
3607 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3608 test ! -s conftest.err
3609 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 :
3611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003613sed 's/^/| /' conftest.$ac_ext >&5
3614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: fails on valid input.
3616continue
3617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003618
Martin v. Löwis11437992002-04-12 09:54:03 +00003619rm -f conftest.err conftest.$ac_ext
3620
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 # can be detected and how.
3623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003624/* confdefs.h. */
3625_ACEOF
3626cat confdefs.h >>conftest.$ac_ext
3627cat >>conftest.$ac_ext <<_ACEOF
3628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003629#include <ac_nonexistent.h>
3630_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631if { (ac_try="$ac_cpp conftest.$ac_ext"
3632case "(($ac_try" in
3633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3634 *) ac_try_echo=$ac_try;;
3635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 rm -f conftest.er1
3641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003643 (exit $ac_status); } >/dev/null && {
3644 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3645 test ! -s conftest.err
3646 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 # Broken: success on invalid input.
3648continue
3649else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003651sed 's/^/| /' conftest.$ac_ext >&5
3652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 # Passes both tests.
3654ac_preproc_ok=:
3655break
3656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658rm -f conftest.err conftest.$ac_ext
3659
3660done
3661# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3662rm -f conftest.err conftest.$ac_ext
3663if $ac_preproc_ok; then
3664 :
3665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003666 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003667See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003668echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003669See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003671fi
3672
3673ac_ext=c
3674ac_cpp='$CPP $CPPFLAGS'
3675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3677ac_compiler_gnu=$ac_cv_c_compiler_gnu
3678
3679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003680{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3681echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003685 # Extract the first word of "grep ggrep" to use in msg output
3686if test -z "$GREP"; then
3687set dummy grep ggrep; ac_prog_name=$2
3688if test "${ac_cv_path_GREP+set}" = set; then
3689 echo $ECHO_N "(cached) $ECHO_C" >&6
3690else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003691 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003692# Loop through the user's path and test for each of PROGNAME-LIST
3693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
3698 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3701 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3702 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003703 # Check for GNU $ac_path_GREP
3704case `"$ac_path_GREP" --version 2>&1` in
3705*GNU*)
3706 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3707*)
3708 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003709 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003710 while :
3711 do
3712 cat "conftest.in" "conftest.in" >"conftest.tmp"
3713 mv "conftest.tmp" "conftest.in"
3714 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003715 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3717 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3718 ac_count=`expr $ac_count + 1`
3719 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3720 # Best one so far, save it but keep looking for a better one
3721 ac_cv_path_GREP="$ac_path_GREP"
3722 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003723 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003724 # 10*(2^10) chars as input seems more than enough
3725 test $ac_count -gt 10 && break
3726 done
3727 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3728esac
3729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730
3731 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732 done
3733done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003734
3735done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003736IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003737
3738
3739fi
3740
3741GREP="$ac_cv_path_GREP"
3742if test -z "$GREP"; then
3743 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3744echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746fi
3747
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748else
3749 ac_cv_path_GREP=$GREP
3750fi
3751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003754{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3755echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 GREP="$ac_cv_path_GREP"
3757
3758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003759{ echo "$as_me:$LINENO: checking for egrep" >&5
3760echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763else
3764 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3765 then ac_cv_path_EGREP="$GREP -E"
3766 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003767 # Extract the first word of "egrep" to use in msg output
3768if test -z "$EGREP"; then
3769set dummy egrep; ac_prog_name=$2
3770if test "${ac_cv_path_EGREP+set}" = set; then
3771 echo $ECHO_N "(cached) $ECHO_C" >&6
3772else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003774# Loop through the user's path and test for each of PROGNAME-LIST
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
3780 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
3782 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3783 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3784 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 # Check for GNU $ac_path_EGREP
3786case `"$ac_path_EGREP" --version 2>&1` in
3787*GNU*)
3788 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3789*)
3790 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003791 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 while :
3793 do
3794 cat "conftest.in" "conftest.in" >"conftest.tmp"
3795 mv "conftest.tmp" "conftest.in"
3796 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003797 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3799 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3800 ac_count=`expr $ac_count + 1`
3801 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3802 # Best one so far, save it but keep looking for a better one
3803 ac_cv_path_EGREP="$ac_path_EGREP"
3804 ac_path_EGREP_max=$ac_count
3805 fi
3806 # 10*(2^10) chars as input seems more than enough
3807 test $ac_count -gt 10 && break
3808 done
3809 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3810esac
3811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814 done
3815done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003816
3817done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003818IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003819
3820
3821fi
3822
3823EGREP="$ac_cv_path_EGREP"
3824if test -z "$EGREP"; then
3825 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3826echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003827 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828fi
3829
Martin v. Löwiseba40652007-08-30 20:10:57 +00003830else
3831 ac_cv_path_EGREP=$EGREP
3832fi
3833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003834
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835 fi
3836fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3838echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003840
3841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003842
3843{ echo "$as_me:$LINENO: checking for AIX" >&5
3844echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3845cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003846/* confdefs.h. */
3847_ACEOF
3848cat confdefs.h >>conftest.$ac_ext
3849cat >>conftest.$ac_ext <<_ACEOF
3850/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003851#ifdef _AIX
3852 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003853#endif
3854
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003855_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3857 $EGREP "yes" >/dev/null 2>&1; then
3858 { echo "$as_me:$LINENO: result: yes" >&5
3859echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003860cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003861#define _ALL_SOURCE 1
3862_ACEOF
3863
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003864else
3865 { echo "$as_me:$LINENO: result: no" >&5
3866echo "${ECHO_T}no" >&6; }
3867fi
Ronald Oussoren25967582009-09-06 10:00:26 +00003868rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003869
3870
3871
3872# Check for unsupported systems
3873case $ac_sys_system/$ac_sys_release in
3874atheos*|Linux*/1*)
3875 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3876 echo See README for details.
3877 exit 1;;
3878esac
3879
3880
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003881{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3882echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003883
3884# Check whether --with-suffix was given.
3885if test "${with_suffix+set}" = set; then
3886 withval=$with_suffix;
3887 case $withval in
3888 no) EXEEXT=;;
3889 yes) EXEEXT=.exe;;
3890 *) EXEEXT=$withval;;
3891 esac
3892fi
3893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3895echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003896
3897# Test whether we're running on a non-case-sensitive system, in which
3898# case we give a warning if no ext is given
3899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003900{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3901echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003902if test ! -d CaseSensitiveTestDir; then
3903mkdir CaseSensitiveTestDir
3904fi
3905
3906if test -d casesensitivetestdir
3907then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003908 { echo "$as_me:$LINENO: result: yes" >&5
3909echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003910 BUILDEXEEXT=.exe
3911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912 { echo "$as_me:$LINENO: result: no" >&5
3913echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003914 BUILDEXEEXT=$EXEEXT
3915fi
3916rmdir CaseSensitiveTestDir
3917
3918case $MACHDEP in
3919bsdos*)
3920 case $CC in
3921 gcc) CC="$CC -D_HAVE_BSDI";;
3922 esac;;
3923esac
3924
3925case $ac_sys_system in
3926hp*|HP*)
3927 case $CC in
3928 cc|*/cc) CC="$CC -Ae";;
3929 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003930SunOS*)
3931 # Some functions have a prototype only with that define, e.g. confstr
3932
3933cat >>confdefs.h <<\_ACEOF
3934#define __EXTENSIONS__ 1
3935_ACEOF
3936
3937 ;;
3938esac
3939
3940
3941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3943echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944if test -z "$LIBRARY"
3945then
3946 LIBRARY='libpython$(VERSION).a'
3947fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003948{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3949echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003950
3951# LDLIBRARY is the name of the library to link against (as opposed to the
3952# name of the library into which to insert object files). BLDLIBRARY is also
3953# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3954# is blank as the main program is not linked directly against LDLIBRARY.
3955# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3956# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3957# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3958# DLLLIBRARY is the shared (i.e., DLL) library.
3959#
3960# RUNSHARED is used to run shared python without installed libraries
3961#
3962# INSTSONAME is the name of the shared library that will be use to install
3963# on the system - some systems like version suffix, others don't
3964
3965
3966
3967
3968
3969
3970LDLIBRARY="$LIBRARY"
3971BLDLIBRARY='$(LDLIBRARY)'
3972INSTSONAME='$(LDLIBRARY)'
3973DLLLIBRARY=''
3974LDLIBRARYDIR=''
3975RUNSHARED=''
3976
3977# LINKCC is the command that links the python executable -- default is $(CC).
3978# If CXX is set, and if it is needed to link a main function that was
3979# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3980# python might then depend on the C++ runtime
3981# This is altered for AIX in order to build the export list before
3982# linking.
3983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003984{ echo "$as_me:$LINENO: checking LINKCC" >&5
3985echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003986if test -z "$LINKCC"
3987then
3988 LINKCC='$(PURIFY) $(MAINCC)'
3989 case $ac_sys_system in
3990 AIX*)
3991 exp_extra="\"\""
3992 if test $ac_sys_release -ge 5 -o \
3993 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3994 exp_extra="."
3995 fi
3996 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003997 QNX*)
3998 # qcc must be used because the other compilers do not
3999 # support -N.
4000 LINKCC=qcc;;
4001 esac
4002fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004003{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4004echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004005
4006# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4007# make sure we default having it set to "no": this is used by
4008# distutils.unixccompiler to know if it should add --enable-new-dtags
4009# to linker command lines, and failing to detect GNU ld simply results
4010# in the same bahaviour as before.
4011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004012{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4013echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004014ac_prog=ld
4015if test "$GCC" = yes; then
4016 ac_prog=`$CC -print-prog-name=ld`
4017fi
4018case `"$ac_prog" -V 2>&1 < /dev/null` in
4019 *GNU*)
4020 GNULD=yes;;
4021 *)
4022 GNULD=no;;
4023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004024{ echo "$as_me:$LINENO: result: $GNULD" >&5
4025echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004027{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4028echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004029# Check whether --enable-shared was given.
4030if test "${enable_shared+set}" = set; then
4031 enableval=$enable_shared;
4032fi
4033
4034
4035if test -z "$enable_shared"
4036then
4037 case $ac_sys_system in
4038 CYGWIN* | atheos*)
4039 enable_shared="yes";;
4040 *)
4041 enable_shared="no";;
4042 esac
4043fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004044{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4045echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004047{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4048echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004049# Check whether --enable-profiling was given.
4050if test "${enable_profiling+set}" = set; then
4051 enableval=$enable_profiling; ac_save_cc="$CC"
4052 CC="$CC -pg"
4053 if test "$cross_compiling" = yes; then
4054 ac_enable_profiling="no"
4055else
4056 cat >conftest.$ac_ext <<_ACEOF
4057/* confdefs.h. */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h. */
4062int main() { return 0; }
4063_ACEOF
4064rm -f conftest$ac_exeext
4065if { (ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004071 (eval "$ac_link") 2>&5
4072 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4075 { (case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080 (eval "$ac_try") 2>&5
4081 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083 (exit $ac_status); }; }; then
4084 ac_enable_profiling="yes"
4085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004086 echo "$as_me: program exited with status $ac_status" >&5
4087echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090( exit $ac_status )
4091ac_enable_profiling="no"
4092fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4094fi
4095
4096
4097 CC="$ac_save_cc"
4098fi
4099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004100{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4101echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102
4103case "$ac_enable_profiling" in
4104 "yes")
4105 BASECFLAGS="-pg $BASECFLAGS"
4106 LDFLAGS="-pg $LDFLAGS"
4107 ;;
4108esac
4109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004110{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4111echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004112
4113# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4114# library that we build, but we do not want to link against it (we
4115# will find it with a -framework option). For this reason there is an
4116# extra variable BLDLIBRARY against which Python and the extension
4117# modules are linked, BLDLIBRARY. This is normally the same as
4118# LDLIBRARY, but empty for MacOSX framework builds.
4119if test "$enable_framework"
4120then
4121 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4122 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4123 BLDLIBRARY=''
4124else
4125 BLDLIBRARY='$(LDLIBRARY)'
4126fi
4127
4128# Other platforms follow
4129if test $enable_shared = "yes"; then
4130
4131cat >>confdefs.h <<\_ACEOF
4132#define Py_ENABLE_SHARED 1
4133_ACEOF
4134
4135 case $ac_sys_system in
4136 BeOS*)
4137 LDLIBRARY='libpython$(VERSION).so'
4138 ;;
4139 CYGWIN*)
4140 LDLIBRARY='libpython$(VERSION).dll.a'
4141 DLLLIBRARY='libpython$(VERSION).dll'
4142 ;;
4143 SunOS*)
4144 LDLIBRARY='libpython$(VERSION).so'
4145 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4146 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4147 INSTSONAME="$LDLIBRARY".$SOVERSION
4148 ;;
4149 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4150 LDLIBRARY='libpython$(VERSION).so'
4151 BLDLIBRARY='-L. -lpython$(VERSION)'
4152 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4153 case $ac_sys_system in
4154 FreeBSD*)
4155 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4156 ;;
4157 esac
4158 INSTSONAME="$LDLIBRARY".$SOVERSION
4159 ;;
4160 hp*|HP*)
4161 case `uname -m` in
4162 ia64)
4163 LDLIBRARY='libpython$(VERSION).so'
4164 ;;
4165 *)
4166 LDLIBRARY='libpython$(VERSION).sl'
4167 ;;
4168 esac
4169 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4170 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4171 ;;
4172 OSF*)
4173 LDLIBRARY='libpython$(VERSION).so'
4174 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4175 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4176 ;;
4177 atheos*)
4178 LDLIBRARY='libpython$(VERSION).so'
4179 BLDLIBRARY='-L. -lpython$(VERSION)'
4180 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4181 ;;
4182 Darwin*)
4183 LDLIBRARY='libpython$(VERSION).dylib'
4184 BLDLIBRARY='-L. -lpython$(VERSION)'
4185 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4186 ;;
4187
4188 esac
4189else # shared is disabled
4190 case $ac_sys_system in
4191 CYGWIN*)
4192 BLDLIBRARY='$(LIBRARY)'
4193 LDLIBRARY='libpython$(VERSION).dll.a'
4194 ;;
4195 esac
4196fi
4197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004198{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4199echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004200
4201if test -n "$ac_tool_prefix"; then
4202 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4203set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004206if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004208else
4209 if test -n "$RANLIB"; then
4210 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229RANLIB=$ac_cv_prog_RANLIB
4230if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004231 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4232echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004236fi
4237
4238
4239fi
4240if test -z "$ac_cv_prog_RANLIB"; then
4241 ac_ct_RANLIB=$RANLIB
4242 # Extract the first word of "ranlib", so it can be a program name with args.
4243set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004244{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4245echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004246if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004247 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004248else
4249 if test -n "$ac_ct_RANLIB"; then
4250 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4251else
4252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255 IFS=$as_save_IFS
4256 test -z "$as_dir" && as_dir=.
4257 for ac_exec_ext in '' $ac_executable_extensions; do
4258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004260 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004261 break 2
4262 fi
4263done
4264done
4265IFS=$as_save_IFS
4266
4267fi
4268fi
4269ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4270if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004271 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4272echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004274 { echo "$as_me:$LINENO: result: no" >&5
4275echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004276fi
4277
4278 if test "x$ac_ct_RANLIB" = x; then
4279 RANLIB=":"
4280 else
4281 case $cross_compiling:$ac_tool_warned in
4282yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004283{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4284whose name does not start with the host triplet. If you think this
4285configuration is useful to you, please write to autoconf@gnu.org." >&5
4286echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4287whose name does not start with the host triplet. If you think this
4288configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004289ac_tool_warned=yes ;;
4290esac
4291 RANLIB=$ac_ct_RANLIB
4292 fi
4293else
4294 RANLIB="$ac_cv_prog_RANLIB"
4295fi
4296
4297
4298for ac_prog in ar aal
4299do
4300 # Extract the first word of "$ac_prog", so it can be a program name with args.
4301set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004306else
4307 if test -n "$AR"; then
4308 ac_cv_prog_AR="$AR" # Let the user override the test.
4309else
4310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4311for as_dir in $PATH
4312do
4313 IFS=$as_save_IFS
4314 test -z "$as_dir" && as_dir=.
4315 for ac_exec_ext in '' $ac_executable_extensions; do
4316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4317 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004319 break 2
4320 fi
4321done
4322done
4323IFS=$as_save_IFS
4324
4325fi
4326fi
4327AR=$ac_cv_prog_AR
4328if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004329 { echo "$as_me:$LINENO: result: $AR" >&5
4330echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004331else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004332 { echo "$as_me:$LINENO: result: no" >&5
4333echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004334fi
4335
4336
4337 test -n "$AR" && break
4338done
4339test -n "$AR" || AR="ar"
4340
4341
4342# tweak ARFLAGS only if the user didn't set it on the command line
4343
4344if test -z "$ARFLAGS"
4345then
4346 ARFLAGS="rc"
4347fi
4348
4349
4350# Extract the first word of "svnversion", so it can be a program name with args.
4351set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004355 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004356else
4357 if test -n "$SVNVERSION"; then
4358 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4359else
4360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363 IFS=$as_save_IFS
4364 test -z "$as_dir" && as_dir=.
4365 for ac_exec_ext in '' $ac_executable_extensions; do
4366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004369 break 2
4370 fi
4371done
4372done
4373IFS=$as_save_IFS
4374
4375 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4376fi
4377fi
4378SVNVERSION=$ac_cv_prog_SVNVERSION
4379if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004380 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4381echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383 { echo "$as_me:$LINENO: result: no" >&5
4384echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385fi
4386
4387
4388if test $SVNVERSION = found
4389then
4390 SVNVERSION="svnversion \$(srcdir)"
4391else
4392 SVNVERSION="echo Unversioned directory"
4393fi
4394
4395case $MACHDEP in
4396bsdos*|hp*|HP*)
4397 # install -d does not work on BSDI or HP-UX
4398 if test -z "$INSTALL"
4399 then
4400 INSTALL="${srcdir}/install-sh -c"
4401 fi
4402esac
4403ac_aux_dir=
4404for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4405 if test -f "$ac_dir/install-sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install-sh -c"
4408 break
4409 elif test -f "$ac_dir/install.sh"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/install.sh -c"
4412 break
4413 elif test -f "$ac_dir/shtool"; then
4414 ac_aux_dir=$ac_dir
4415 ac_install_sh="$ac_aux_dir/shtool install -c"
4416 break
4417 fi
4418done
4419if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004420 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4421echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004422 { (exit 1); exit 1; }; }
4423fi
4424
4425# These three variables are undocumented and unsupported,
4426# and are intended to be withdrawn in a future Autoconf release.
4427# They can cause serious problems if a builder's source tree is in a directory
4428# whose full name contains unusual characters.
4429ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4430ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4431ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4432
4433
4434# Find a good install program. We prefer a C program (faster),
4435# so one script is as good as another. But avoid the broken or
4436# incompatible versions:
4437# SysV /etc/install, /usr/sbin/install
4438# SunOS /usr/etc/install
4439# IRIX /sbin/install
4440# AIX /bin/install
4441# AmigaOS /C/install, which installs bootblocks on floppy discs
4442# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4443# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4444# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4445# OS/2's system install, which has a completely different semantic
4446# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4448echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004449if test -z "$INSTALL"; then
4450if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004451 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004452else
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 # Account for people who put trailing slashes in PATH elements.
4459case $as_dir/ in
4460 ./ | .// | /cC/* | \
4461 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4462 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4463 /usr/ucb/* ) ;;
4464 *)
4465 # OSF1 and SCO ODT 3.0 have their own names for install.
4466 # Don't use installbsd from OSF since it installs stuff as root
4467 # by default.
4468 for ac_prog in ginstall scoinst install; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4471 if test $ac_prog = install &&
4472 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # AIX install. It has an incompatible calling convention.
4474 :
4475 elif test $ac_prog = install &&
4476 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4477 # program-specific install script used by HP pwplus--don't use.
4478 :
4479 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004480 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4481 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004482 fi
4483 fi
4484 done
4485 done
4486 ;;
4487esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004488done
4489IFS=$as_save_IFS
4490
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004491
4492fi
4493 if test "${ac_cv_path_install+set}" = set; then
4494 INSTALL=$ac_cv_path_install
4495 else
4496 # As a last resort, use the slow shell script. Don't cache a
4497 # value for INSTALL within a source directory, because that will
4498 # break other packages using the cache if that directory is
4499 # removed, or if the value is a relative name.
4500 INSTALL=$ac_install_sh
4501 fi
4502fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004503{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4504echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004505
4506# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4507# It thinks the first close brace ends the variable substitution.
4508test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4509
4510test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4511
4512test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4513
4514
4515# Not every filesystem supports hard links
4516
4517if test -z "$LN" ; then
4518 case $ac_sys_system in
4519 BeOS*) LN="ln -s";;
4520 CYGWIN*) LN="ln -s";;
4521 atheos*) LN="ln -s";;
4522 *) LN=ln;;
4523 esac
4524fi
4525
4526# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004527{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4528echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004529
4530# Check whether --with-pydebug was given.
4531if test "${with_pydebug+set}" = set; then
4532 withval=$with_pydebug;
4533if test "$withval" != no
4534then
4535
4536cat >>confdefs.h <<\_ACEOF
4537#define Py_DEBUG 1
4538_ACEOF
4539
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004540 { echo "$as_me:$LINENO: result: yes" >&5
4541echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004542 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543else { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004547 { echo "$as_me:$LINENO: result: no" >&5
4548echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004549fi
4550
4551
4552# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4553# merged with this chunk of code?
4554
4555# Optimizer/debugger flags
4556# ------------------------
4557# (The following bit of code is complicated enough - please keep things
4558# indented properly. Just pretend you're editing Python code. ;-)
4559
4560# There are two parallel sets of case statements below, one that checks to
4561# see if OPT was set and one that does BASECFLAGS setting based upon
4562# compiler and platform. BASECFLAGS tweaks need to be made even if the
4563# user set OPT.
4564
4565# tweak OPT based on compiler and platform, only if the user didn't set
4566# it on the command line
4567
4568if test -z "$OPT"
4569then
4570 case $GCC in
4571 yes)
4572 if test "$CC" != 'g++' ; then
4573 STRICT_PROTO="-Wstrict-prototypes"
4574 fi
4575 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4576 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4577 WRAP="-fwrapv"
4578 fi
4579 case $ac_cv_prog_cc_g in
4580 yes)
4581 if test "$Py_DEBUG" = 'true' ; then
4582 # Optimization messes up debuggers, so turn it off for
4583 # debug builds.
4584 OPT="-g -Wall $STRICT_PROTO"
4585 else
4586 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4587 fi
4588 ;;
4589 *)
4590 OPT="-O3 -Wall $STRICT_PROTO"
4591 ;;
4592 esac
4593 case $ac_sys_system in
4594 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4595 ;;
4596 esac
4597 ;;
4598
4599 *)
4600 OPT="-O"
4601 ;;
4602 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004603fi
4604
4605
4606
4607# The -arch flags for universal builds on OSX
4608UNIVERSAL_ARCH_FLAGS=
4609
4610
4611# tweak BASECFLAGS based on compiler and platform
4612case $GCC in
4613yes)
4614 # Python violates C99 rules, by casting between incompatible
4615 # pointer types. GCC may generate bad code as a result of that,
4616 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004617 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4618echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004619 ac_save_cc="$CC"
4620 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004621 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
4624 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004625 ac_cv_no_strict_aliasing_ok=no
4626else
4627 cat >conftest.$ac_ext <<_ACEOF
4628/* confdefs.h. */
4629_ACEOF
4630cat confdefs.h >>conftest.$ac_ext
4631cat >>conftest.$ac_ext <<_ACEOF
4632/* end confdefs.h. */
4633int main() { return 0; }
4634_ACEOF
4635rm -f conftest$ac_exeext
4636if { (ac_try="$ac_link"
4637case "(($ac_try" in
4638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4639 *) ac_try_echo=$ac_try;;
4640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004642 (eval "$ac_link") 2>&5
4643 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4646 { (case "(($ac_try" in
4647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4648 *) ac_try_echo=$ac_try;;
4649esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004651 (eval "$ac_try") 2>&5
4652 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004654 (exit $ac_status); }; }; then
4655 ac_cv_no_strict_aliasing_ok=yes
4656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004657 echo "$as_me: program exited with status $ac_status" >&5
4658echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659sed 's/^/| /' conftest.$ac_ext >&5
4660
4661( exit $ac_status )
4662ac_cv_no_strict_aliasing_ok=no
4663fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4665fi
4666
4667
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004668fi
4669
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004670 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004671 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4672echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004673 if test $ac_cv_no_strict_aliasing_ok = yes
4674 then
4675 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4676 fi
4677
4678 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4679 # support. Without this, treatment of subnormals doesn't follow
4680 # the standard.
4681 case $ac_sys_machine in
4682 alpha*)
4683 BASECFLAGS="$BASECFLAGS -mieee"
4684 ;;
4685 esac
4686
4687 case $ac_sys_system in
4688 SCO_SV*)
4689 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4690 ;;
4691 # is there any other compiler on Darwin besides gcc?
4692 Darwin*)
4693 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4694 # used to be here, but non-Apple gcc doesn't accept them.
4695
4696
4697 if test "${enable_universalsdk}"; then
4698 UNIVERSAL_ARCH_FLAGS=""
4699 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4700 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4701 ARCH_RUN_32BIT=""
4702
4703 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4704 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren25967582009-09-06 10:00:26 +00004705 ARCH_RUN_32BIT="true"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004706
4707 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4708 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4709 ARCH_RUN_32BIT="arch -i386 -ppc"
4710
Ronald Oussoren23d92532009-09-07 06:12:00 +00004711 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4712 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4713 ARCH_RUN_32BIT="arch -i386"
4714
4715 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4716 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4717 ARCH_RUN_32BIT="arch -i386 -ppc"
4718
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719 else
Ronald Oussorena9cfbde2009-09-20 20:05:44 +00004720 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4721echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004722 { (exit 1); exit 1; }; }
4723
4724 fi
4725
4726
4727 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4728 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4729 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4730 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4731 fi
4732 fi
4733
4734 # Calculate the right deployment target for this build.
4735 #
4736 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4737 if test ${cur_target} '>' 10.2; then
4738 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004739 if test ${enable_universalsdk}; then
4740 if test "${UNIVERSAL_ARCHS}" = "all"; then
4741 # Ensure that the default platform for a
4742 # 4-way universal build is OSX 10.5,
4743 # that's the first OS release where
4744 # 4-way builds make sense.
4745 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004746
4747 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4748 cur_target='10.5'
4749
4750 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4751 cur_target='10.5'
4752
4753 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4754 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004755 fi
4756 else
4757 if test `arch` = "i386"; then
4758 # On Intel macs default to a deployment
4759 # target of 10.4, that's the first OSX
4760 # release with Intel support.
4761 cur_target="10.4"
4762 fi
4763 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004764 fi
4765 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4766
4767 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4768 # environment with a value that is the same as what we'll use
4769 # in the Makefile to ensure that we'll get the same compiler
4770 # environment during configure and build time.
4771 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4772 export MACOSX_DEPLOYMENT_TARGET
4773 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4774
4775 ;;
4776 OSF*)
4777 BASECFLAGS="$BASECFLAGS -mieee"
4778 ;;
4779 esac
4780 ;;
4781
4782*)
4783 case $ac_sys_system in
4784 OpenUNIX*|UnixWare*)
4785 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4786 ;;
4787 OSF*)
4788 BASECFLAGS="$BASECFLAGS -ieee -std"
4789 ;;
4790 SCO_SV*)
4791 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4792 ;;
4793 esac
4794 ;;
4795esac
4796
4797if test "$Py_DEBUG" = 'true'; then
4798 :
4799else
4800 OPT="-DNDEBUG $OPT"
4801fi
4802
4803if test "$ac_arch_flags"
4804then
4805 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4806fi
4807
4808# disable check for icc since it seems to pass, but generates a warning
4809if test "$CC" = icc
4810then
4811 ac_cv_opt_olimit_ok=no
4812fi
4813
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004814{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4815echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004817 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818else
4819 ac_save_cc="$CC"
4820CC="$CC -OPT:Olimit=0"
4821if test "$cross_compiling" = yes; then
4822 ac_cv_opt_olimit_ok=no
4823else
4824 cat >conftest.$ac_ext <<_ACEOF
4825/* confdefs.h. */
4826_ACEOF
4827cat confdefs.h >>conftest.$ac_ext
4828cat >>conftest.$ac_ext <<_ACEOF
4829/* end confdefs.h. */
4830int main() { return 0; }
4831_ACEOF
4832rm -f conftest$ac_exeext
4833if { (ac_try="$ac_link"
4834case "(($ac_try" in
4835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4836 *) ac_try_echo=$ac_try;;
4837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004839 (eval "$ac_link") 2>&5
4840 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4843 { (case "(($ac_try" in
4844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845 *) ac_try_echo=$ac_try;;
4846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004848 (eval "$ac_try") 2>&5
4849 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004851 (exit $ac_status); }; }; then
4852 ac_cv_opt_olimit_ok=yes
4853else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004854 echo "$as_me: program exited with status $ac_status" >&5
4855echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004856sed 's/^/| /' conftest.$ac_ext >&5
4857
4858( exit $ac_status )
4859ac_cv_opt_olimit_ok=no
4860fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4862fi
4863
4864
4865CC="$ac_save_cc"
4866fi
4867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004868{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4869echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870if test $ac_cv_opt_olimit_ok = yes; then
4871 case $ac_sys_system in
4872 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4873 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4874 # environment?
4875 Darwin*)
4876 ;;
4877 *)
4878 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4879 ;;
4880 esac
4881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004882 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4883echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004884 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004885 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004886else
4887 ac_save_cc="$CC"
4888 CC="$CC -Olimit 1500"
4889 if test "$cross_compiling" = yes; then
4890 ac_cv_olimit_ok=no
4891else
4892 cat >conftest.$ac_ext <<_ACEOF
4893/* confdefs.h. */
4894_ACEOF
4895cat confdefs.h >>conftest.$ac_ext
4896cat >>conftest.$ac_ext <<_ACEOF
4897/* end confdefs.h. */
4898int main() { return 0; }
4899_ACEOF
4900rm -f conftest$ac_exeext
4901if { (ac_try="$ac_link"
4902case "(($ac_try" in
4903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4904 *) ac_try_echo=$ac_try;;
4905esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004907 (eval "$ac_link") 2>&5
4908 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4911 { (case "(($ac_try" in
4912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4913 *) ac_try_echo=$ac_try;;
4914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004916 (eval "$ac_try") 2>&5
4917 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004919 (exit $ac_status); }; }; then
4920 ac_cv_olimit_ok=yes
4921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004922 echo "$as_me: program exited with status $ac_status" >&5
4923echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004924sed 's/^/| /' conftest.$ac_ext >&5
4925
4926( exit $ac_status )
4927ac_cv_olimit_ok=no
4928fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4930fi
4931
4932
4933 CC="$ac_save_cc"
4934fi
4935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004936 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4937echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004938 if test $ac_cv_olimit_ok = yes; then
4939 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4940 fi
4941fi
4942
4943# Check whether GCC supports PyArg_ParseTuple format
4944if test "$GCC" = "yes"
4945then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004946 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4947echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004948 save_CFLAGS=$CFLAGS
4949 CFLAGS="$CFLAGS -Werror"
4950 cat >conftest.$ac_ext <<_ACEOF
4951/* confdefs.h. */
4952_ACEOF
4953cat confdefs.h >>conftest.$ac_ext
4954cat >>conftest.$ac_ext <<_ACEOF
4955/* end confdefs.h. */
4956
4957 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4958
4959int
4960main ()
4961{
4962
4963 ;
4964 return 0;
4965}
4966_ACEOF
4967rm -f conftest.$ac_objext
4968if { (ac_try="$ac_compile"
4969case "(($ac_try" in
4970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4971 *) ac_try_echo=$ac_try;;
4972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004974 (eval "$ac_compile") 2>conftest.er1
4975 ac_status=$?
4976 grep -v '^ *+' conftest.er1 >conftest.err
4977 rm -f conftest.er1
4978 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980 (exit $ac_status); } && {
4981 test -z "$ac_c_werror_flag" ||
4982 test ! -s conftest.err
4983 } && test -s conftest.$ac_objext; then
4984
4985cat >>confdefs.h <<\_ACEOF
4986#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4987_ACEOF
4988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004989 { echo "$as_me:$LINENO: result: yes" >&5
4990echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004992 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004995 { echo "$as_me:$LINENO: result: no" >&5
4996echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997
4998fi
4999
5000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5001 CFLAGS=$save_CFLAGS
5002fi
5003
5004# On some compilers, pthreads are available without further options
5005# (e.g. MacOS X). On some of these systems, the compiler will not
5006# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5007# So we have to see first whether pthreads are available without
5008# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005009{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5010echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005011if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013else
5014 if test "$cross_compiling" = yes; then
5015 ac_cv_pthread_is_default=no
5016else
5017 cat >conftest.$ac_ext <<_ACEOF
5018/* confdefs.h. */
5019_ACEOF
5020cat confdefs.h >>conftest.$ac_ext
5021cat >>conftest.$ac_ext <<_ACEOF
5022/* end confdefs.h. */
5023
5024#include <pthread.h>
5025
5026void* routine(void* p){return NULL;}
5027
5028int main(){
5029 pthread_t p;
5030 if(pthread_create(&p,NULL,routine,NULL)!=0)
5031 return 1;
5032 (void)pthread_detach(p);
5033 return 0;
5034}
5035
5036_ACEOF
5037rm -f conftest$ac_exeext
5038if { (ac_try="$ac_link"
5039case "(($ac_try" in
5040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5041 *) ac_try_echo=$ac_try;;
5042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044 (eval "$ac_link") 2>&5
5045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5048 { (case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005053 (eval "$ac_try") 2>&5
5054 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056 (exit $ac_status); }; }; then
5057
5058 ac_cv_pthread_is_default=yes
5059 ac_cv_kthread=no
5060 ac_cv_pthread=no
5061
5062else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005063 echo "$as_me: program exited with status $ac_status" >&5
5064echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005065sed 's/^/| /' conftest.$ac_ext >&5
5066
5067( exit $ac_status )
5068ac_cv_pthread_is_default=no
5069fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5071fi
5072
5073
5074
5075fi
5076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005077{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5078echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005079
5080
5081if test $ac_cv_pthread_is_default = yes
5082then
5083 ac_cv_kpthread=no
5084else
5085# -Kpthread, if available, provides the right #defines
5086# and linker options to make pthread_create available
5087# Some compilers won't report that they do not support -Kpthread,
5088# so we need to run a program to see whether it really made the
5089# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005090{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5091echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005092if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005093 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005094else
5095 ac_save_cc="$CC"
5096CC="$CC -Kpthread"
5097if test "$cross_compiling" = yes; then
5098 ac_cv_kpthread=no
5099else
5100 cat >conftest.$ac_ext <<_ACEOF
5101/* confdefs.h. */
5102_ACEOF
5103cat confdefs.h >>conftest.$ac_ext
5104cat >>conftest.$ac_ext <<_ACEOF
5105/* end confdefs.h. */
5106
5107#include <pthread.h>
5108
5109void* routine(void* p){return NULL;}
5110
5111int main(){
5112 pthread_t p;
5113 if(pthread_create(&p,NULL,routine,NULL)!=0)
5114 return 1;
5115 (void)pthread_detach(p);
5116 return 0;
5117}
5118
5119_ACEOF
5120rm -f conftest$ac_exeext
5121if { (ac_try="$ac_link"
5122case "(($ac_try" in
5123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5124 *) ac_try_echo=$ac_try;;
5125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005127 (eval "$ac_link") 2>&5
5128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5131 { (case "(($ac_try" in
5132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5133 *) ac_try_echo=$ac_try;;
5134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005136 (eval "$ac_try") 2>&5
5137 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139 (exit $ac_status); }; }; then
5140 ac_cv_kpthread=yes
5141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005142 echo "$as_me: program exited with status $ac_status" >&5
5143echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005144sed 's/^/| /' conftest.$ac_ext >&5
5145
5146( exit $ac_status )
5147ac_cv_kpthread=no
5148fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5150fi
5151
5152
5153CC="$ac_save_cc"
5154fi
5155
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005156{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5157echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158fi
5159
5160if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5161then
5162# -Kthread, if available, provides the right #defines
5163# and linker options to make pthread_create available
5164# Some compilers won't report that they do not support -Kthread,
5165# so we need to run a program to see whether it really made the
5166# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005167{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5168echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005170 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005171else
5172 ac_save_cc="$CC"
5173CC="$CC -Kthread"
5174if test "$cross_compiling" = yes; then
5175 ac_cv_kthread=no
5176else
5177 cat >conftest.$ac_ext <<_ACEOF
5178/* confdefs.h. */
5179_ACEOF
5180cat confdefs.h >>conftest.$ac_ext
5181cat >>conftest.$ac_ext <<_ACEOF
5182/* end confdefs.h. */
5183
5184#include <pthread.h>
5185
5186void* routine(void* p){return NULL;}
5187
5188int main(){
5189 pthread_t p;
5190 if(pthread_create(&p,NULL,routine,NULL)!=0)
5191 return 1;
5192 (void)pthread_detach(p);
5193 return 0;
5194}
5195
5196_ACEOF
5197rm -f conftest$ac_exeext
5198if { (ac_try="$ac_link"
5199case "(($ac_try" in
5200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201 *) ac_try_echo=$ac_try;;
5202esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 (eval "$ac_link") 2>&5
5205 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5208 { (case "(($ac_try" in
5209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5210 *) ac_try_echo=$ac_try;;
5211esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213 (eval "$ac_try") 2>&5
5214 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005216 (exit $ac_status); }; }; then
5217 ac_cv_kthread=yes
5218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219 echo "$as_me: program exited with status $ac_status" >&5
5220echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005221sed 's/^/| /' conftest.$ac_ext >&5
5222
5223( exit $ac_status )
5224ac_cv_kthread=no
5225fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5227fi
5228
5229
5230CC="$ac_save_cc"
5231fi
5232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005233{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5234echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005235fi
5236
5237if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5238then
5239# -pthread, if available, provides the right #defines
5240# and linker options to make pthread_create available
5241# Some compilers won't report that they do not support -pthread,
5242# so we need to run a program to see whether it really made the
5243# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005244{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5245echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005246if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005247 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005248else
5249 ac_save_cc="$CC"
5250CC="$CC -pthread"
5251if test "$cross_compiling" = yes; then
5252 ac_cv_pthread=no
5253else
5254 cat >conftest.$ac_ext <<_ACEOF
5255/* confdefs.h. */
5256_ACEOF
5257cat confdefs.h >>conftest.$ac_ext
5258cat >>conftest.$ac_ext <<_ACEOF
5259/* end confdefs.h. */
5260
5261#include <pthread.h>
5262
5263void* routine(void* p){return NULL;}
5264
5265int main(){
5266 pthread_t p;
5267 if(pthread_create(&p,NULL,routine,NULL)!=0)
5268 return 1;
5269 (void)pthread_detach(p);
5270 return 0;
5271}
5272
5273_ACEOF
5274rm -f conftest$ac_exeext
5275if { (ac_try="$ac_link"
5276case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281 (eval "$ac_link") 2>&5
5282 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005284 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5285 { (case "(($ac_try" in
5286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5287 *) ac_try_echo=$ac_try;;
5288esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005290 (eval "$ac_try") 2>&5
5291 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005293 (exit $ac_status); }; }; then
5294 ac_cv_pthread=yes
5295else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296 echo "$as_me: program exited with status $ac_status" >&5
5297echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298sed 's/^/| /' conftest.$ac_ext >&5
5299
5300( exit $ac_status )
5301ac_cv_pthread=no
5302fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5304fi
5305
5306
5307CC="$ac_save_cc"
5308fi
5309
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005310{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5311echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312fi
5313
5314# If we have set a CC compiler flag for thread support then
5315# check if it works for CXX, too.
5316ac_cv_cxx_thread=no
5317if test ! -z "$CXX"
5318then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005319{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5320echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005321ac_save_cxx="$CXX"
5322
5323if test "$ac_cv_kpthread" = "yes"
5324then
5325 CXX="$CXX -Kpthread"
5326 ac_cv_cxx_thread=yes
5327elif test "$ac_cv_kthread" = "yes"
5328then
5329 CXX="$CXX -Kthread"
5330 ac_cv_cxx_thread=yes
5331elif test "$ac_cv_pthread" = "yes"
5332then
5333 CXX="$CXX -pthread"
5334 ac_cv_cxx_thread=yes
5335fi
5336
5337if test $ac_cv_cxx_thread = yes
5338then
5339 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5340 $CXX -c conftest.$ac_ext 2>&5
5341 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5342 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5343 then
5344 ac_cv_cxx_thread=yes
5345 else
5346 ac_cv_cxx_thread=no
5347 fi
5348 rm -fr conftest*
5349fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005350{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5351echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352fi
5353CXX="$ac_save_cxx"
5354
5355
5356# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005357{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5358echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005360 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361else
5362 cat >conftest.$ac_ext <<_ACEOF
5363/* confdefs.h. */
5364_ACEOF
5365cat confdefs.h >>conftest.$ac_ext
5366cat >>conftest.$ac_ext <<_ACEOF
5367/* end confdefs.h. */
5368#include <stdlib.h>
5369#include <stdarg.h>
5370#include <string.h>
5371#include <float.h>
5372
5373int
5374main ()
5375{
5376
5377 ;
5378 return 0;
5379}
5380_ACEOF
5381rm -f conftest.$ac_objext
5382if { (ac_try="$ac_compile"
5383case "(($ac_try" in
5384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5385 *) ac_try_echo=$ac_try;;
5386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388 (eval "$ac_compile") 2>conftest.er1
5389 ac_status=$?
5390 grep -v '^ *+' conftest.er1 >conftest.err
5391 rm -f conftest.er1
5392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394 (exit $ac_status); } && {
5395 test -z "$ac_c_werror_flag" ||
5396 test ! -s conftest.err
5397 } && test -s conftest.$ac_objext; then
5398 ac_cv_header_stdc=yes
5399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005400 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005401sed 's/^/| /' conftest.$ac_ext >&5
5402
5403 ac_cv_header_stdc=no
5404fi
5405
5406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407
5408if test $ac_cv_header_stdc = yes; then
5409 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5410 cat >conftest.$ac_ext <<_ACEOF
5411/* confdefs.h. */
5412_ACEOF
5413cat confdefs.h >>conftest.$ac_ext
5414cat >>conftest.$ac_ext <<_ACEOF
5415/* end confdefs.h. */
5416#include <string.h>
5417
5418_ACEOF
5419if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5420 $EGREP "memchr" >/dev/null 2>&1; then
5421 :
5422else
5423 ac_cv_header_stdc=no
5424fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005425rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005426
5427fi
5428
5429if test $ac_cv_header_stdc = yes; then
5430 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5431 cat >conftest.$ac_ext <<_ACEOF
5432/* confdefs.h. */
5433_ACEOF
5434cat confdefs.h >>conftest.$ac_ext
5435cat >>conftest.$ac_ext <<_ACEOF
5436/* end confdefs.h. */
5437#include <stdlib.h>
5438
5439_ACEOF
5440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5441 $EGREP "free" >/dev/null 2>&1; then
5442 :
5443else
5444 ac_cv_header_stdc=no
5445fi
Ronald Oussoren25967582009-09-06 10:00:26 +00005446rm -f -r conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005447
5448fi
5449
5450if test $ac_cv_header_stdc = yes; then
5451 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5452 if test "$cross_compiling" = yes; then
5453 :
5454else
5455 cat >conftest.$ac_ext <<_ACEOF
5456/* confdefs.h. */
5457_ACEOF
5458cat confdefs.h >>conftest.$ac_ext
5459cat >>conftest.$ac_ext <<_ACEOF
5460/* end confdefs.h. */
5461#include <ctype.h>
5462#include <stdlib.h>
5463#if ((' ' & 0x0FF) == 0x020)
5464# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5465# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5466#else
5467# define ISLOWER(c) \
5468 (('a' <= (c) && (c) <= 'i') \
5469 || ('j' <= (c) && (c) <= 'r') \
5470 || ('s' <= (c) && (c) <= 'z'))
5471# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5472#endif
5473
5474#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5475int
5476main ()
5477{
5478 int i;
5479 for (i = 0; i < 256; i++)
5480 if (XOR (islower (i), ISLOWER (i))
5481 || toupper (i) != TOUPPER (i))
5482 return 2;
5483 return 0;
5484}
5485_ACEOF
5486rm -f conftest$ac_exeext
5487if { (ac_try="$ac_link"
5488case "(($ac_try" in
5489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5490 *) ac_try_echo=$ac_try;;
5491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 (eval "$ac_link") 2>&5
5494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5497 { (case "(($ac_try" in
5498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5499 *) ac_try_echo=$ac_try;;
5500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502 (eval "$ac_try") 2>&5
5503 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005505 (exit $ac_status); }; }; then
5506 :
5507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005508 echo "$as_me: program exited with status $ac_status" >&5
5509echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510sed 's/^/| /' conftest.$ac_ext >&5
5511
5512( exit $ac_status )
5513ac_cv_header_stdc=no
5514fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5516fi
5517
5518
5519fi
5520fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005521{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5522echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523if test $ac_cv_header_stdc = yes; then
5524
5525cat >>confdefs.h <<\_ACEOF
5526#define STDC_HEADERS 1
5527_ACEOF
5528
5529fi
5530
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5542 inttypes.h stdint.h unistd.h
5543do
5544as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5545{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5546echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5547if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5548 echo $ECHO_N "(cached) $ECHO_C" >&6
5549else
5550 cat >conftest.$ac_ext <<_ACEOF
5551/* confdefs.h. */
5552_ACEOF
5553cat confdefs.h >>conftest.$ac_ext
5554cat >>conftest.$ac_ext <<_ACEOF
5555/* end confdefs.h. */
5556$ac_includes_default
5557
5558#include <$ac_header>
5559_ACEOF
5560rm -f conftest.$ac_objext
5561if { (ac_try="$ac_compile"
5562case "(($ac_try" in
5563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5564 *) ac_try_echo=$ac_try;;
5565esac
5566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5567 (eval "$ac_compile") 2>conftest.er1
5568 ac_status=$?
5569 grep -v '^ *+' conftest.er1 >conftest.err
5570 rm -f conftest.er1
5571 cat conftest.err >&5
5572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5573 (exit $ac_status); } && {
5574 test -z "$ac_c_werror_flag" ||
5575 test ! -s conftest.err
5576 } && test -s conftest.$ac_objext; then
5577 eval "$as_ac_Header=yes"
5578else
5579 echo "$as_me: failed program was:" >&5
5580sed 's/^/| /' conftest.$ac_ext >&5
5581
5582 eval "$as_ac_Header=no"
5583fi
5584
5585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5586fi
5587ac_res=`eval echo '${'$as_ac_Header'}'`
5588 { echo "$as_me:$LINENO: result: $ac_res" >&5
5589echo "${ECHO_T}$ac_res" >&6; }
5590if test `eval echo '${'$as_ac_Header'}'` = yes; then
5591 cat >>confdefs.h <<_ACEOF
5592#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5593_ACEOF
5594
5595fi
5596
5597done
5598
5599
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005600
Martin v. Löwis11437992002-04-12 09:54:03 +00005601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
Anthony Baxter8a560de2004-10-13 15:30:56 +00005636
Martin v. Löwisc3001752005-01-23 09:27:24 +00005637
Martin v. Löwis11017b12006-01-14 18:12:57 +00005638
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005639
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005640
5641
5642
5643
5644
5645
5646
5647
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005648
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005649
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005650
5651
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005652
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005653
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005654for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5655fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005656ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005657shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005658unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005659sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5660sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005661sys/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 +00005662sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005663sys/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 +00005664sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005665bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005666do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005667as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005669 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005671if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005673fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005674ac_res=`eval echo '${'$as_ac_Header'}'`
5675 { echo "$as_me:$LINENO: result: $ac_res" >&5
5676echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005677else
Martin v. Löwis11437992002-04-12 09:54:03 +00005678 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005679{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5680echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005682/* confdefs.h. */
5683_ACEOF
5684cat confdefs.h >>conftest.$ac_ext
5685cat >>conftest.$ac_ext <<_ACEOF
5686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005687$ac_includes_default
5688#include <$ac_header>
5689_ACEOF
5690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691if { (ac_try="$ac_compile"
5692case "(($ac_try" in
5693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5694 *) ac_try_echo=$ac_try;;
5695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005699 grep -v '^ *+' conftest.er1 >conftest.err
5700 rm -f conftest.er1
5701 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703 (exit $ac_status); } && {
5704 test -z "$ac_c_werror_flag" ||
5705 test ! -s conftest.err
5706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005707 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005710sed 's/^/| /' conftest.$ac_ext >&5
5711
Martin v. Löwiseba40652007-08-30 20:10:57 +00005712 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714
5715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005716{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5717echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005718
5719# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005720{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5721echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005723/* confdefs.h. */
5724_ACEOF
5725cat confdefs.h >>conftest.$ac_ext
5726cat >>conftest.$ac_ext <<_ACEOF
5727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005728#include <$ac_header>
5729_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730if { (ac_try="$ac_cpp conftest.$ac_ext"
5731case "(($ac_try" in
5732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733 *) ac_try_echo=$ac_try;;
5734esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005738 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 rm -f conftest.er1
5740 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005742 (exit $ac_status); } >/dev/null && {
5743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5744 test ! -s conftest.err
5745 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005746 ac_header_preproc=yes
5747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005749sed 's/^/| /' conftest.$ac_ext >&5
5750
Martin v. Löwis11437992002-04-12 09:54:03 +00005751 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005753
Martin v. Löwis11437992002-04-12 09:54:03 +00005754rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005755{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5756echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005757
5758# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5760 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005761 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5762echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5763 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5764echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005765 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005766 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005767 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005768 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5769echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5770 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5771echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5772 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5773echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5774 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5775echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5776 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5777echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5778 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5779echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005780 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005781## -------------------------------------- ##
5782## Report this to http://bugs.python.org/ ##
5783## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005784_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005785 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005786 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005787esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005788{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5789echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005790if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005792else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005793 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005795ac_res=`eval echo '${'$as_ac_Header'}'`
5796 { echo "$as_me:$LINENO: result: $ac_res" >&5
5797echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005798
5799fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005800if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005802#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005803_ACEOF
5804
5805fi
5806
Guido van Rossum627b2d71993-12-24 10:39:16 +00005807done
5808
Martin v. Löwis11437992002-04-12 09:54:03 +00005809
5810
5811
5812
5813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005815for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005816 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5817{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5818echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005819if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005820 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005821else
Martin v. Löwis11437992002-04-12 09:54:03 +00005822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005823/* confdefs.h. */
5824_ACEOF
5825cat confdefs.h >>conftest.$ac_ext
5826cat >>conftest.$ac_ext <<_ACEOF
5827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005828#include <sys/types.h>
5829#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005830
Martin v. Löwis11437992002-04-12 09:54:03 +00005831int
5832main ()
5833{
5834if ((DIR *) 0)
5835return 0;
5836 ;
5837 return 0;
5838}
5839_ACEOF
5840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841if { (ac_try="$ac_compile"
5842case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 grep -v '^ *+' conftest.er1 >conftest.err
5850 rm -f conftest.er1
5851 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 (exit $ac_status); } && {
5854 test -z "$ac_c_werror_flag" ||
5855 test ! -s conftest.err
5856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005857 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005860sed 's/^/| /' conftest.$ac_ext >&5
5861
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005864
5865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005866fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005867ac_res=`eval echo '${'$as_ac_Header'}'`
5868 { echo "$as_me:$LINENO: result: $ac_res" >&5
5869echo "${ECHO_T}$ac_res" >&6; }
5870if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005871 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005872#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005873_ACEOF
5874
5875ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005876fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878done
5879# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5880if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005881 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5882echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005883if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005885else
Martin v. Löwis11437992002-04-12 09:54:03 +00005886 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005893
Martin v. Löwiseba40652007-08-30 20:10:57 +00005894/* Override any GCC internal prototype to avoid an error.
5895 Use char because int might match the return type of a GCC
5896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005897#ifdef __cplusplus
5898extern "C"
5899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005900char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005901int
5902main ()
5903{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005904return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ;
5906 return 0;
5907}
5908_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005909for ac_lib in '' dir; do
5910 if test -z "$ac_lib"; then
5911 ac_res="none required"
5912 else
5913 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 fi
5916 rm -f conftest.$ac_objext conftest$ac_exeext
5917if { (ac_try="$ac_link"
5918case "(($ac_try" in
5919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5920 *) ac_try_echo=$ac_try;;
5921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005923 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005924 ac_status=$?
5925 grep -v '^ *+' conftest.er1 >conftest.err
5926 rm -f conftest.er1
5927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005929 (exit $ac_status); } && {
5930 test -z "$ac_c_werror_flag" ||
5931 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005932 } && test -s conftest$ac_exeext &&
5933 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005934 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005935else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005936 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005937sed 's/^/| /' conftest.$ac_ext >&5
5938
Martin v. Löwiseba40652007-08-30 20:10:57 +00005939
Brett Cannon19fab762007-06-02 03:02:29 +00005940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005941
5942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5943 conftest$ac_exeext
5944 if test "${ac_cv_search_opendir+set}" = set; then
5945 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947done
5948if test "${ac_cv_search_opendir+set}" = set; then
5949 :
5950else
5951 ac_cv_search_opendir=no
5952fi
5953rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005954LIBS=$ac_func_search_save_LIBS
5955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005956{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5957echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958ac_res=$ac_cv_search_opendir
5959if test "$ac_res" != no; then
5960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
Michael W. Hudson54241132001-12-07 15:38:26 +00005964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005965 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5966echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005967if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005969else
5970 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005972/* confdefs.h. */
5973_ACEOF
5974cat confdefs.h >>conftest.$ac_ext
5975cat >>conftest.$ac_ext <<_ACEOF
5976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005977
Martin v. Löwiseba40652007-08-30 20:10:57 +00005978/* Override any GCC internal prototype to avoid an error.
5979 Use char because int might match the return type of a GCC
5980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005981#ifdef __cplusplus
5982extern "C"
5983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005984char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005985int
5986main ()
5987{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005988return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005989 ;
5990 return 0;
5991}
5992_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993for ac_lib in '' x; do
5994 if test -z "$ac_lib"; then
5995 ac_res="none required"
5996 else
5997 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005998 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999 fi
6000 rm -f conftest.$ac_objext conftest$ac_exeext
6001if { (ac_try="$ac_link"
6002case "(($ac_try" in
6003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6004 *) ac_try_echo=$ac_try;;
6005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006007 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006008 ac_status=$?
6009 grep -v '^ *+' conftest.er1 >conftest.err
6010 rm -f conftest.er1
6011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006013 (exit $ac_status); } && {
6014 test -z "$ac_c_werror_flag" ||
6015 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006016 } && test -s conftest$ac_exeext &&
6017 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006020 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006021sed 's/^/| /' conftest.$ac_ext >&5
6022
Martin v. Löwiseba40652007-08-30 20:10:57 +00006023
Brett Cannon19fab762007-06-02 03:02:29 +00006024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025
6026rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6027 conftest$ac_exeext
6028 if test "${ac_cv_search_opendir+set}" = set; then
6029 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006031done
6032if test "${ac_cv_search_opendir+set}" = set; then
6033 :
6034else
6035 ac_cv_search_opendir=no
6036fi
6037rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006038LIBS=$ac_func_search_save_LIBS
6039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006040{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6041echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006042ac_res=$ac_cv_search_opendir
6043if test "$ac_res" != no; then
6044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046fi
6047
6048fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006050{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6051echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006053 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006054else
6055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006056/* confdefs.h. */
6057_ACEOF
6058cat confdefs.h >>conftest.$ac_ext
6059cat >>conftest.$ac_ext <<_ACEOF
6060/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006062int
6063main ()
6064{
6065return makedev(0, 0);
6066 ;
6067 return 0;
6068}
6069_ACEOF
6070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006071if { (ac_try="$ac_link"
6072case "(($ac_try" in
6073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6074 *) ac_try_echo=$ac_try;;
6075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006079 grep -v '^ *+' conftest.er1 >conftest.err
6080 rm -f conftest.er1
6081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083 (exit $ac_status); } && {
6084 test -z "$ac_c_werror_flag" ||
6085 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006086 } && test -s conftest$ac_exeext &&
6087 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 ac_cv_header_sys_types_h_makedev=yes
6089else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006091sed 's/^/| /' conftest.$ac_ext >&5
6092
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006095
6096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098
6099fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6101echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006102
6103if test $ac_cv_header_sys_types_h_makedev = no; then
6104if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006105 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6106echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006108 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006110{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6111echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006112else
6113 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006114{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6115echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* confdefs.h. */
6118_ACEOF
6119cat confdefs.h >>conftest.$ac_ext
6120cat >>conftest.$ac_ext <<_ACEOF
6121/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006122$ac_includes_default
6123#include <sys/mkdev.h>
6124_ACEOF
6125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126if { (ac_try="$ac_compile"
6127case "(($ac_try" in
6128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6129 *) ac_try_echo=$ac_try;;
6130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006134 grep -v '^ *+' conftest.er1 >conftest.err
6135 rm -f conftest.er1
6136 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 (exit $ac_status); } && {
6139 test -z "$ac_c_werror_flag" ||
6140 test ! -s conftest.err
6141 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142 ac_header_compiler=yes
6143else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006145sed 's/^/| /' conftest.$ac_ext >&5
6146
Martin v. Löwiseba40652007-08-30 20:10:57 +00006147 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006149
6150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006151{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6152echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006153
6154# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006155{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6156echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006158/* confdefs.h. */
6159_ACEOF
6160cat confdefs.h >>conftest.$ac_ext
6161cat >>conftest.$ac_ext <<_ACEOF
6162/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163#include <sys/mkdev.h>
6164_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165if { (ac_try="$ac_cpp conftest.$ac_ext"
6166case "(($ac_try" in
6167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6168 *) ac_try_echo=$ac_try;;
6169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006171 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006173 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 rm -f conftest.er1
6175 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006177 (exit $ac_status); } >/dev/null && {
6178 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6179 test ! -s conftest.err
6180 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181 ac_header_preproc=yes
6182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006184sed 's/^/| /' conftest.$ac_ext >&5
6185
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186 ac_header_preproc=no
6187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006190{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6191echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192
6193# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006194case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6195 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006196 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6197echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6198 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6199echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006200 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006201 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006202 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006203 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6204echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6205 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6206echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6207 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6208echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6209 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6210echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6211 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6212echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6213 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6214echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006215 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006216## -------------------------------------- ##
6217## Report this to http://bugs.python.org/ ##
6218## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006219_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006220 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006221 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006223{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6224echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227else
6228 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006230{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6231echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006234if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235
6236cat >>confdefs.h <<\_ACEOF
6237#define MAJOR_IN_MKDEV 1
6238_ACEOF
6239
6240fi
6241
6242
6243
6244 if test $ac_cv_header_sys_mkdev_h = no; then
6245 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6247echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006249 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006251{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6252echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253else
6254 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006255{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6256echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006258/* confdefs.h. */
6259_ACEOF
6260cat confdefs.h >>conftest.$ac_ext
6261cat >>conftest.$ac_ext <<_ACEOF
6262/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263$ac_includes_default
6264#include <sys/sysmacros.h>
6265_ACEOF
6266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267if { (ac_try="$ac_compile"
6268case "(($ac_try" in
6269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6270 *) ac_try_echo=$ac_try;;
6271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006275 grep -v '^ *+' conftest.er1 >conftest.err
6276 rm -f conftest.er1
6277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 (exit $ac_status); } && {
6280 test -z "$ac_c_werror_flag" ||
6281 test ! -s conftest.err
6282 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283 ac_header_compiler=yes
6284else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006286sed 's/^/| /' conftest.$ac_ext >&5
6287
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290
6291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006292{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6293echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006294
6295# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006296{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6297echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* confdefs.h. */
6300_ACEOF
6301cat confdefs.h >>conftest.$ac_ext
6302cat >>conftest.$ac_ext <<_ACEOF
6303/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304#include <sys/sysmacros.h>
6305_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306if { (ac_try="$ac_cpp conftest.$ac_ext"
6307case "(($ac_try" in
6308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6309 *) ac_try_echo=$ac_try;;
6310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006312 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006313 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006314 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315 rm -f conftest.er1
6316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318 (exit $ac_status); } >/dev/null && {
6319 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6320 test ! -s conftest.err
6321 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322 ac_header_preproc=yes
6323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006325sed 's/^/| /' conftest.$ac_ext >&5
6326
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327 ac_header_preproc=no
6328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006331{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6332echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333
6334# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006335case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6336 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6338echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6340echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006341 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006342 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006343 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006344 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6345echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6346 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6347echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6348 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6349echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6350 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6351echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6352 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6353echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6354 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6355echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006357## -------------------------------------- ##
6358## Report this to http://bugs.python.org/ ##
6359## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006360_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006361 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006362 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006364{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6365echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006366if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006368else
6369 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006371{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6372echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006373
6374fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006375if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006376
6377cat >>confdefs.h <<\_ACEOF
6378#define MAJOR_IN_SYSMACROS 1
6379_ACEOF
6380
6381fi
6382
6383
6384 fi
6385fi
6386
Michael W. Hudson54241132001-12-07 15:38:26 +00006387
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006389
6390for ac_header in term.h
6391do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006392as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6393{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6394echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006395if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006396 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397else
6398 cat >conftest.$ac_ext <<_ACEOF
6399/* confdefs.h. */
6400_ACEOF
6401cat confdefs.h >>conftest.$ac_ext
6402cat >>conftest.$ac_ext <<_ACEOF
6403/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006405#ifdef HAVE_CURSES_H
6406#include <curses.h>
6407#endif
6408
6409
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006410#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006411_ACEOF
6412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413if { (ac_try="$ac_compile"
6414case "(($ac_try" in
6415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6416 *) ac_try_echo=$ac_try;;
6417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420 ac_status=$?
6421 grep -v '^ *+' conftest.er1 >conftest.err
6422 rm -f conftest.er1
6423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006425 (exit $ac_status); } && {
6426 test -z "$ac_c_werror_flag" ||
6427 test ! -s conftest.err
6428 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006429 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006430else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006431 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006432sed 's/^/| /' conftest.$ac_ext >&5
6433
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436
6437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006439ac_res=`eval echo '${'$as_ac_Header'}'`
6440 { echo "$as_me:$LINENO: result: $ac_res" >&5
6441echo "${ECHO_T}$ac_res" >&6; }
6442if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006443 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006444#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006445_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006446
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006447fi
6448
6449done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006450
6451
Martin v. Löwis11017b12006-01-14 18:12:57 +00006452# On Linux, netlink.h requires asm/types.h
6453
6454for ac_header in linux/netlink.h
6455do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006456as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6457{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6458echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006460 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006461else
6462 cat >conftest.$ac_ext <<_ACEOF
6463/* confdefs.h. */
6464_ACEOF
6465cat confdefs.h >>conftest.$ac_ext
6466cat >>conftest.$ac_ext <<_ACEOF
6467/* end confdefs.h. */
6468
6469#ifdef HAVE_ASM_TYPES_H
6470#include <asm/types.h>
6471#endif
6472#ifdef HAVE_SYS_SOCKET_H
6473#include <sys/socket.h>
6474#endif
6475
6476
6477#include <$ac_header>
6478_ACEOF
6479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480if { (ac_try="$ac_compile"
6481case "(($ac_try" in
6482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6483 *) ac_try_echo=$ac_try;;
6484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487 ac_status=$?
6488 grep -v '^ *+' conftest.er1 >conftest.err
6489 rm -f conftest.er1
6490 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006492 (exit $ac_status); } && {
6493 test -z "$ac_c_werror_flag" ||
6494 test ! -s conftest.err
6495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006496 eval "$as_ac_Header=yes"
6497else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006498 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006499sed 's/^/| /' conftest.$ac_ext >&5
6500
Martin v. Löwiseba40652007-08-30 20:10:57 +00006501 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006503
6504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006505fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006506ac_res=`eval echo '${'$as_ac_Header'}'`
6507 { echo "$as_me:$LINENO: result: $ac_res" >&5
6508echo "${ECHO_T}$ac_res" >&6; }
6509if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006510 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006512_ACEOF
6513
6514fi
6515
6516done
6517
6518
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006520was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006521{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6522echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006524/* confdefs.h. */
6525_ACEOF
6526cat confdefs.h >>conftest.$ac_ext
6527cat >>conftest.$ac_ext <<_ACEOF
6528/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006533 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006534 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006535else
Martin v. Löwis11437992002-04-12 09:54:03 +00006536
6537
6538cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006541
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006542
Guido van Rossum627b2d71993-12-24 10:39:16 +00006543fi
Ronald Oussoren25967582009-09-06 10:00:26 +00006544rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006545
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006546{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6547echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006548
Neal Norwitz11690112002-07-30 01:08:28 +00006549# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006550{ echo "$as_me:$LINENO: checking for makedev" >&5
6551echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006552cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006553/* confdefs.h. */
6554_ACEOF
6555cat confdefs.h >>conftest.$ac_ext
6556cat >>conftest.$ac_ext <<_ACEOF
6557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006558#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006559int
6560main ()
6561{
6562 makedev(0, 0)
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006568if { (ac_try="$ac_link"
6569case "(($ac_try" in
6570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6571 *) ac_try_echo=$ac_try;;
6572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006574 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 grep -v '^ *+' conftest.er1 >conftest.err
6577 rm -f conftest.er1
6578 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580 (exit $ac_status); } && {
6581 test -z "$ac_c_werror_flag" ||
6582 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006583 } && test -s conftest$ac_exeext &&
6584 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006585 ac_cv_has_makedev=yes
6586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006588sed 's/^/| /' conftest.$ac_ext >&5
6589
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006591fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592
6593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006594 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006595if test "$ac_cv_has_makedev" = "no"; then
6596 # we didn't link, try if _OSF_SOURCE will allow us to link
6597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006598/* confdefs.h. */
6599_ACEOF
6600cat confdefs.h >>conftest.$ac_ext
6601cat >>conftest.$ac_ext <<_ACEOF
6602/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006603
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006604#define _OSF_SOURCE 1
6605#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006606
Neal Norwitz11690112002-07-30 01:08:28 +00006607int
6608main ()
6609{
6610 makedev(0, 0)
6611 ;
6612 return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616if { (ac_try="$ac_link"
6617case "(($ac_try" in
6618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6619 *) ac_try_echo=$ac_try;;
6620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006622 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006624 grep -v '^ *+' conftest.er1 >conftest.err
6625 rm -f conftest.er1
6626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006628 (exit $ac_status); } && {
6629 test -z "$ac_c_werror_flag" ||
6630 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006631 } && test -s conftest$ac_exeext &&
6632 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006633 ac_cv_has_makedev=yes
6634else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006636sed 's/^/| /' conftest.$ac_ext >&5
6637
Martin v. Löwiseba40652007-08-30 20:10:57 +00006638 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640
6641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006642 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006643 if test "$ac_cv_has_makedev" = "yes"; then
6644
6645cat >>confdefs.h <<\_ACEOF
6646#define _OSF_SOURCE 1
6647_ACEOF
6648
6649 fi
6650fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006651{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6652echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006653if test "$ac_cv_has_makedev" = "yes"; then
6654
6655cat >>confdefs.h <<\_ACEOF
6656#define HAVE_MAKEDEV 1
6657_ACEOF
6658
6659fi
6660
Martin v. Löwis399a6892002-10-04 10:22:02 +00006661# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6662# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6663# defined, but the compiler does not support pragma redefine_extname,
6664# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6665# structures (such as rlimit64) without declaring them. As a
6666# work-around, disable LFS on such configurations
6667
6668use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006669{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6670echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006677
6678#define _LARGEFILE_SOURCE 1
6679#define _FILE_OFFSET_BITS 64
6680#include <sys/resource.h>
6681
Martin v. Löwis399a6892002-10-04 10:22:02 +00006682int
6683main ()
6684{
6685struct rlimit foo;
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006691if { (ac_try="$ac_compile"
6692case "(($ac_try" in
6693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6694 *) ac_try_echo=$ac_try;;
6695esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006699 grep -v '^ *+' conftest.er1 >conftest.err
6700 rm -f conftest.er1
6701 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703 (exit $ac_status); } && {
6704 test -z "$ac_c_werror_flag" ||
6705 test ! -s conftest.err
6706 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006707 sol_lfs_bug=no
6708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006710sed 's/^/| /' conftest.$ac_ext >&5
6711
Martin v. Löwiseba40652007-08-30 20:10:57 +00006712 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006714
6715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006716{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6717echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006718if test "$sol_lfs_bug" = "yes"; then
6719 use_lfs=no
6720fi
6721
6722if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006723# Two defines needed to enable largefile support on various platforms
6724# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006725
Martin v. Löwis11437992002-04-12 09:54:03 +00006726cat >>confdefs.h <<\_ACEOF
6727#define _LARGEFILE_SOURCE 1
6728_ACEOF
6729
6730
6731cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006732#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006733_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006734
Martin v. Löwis399a6892002-10-04 10:22:02 +00006735fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006736
Guido van Rossum84e7b241996-08-19 21:59:00 +00006737# Add some code to confdefs.h so that the test for off_t works on SCO
6738cat >> confdefs.h <<\EOF
6739#if defined(SCO_DS)
6740#undef _OFF_T
6741#endif
6742EOF
6743
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006745{ echo "$as_me:$LINENO: checking for mode_t" >&5
6746echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006747if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006748 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006749else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750 cat >conftest.$ac_ext <<_ACEOF
6751/* confdefs.h. */
6752_ACEOF
6753cat confdefs.h >>conftest.$ac_ext
6754cat >>conftest.$ac_ext <<_ACEOF
6755/* end confdefs.h. */
6756$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006757typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006758int
6759main ()
6760{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006761if ((ac__type_new_ *) 0)
6762 return 0;
6763if (sizeof (ac__type_new_))
6764 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006765 ;
6766 return 0;
6767}
6768_ACEOF
6769rm -f conftest.$ac_objext
6770if { (ac_try="$ac_compile"
6771case "(($ac_try" in
6772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6773 *) ac_try_echo=$ac_try;;
6774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006776 (eval "$ac_compile") 2>conftest.er1
6777 ac_status=$?
6778 grep -v '^ *+' conftest.er1 >conftest.err
6779 rm -f conftest.er1
6780 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782 (exit $ac_status); } && {
6783 test -z "$ac_c_werror_flag" ||
6784 test ! -s conftest.err
6785 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006786 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006789sed 's/^/| /' conftest.$ac_ext >&5
6790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006791 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793
6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006795fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006796{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6797echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6798if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006800else
Martin v. Löwis11437992002-04-12 09:54:03 +00006801
6802cat >>confdefs.h <<_ACEOF
6803#define mode_t int
6804_ACEOF
6805
6806fi
6807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006808{ echo "$as_me:$LINENO: checking for off_t" >&5
6809echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006810if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006812else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006813 cat >conftest.$ac_ext <<_ACEOF
6814/* confdefs.h. */
6815_ACEOF
6816cat confdefs.h >>conftest.$ac_ext
6817cat >>conftest.$ac_ext <<_ACEOF
6818/* end confdefs.h. */
6819$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006820typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006821int
6822main ()
6823{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006824if ((ac__type_new_ *) 0)
6825 return 0;
6826if (sizeof (ac__type_new_))
6827 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006828 ;
6829 return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
6833if { (ac_try="$ac_compile"
6834case "(($ac_try" in
6835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836 *) ac_try_echo=$ac_try;;
6837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006839 (eval "$ac_compile") 2>conftest.er1
6840 ac_status=$?
6841 grep -v '^ *+' conftest.er1 >conftest.err
6842 rm -f conftest.er1
6843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006845 (exit $ac_status); } && {
6846 test -z "$ac_c_werror_flag" ||
6847 test ! -s conftest.err
6848 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006849 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006851 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006852sed 's/^/| /' conftest.$ac_ext >&5
6853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006854 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856
6857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006858fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6860echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6861if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006862 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006863else
Martin v. Löwis11437992002-04-12 09:54:03 +00006864
6865cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006866#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006867_ACEOF
6868
6869fi
6870
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871{ echo "$as_me:$LINENO: checking for pid_t" >&5
6872echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006873if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006874 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876 cat >conftest.$ac_ext <<_ACEOF
6877/* confdefs.h. */
6878_ACEOF
6879cat confdefs.h >>conftest.$ac_ext
6880cat >>conftest.$ac_ext <<_ACEOF
6881/* end confdefs.h. */
6882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006883typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006884int
6885main ()
6886{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006887if ((ac__type_new_ *) 0)
6888 return 0;
6889if (sizeof (ac__type_new_))
6890 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006891 ;
6892 return 0;
6893}
6894_ACEOF
6895rm -f conftest.$ac_objext
6896if { (ac_try="$ac_compile"
6897case "(($ac_try" in
6898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6899 *) ac_try_echo=$ac_try;;
6900esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006902 (eval "$ac_compile") 2>conftest.er1
6903 ac_status=$?
6904 grep -v '^ *+' conftest.er1 >conftest.err
6905 rm -f conftest.er1
6906 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006908 (exit $ac_status); } && {
6909 test -z "$ac_c_werror_flag" ||
6910 test ! -s conftest.err
6911 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006912 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006915sed 's/^/| /' conftest.$ac_ext >&5
6916
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006917 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006919
6920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006921fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6923echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6924if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926else
Martin v. Löwis11437992002-04-12 09:54:03 +00006927
6928cat >>confdefs.h <<_ACEOF
6929#define pid_t int
6930_ACEOF
6931
6932fi
6933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006934{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6935echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006936if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006938else
6939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006940/* confdefs.h. */
6941_ACEOF
6942cat confdefs.h >>conftest.$ac_ext
6943cat >>conftest.$ac_ext <<_ACEOF
6944/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006945#include <sys/types.h>
6946#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948int
6949main ()
6950{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 ;
6953 return 0;
6954}
6955_ACEOF
6956rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957if { (ac_try="$ac_compile"
6958case "(($ac_try" in
6959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6960 *) ac_try_echo=$ac_try;;
6961esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006965 grep -v '^ *+' conftest.er1 >conftest.err
6966 rm -f conftest.er1
6967 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 (exit $ac_status); } && {
6970 test -z "$ac_c_werror_flag" ||
6971 test ! -s conftest.err
6972 } && test -s conftest.$ac_objext; then
6973 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006974else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006976sed 's/^/| /' conftest.$ac_ext >&5
6977
Martin v. Löwiseba40652007-08-30 20:10:57 +00006978 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980
6981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006983{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6984echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006989
Michael W. Hudson54241132001-12-07 15:38:26 +00006990
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006991{ echo "$as_me:$LINENO: checking for size_t" >&5
6992echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006993if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006996 cat >conftest.$ac_ext <<_ACEOF
6997/* confdefs.h. */
6998_ACEOF
6999cat confdefs.h >>conftest.$ac_ext
7000cat >>conftest.$ac_ext <<_ACEOF
7001/* end confdefs.h. */
7002$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007003typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007004int
7005main ()
7006{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007007if ((ac__type_new_ *) 0)
7008 return 0;
7009if (sizeof (ac__type_new_))
7010 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007011 ;
7012 return 0;
7013}
7014_ACEOF
7015rm -f conftest.$ac_objext
7016if { (ac_try="$ac_compile"
7017case "(($ac_try" in
7018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7019 *) ac_try_echo=$ac_try;;
7020esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007022 (eval "$ac_compile") 2>conftest.er1
7023 ac_status=$?
7024 grep -v '^ *+' conftest.er1 >conftest.err
7025 rm -f conftest.er1
7026 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007028 (exit $ac_status); } && {
7029 test -z "$ac_c_werror_flag" ||
7030 test ! -s conftest.err
7031 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007032 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007035sed 's/^/| /' conftest.$ac_ext >&5
7036
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007037 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039
7040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007041fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007042{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7043echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7044if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046else
Martin v. Löwis11437992002-04-12 09:54:03 +00007047
7048cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007049#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007050_ACEOF
7051
7052fi
7053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007054{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7055echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007056if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007058else
7059 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007060/* confdefs.h. */
7061_ACEOF
7062cat confdefs.h >>conftest.$ac_ext
7063cat >>conftest.$ac_ext <<_ACEOF
7064/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007065#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
7067_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007069 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070 ac_cv_type_uid_t=yes
7071else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072 ac_cv_type_uid_t=no
7073fi
Ronald Oussoren25967582009-09-06 10:00:26 +00007074rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007077{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7078echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007079if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081cat >>confdefs.h <<\_ACEOF
7082#define uid_t int
7083_ACEOF
7084
7085
7086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007089
7090fi
7091
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007092
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007093 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7094echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007095if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007096 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007097else
7098 ac_cv_c_uint32_t=no
7099 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7100 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7101 cat >conftest.$ac_ext <<_ACEOF
7102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
7107$ac_includes_default
7108int
7109main ()
7110{
7111static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7112test_array [0] = 0
7113
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118rm -f conftest.$ac_objext
7119if { (ac_try="$ac_compile"
7120case "(($ac_try" in
7121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7122 *) ac_try_echo=$ac_try;;
7123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007125 (eval "$ac_compile") 2>conftest.er1
7126 ac_status=$?
7127 grep -v '^ *+' conftest.er1 >conftest.err
7128 rm -f conftest.er1
7129 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007131 (exit $ac_status); } && {
7132 test -z "$ac_c_werror_flag" ||
7133 test ! -s conftest.err
7134 } && test -s conftest.$ac_objext; then
7135 case $ac_type in
7136 uint32_t) ac_cv_c_uint32_t=yes ;;
7137 *) ac_cv_c_uint32_t=$ac_type ;;
7138esac
7139
7140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007141 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007142sed 's/^/| /' conftest.$ac_ext >&5
7143
7144
7145fi
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7148 test "$ac_cv_c_uint32_t" != no && break
7149 done
7150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007151{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7152echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007153 case $ac_cv_c_uint32_t in #(
7154 no|yes) ;; #(
7155 *)
7156
7157cat >>confdefs.h <<\_ACEOF
7158#define _UINT32_T 1
7159_ACEOF
7160
7161
7162cat >>confdefs.h <<_ACEOF
7163#define uint32_t $ac_cv_c_uint32_t
7164_ACEOF
7165;;
7166 esac
7167
7168
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007169 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7170echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007171if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007172 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007173else
7174 ac_cv_c_uint64_t=no
7175 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7176 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7177 cat >conftest.$ac_ext <<_ACEOF
7178/* confdefs.h. */
7179_ACEOF
7180cat confdefs.h >>conftest.$ac_ext
7181cat >>conftest.$ac_ext <<_ACEOF
7182/* end confdefs.h. */
7183$ac_includes_default
7184int
7185main ()
7186{
7187static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7188test_array [0] = 0
7189
7190 ;
7191 return 0;
7192}
7193_ACEOF
7194rm -f conftest.$ac_objext
7195if { (ac_try="$ac_compile"
7196case "(($ac_try" in
7197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7198 *) ac_try_echo=$ac_try;;
7199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007201 (eval "$ac_compile") 2>conftest.er1
7202 ac_status=$?
7203 grep -v '^ *+' conftest.er1 >conftest.err
7204 rm -f conftest.er1
7205 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007207 (exit $ac_status); } && {
7208 test -z "$ac_c_werror_flag" ||
7209 test ! -s conftest.err
7210 } && test -s conftest.$ac_objext; then
7211 case $ac_type in
7212 uint64_t) ac_cv_c_uint64_t=yes ;;
7213 *) ac_cv_c_uint64_t=$ac_type ;;
7214esac
7215
7216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007217 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
7220
7221fi
7222
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7224 test "$ac_cv_c_uint64_t" != no && break
7225 done
7226fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007227{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7228echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007229 case $ac_cv_c_uint64_t in #(
7230 no|yes) ;; #(
7231 *)
7232
7233cat >>confdefs.h <<\_ACEOF
7234#define _UINT64_T 1
7235_ACEOF
7236
7237
7238cat >>confdefs.h <<_ACEOF
7239#define uint64_t $ac_cv_c_uint64_t
7240_ACEOF
7241;;
7242 esac
7243
7244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007245 { echo "$as_me:$LINENO: checking for int32_t" >&5
7246echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007247if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007248 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007249else
7250 ac_cv_c_int32_t=no
7251 for ac_type in 'int32_t' 'int' 'long int' \
7252 'long long int' 'short int' 'signed char'; do
7253 cat >conftest.$ac_ext <<_ACEOF
7254/* confdefs.h. */
7255_ACEOF
7256cat confdefs.h >>conftest.$ac_ext
7257cat >>conftest.$ac_ext <<_ACEOF
7258/* end confdefs.h. */
7259$ac_includes_default
7260int
7261main ()
7262{
7263static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7264test_array [0] = 0
7265
7266 ;
7267 return 0;
7268}
7269_ACEOF
7270rm -f conftest.$ac_objext
7271if { (ac_try="$ac_compile"
7272case "(($ac_try" in
7273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7274 *) ac_try_echo=$ac_try;;
7275esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007277 (eval "$ac_compile") 2>conftest.er1
7278 ac_status=$?
7279 grep -v '^ *+' conftest.er1 >conftest.err
7280 rm -f conftest.er1
7281 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007283 (exit $ac_status); } && {
7284 test -z "$ac_c_werror_flag" ||
7285 test ! -s conftest.err
7286 } && test -s conftest.$ac_objext; then
7287 cat >conftest.$ac_ext <<_ACEOF
7288/* confdefs.h. */
7289_ACEOF
7290cat confdefs.h >>conftest.$ac_ext
7291cat >>conftest.$ac_ext <<_ACEOF
7292/* end confdefs.h. */
7293$ac_includes_default
7294int
7295main ()
7296{
7297static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007298 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007299test_array [0] = 0
7300
7301 ;
7302 return 0;
7303}
7304_ACEOF
7305rm -f conftest.$ac_objext
7306if { (ac_try="$ac_compile"
7307case "(($ac_try" in
7308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7309 *) ac_try_echo=$ac_try;;
7310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007312 (eval "$ac_compile") 2>conftest.er1
7313 ac_status=$?
7314 grep -v '^ *+' conftest.er1 >conftest.err
7315 rm -f conftest.er1
7316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007318 (exit $ac_status); } && {
7319 test -z "$ac_c_werror_flag" ||
7320 test ! -s conftest.err
7321 } && test -s conftest.$ac_objext; then
7322 :
7323else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007324 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007325sed 's/^/| /' conftest.$ac_ext >&5
7326
7327 case $ac_type in
7328 int32_t) ac_cv_c_int32_t=yes ;;
7329 *) ac_cv_c_int32_t=$ac_type ;;
7330esac
7331
7332fi
7333
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007336 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007337sed 's/^/| /' conftest.$ac_ext >&5
7338
7339
7340fi
7341
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343 test "$ac_cv_c_int32_t" != no && break
7344 done
7345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007346{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7347echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007348 case $ac_cv_c_int32_t in #(
7349 no|yes) ;; #(
7350 *)
7351
7352cat >>confdefs.h <<_ACEOF
7353#define int32_t $ac_cv_c_int32_t
7354_ACEOF
7355;;
7356 esac
7357
7358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007359 { echo "$as_me:$LINENO: checking for int64_t" >&5
7360echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007361if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007362 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007363else
7364 ac_cv_c_int64_t=no
7365 for ac_type in 'int64_t' 'int' 'long int' \
7366 'long long int' 'short int' 'signed char'; do
7367 cat >conftest.$ac_ext <<_ACEOF
7368/* confdefs.h. */
7369_ACEOF
7370cat confdefs.h >>conftest.$ac_ext
7371cat >>conftest.$ac_ext <<_ACEOF
7372/* end confdefs.h. */
7373$ac_includes_default
7374int
7375main ()
7376{
7377static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7378test_array [0] = 0
7379
7380 ;
7381 return 0;
7382}
7383_ACEOF
7384rm -f conftest.$ac_objext
7385if { (ac_try="$ac_compile"
7386case "(($ac_try" in
7387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7388 *) ac_try_echo=$ac_try;;
7389esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007391 (eval "$ac_compile") 2>conftest.er1
7392 ac_status=$?
7393 grep -v '^ *+' conftest.er1 >conftest.err
7394 rm -f conftest.er1
7395 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007397 (exit $ac_status); } && {
7398 test -z "$ac_c_werror_flag" ||
7399 test ! -s conftest.err
7400 } && test -s conftest.$ac_objext; then
7401 cat >conftest.$ac_ext <<_ACEOF
7402/* confdefs.h. */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h. */
7407$ac_includes_default
7408int
7409main ()
7410{
7411static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007412 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007413test_array [0] = 0
7414
7415 ;
7416 return 0;
7417}
7418_ACEOF
7419rm -f conftest.$ac_objext
7420if { (ac_try="$ac_compile"
7421case "(($ac_try" in
7422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7423 *) ac_try_echo=$ac_try;;
7424esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007426 (eval "$ac_compile") 2>conftest.er1
7427 ac_status=$?
7428 grep -v '^ *+' conftest.er1 >conftest.err
7429 rm -f conftest.er1
7430 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007432 (exit $ac_status); } && {
7433 test -z "$ac_c_werror_flag" ||
7434 test ! -s conftest.err
7435 } && test -s conftest.$ac_objext; then
7436 :
7437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007438 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439sed 's/^/| /' conftest.$ac_ext >&5
7440
7441 case $ac_type in
7442 int64_t) ac_cv_c_int64_t=yes ;;
7443 *) ac_cv_c_int64_t=$ac_type ;;
7444esac
7445
7446fi
7447
7448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007450 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007451sed 's/^/| /' conftest.$ac_ext >&5
7452
7453
7454fi
7455
7456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7457 test "$ac_cv_c_int64_t" != no && break
7458 done
7459fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007460{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7461echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007462 case $ac_cv_c_int64_t in #(
7463 no|yes) ;; #(
7464 *)
7465
7466cat >>confdefs.h <<_ACEOF
7467#define int64_t $ac_cv_c_int64_t
7468_ACEOF
7469;;
7470 esac
7471
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007472{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7473echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007474if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007475 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007476else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007477 cat >conftest.$ac_ext <<_ACEOF
7478/* confdefs.h. */
7479_ACEOF
7480cat confdefs.h >>conftest.$ac_ext
7481cat >>conftest.$ac_ext <<_ACEOF
7482/* end confdefs.h. */
7483$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007484typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007485int
7486main ()
7487{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007488if ((ac__type_new_ *) 0)
7489 return 0;
7490if (sizeof (ac__type_new_))
7491 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007492 ;
7493 return 0;
7494}
7495_ACEOF
7496rm -f conftest.$ac_objext
7497if { (ac_try="$ac_compile"
7498case "(($ac_try" in
7499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7500 *) ac_try_echo=$ac_try;;
7501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007503 (eval "$ac_compile") 2>conftest.er1
7504 ac_status=$?
7505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007509 (exit $ac_status); } && {
7510 test -z "$ac_c_werror_flag" ||
7511 test ! -s conftest.err
7512 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007513 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007515 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007516sed 's/^/| /' conftest.$ac_ext >&5
7517
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007518 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520
7521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007522fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007523{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7524echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7525if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007526
7527cat >>confdefs.h <<\_ACEOF
7528#define HAVE_SSIZE_T 1
7529_ACEOF
7530
7531fi
7532
Jack Jansendd19cf82001-12-06 22:36:17 +00007533
Michael W. Hudson54241132001-12-07 15:38:26 +00007534# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007535# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007536{ echo "$as_me:$LINENO: checking for int" >&5
7537echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7538if test "${ac_cv_type_int+set}" = set; then
7539 echo $ECHO_N "(cached) $ECHO_C" >&6
7540else
7541 cat >conftest.$ac_ext <<_ACEOF
7542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
7547$ac_includes_default
7548typedef int ac__type_new_;
7549int
7550main ()
7551{
7552if ((ac__type_new_ *) 0)
7553 return 0;
7554if (sizeof (ac__type_new_))
7555 return 0;
7556 ;
7557 return 0;
7558}
7559_ACEOF
7560rm -f conftest.$ac_objext
7561if { (ac_try="$ac_compile"
7562case "(($ac_try" in
7563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7564 *) ac_try_echo=$ac_try;;
7565esac
7566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7567 (eval "$ac_compile") 2>conftest.er1
7568 ac_status=$?
7569 grep -v '^ *+' conftest.er1 >conftest.err
7570 rm -f conftest.er1
7571 cat conftest.err >&5
7572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7573 (exit $ac_status); } && {
7574 test -z "$ac_c_werror_flag" ||
7575 test ! -s conftest.err
7576 } && test -s conftest.$ac_objext; then
7577 ac_cv_type_int=yes
7578else
7579 echo "$as_me: failed program was:" >&5
7580sed 's/^/| /' conftest.$ac_ext >&5
7581
7582 ac_cv_type_int=no
7583fi
7584
7585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7586fi
7587{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7588echo "${ECHO_T}$ac_cv_type_int" >&6; }
7589
Martin v. Löwiseba40652007-08-30 20:10:57 +00007590# The cast to long int works around a bug in the HP C Compiler
7591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7593# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007594{ echo "$as_me:$LINENO: checking size of int" >&5
7595echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007596if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007598else
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 if test "$cross_compiling" = yes; then
7600 # Depending upon the size, compute the lo and hi bounds.
7601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007602/* confdefs.h. */
7603_ACEOF
7604cat confdefs.h >>conftest.$ac_ext
7605cat >>conftest.$ac_ext <<_ACEOF
7606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007607$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007608 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007609int
7610main ()
7611{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007612static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007613test_array [0] = 0
7614
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620if { (ac_try="$ac_compile"
7621case "(($ac_try" in
7622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7623 *) ac_try_echo=$ac_try;;
7624esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007628 grep -v '^ *+' conftest.er1 >conftest.err
7629 rm -f conftest.er1
7630 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632 (exit $ac_status); } && {
7633 test -z "$ac_c_werror_flag" ||
7634 test ! -s conftest.err
7635 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007636 ac_lo=0 ac_mid=0
7637 while :; do
7638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007639/* confdefs.h. */
7640_ACEOF
7641cat confdefs.h >>conftest.$ac_ext
7642cat >>conftest.$ac_ext <<_ACEOF
7643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007644$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007645 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007646int
7647main ()
7648{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007649static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007650test_array [0] = 0
7651
7652 ;
7653 return 0;
7654}
7655_ACEOF
7656rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657if { (ac_try="$ac_compile"
7658case "(($ac_try" in
7659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7660 *) ac_try_echo=$ac_try;;
7661esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007665 grep -v '^ *+' conftest.er1 >conftest.err
7666 rm -f conftest.er1
7667 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 (exit $ac_status); } && {
7670 test -z "$ac_c_werror_flag" ||
7671 test ! -s conftest.err
7672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
7679 if test $ac_lo -le $ac_mid; then
7680 ac_lo= ac_hi=
7681 break
7682 fi
7683 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007685
7686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007687 done
7688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007690sed 's/^/| /' conftest.$ac_ext >&5
7691
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007693/* confdefs.h. */
7694_ACEOF
7695cat confdefs.h >>conftest.$ac_ext
7696cat >>conftest.$ac_ext <<_ACEOF
7697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007698$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007704test_array [0] = 0
7705
7706 ;
7707 return 0;
7708}
7709_ACEOF
7710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711if { (ac_try="$ac_compile"
7712case "(($ac_try" in
7713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7714 *) ac_try_echo=$ac_try;;
7715esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007719 grep -v '^ *+' conftest.er1 >conftest.err
7720 rm -f conftest.er1
7721 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723 (exit $ac_status); } && {
7724 test -z "$ac_c_werror_flag" ||
7725 test ! -s conftest.err
7726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ac_hi=-1 ac_mid=-1
7728 while :; do
7729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007730/* confdefs.h. */
7731_ACEOF
7732cat confdefs.h >>conftest.$ac_ext
7733cat >>conftest.$ac_ext <<_ACEOF
7734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007735$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007736 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007737int
7738main ()
7739{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007741test_array [0] = 0
7742
7743 ;
7744 return 0;
7745}
7746_ACEOF
7747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748if { (ac_try="$ac_compile"
7749case "(($ac_try" in
7750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7751 *) ac_try_echo=$ac_try;;
7752esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007756 grep -v '^ *+' conftest.er1 >conftest.err
7757 rm -f conftest.er1
7758 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 (exit $ac_status); } && {
7761 test -z "$ac_c_werror_flag" ||
7762 test ! -s conftest.err
7763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007764 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
7770 if test $ac_mid -le $ac_hi; then
7771 ac_lo= ac_hi=
7772 break
7773 fi
7774 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 done
7779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007781sed 's/^/| /' conftest.$ac_ext >&5
7782
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785
7786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007788
7789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007790# Binary search between lo and hi bounds.
7791while test "x$ac_lo" != "x$ac_hi"; do
7792 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007801int
7802main ()
7803{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007805test_array [0] = 0
7806
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812if { (ac_try="$ac_compile"
7813case "(($ac_try" in
7814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7815 *) ac_try_echo=$ac_try;;
7816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007824 (exit $ac_status); } && {
7825 test -z "$ac_c_werror_flag" ||
7826 test ! -s conftest.err
7827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 ac_hi=$ac_mid
7829else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007831sed 's/^/| /' conftest.$ac_ext >&5
7832
Martin v. Löwiseba40652007-08-30 20:10:57 +00007833 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835
7836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007837done
7838case $ac_lo in
7839?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007841 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007842See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007843echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007844See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007845 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846 else
7847 ac_cv_sizeof_int=0
7848 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007849esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007850else
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007858 typedef int ac__type_sizeof_;
7859static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7860static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007861#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007863int
7864main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865{
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
7867 FILE *f = fopen ("conftest.val", "w");
7868 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007870 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007875 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 }
7877 else
7878 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007881 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007884 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007885
7886 ;
7887 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007888}
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
7890rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007891if { (ac_try="$ac_link"
7892case "(($ac_try" in
7893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7894 *) ac_try_echo=$ac_try;;
7895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007900 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007901 { (case "(($ac_try" in
7902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7903 *) ac_try_echo=$ac_try;;
7904esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007906 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007907 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 (exit $ac_status); }; }; then
7910 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007911else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007912 echo "$as_me: program exited with status $ac_status" >&5
7913echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007914sed 's/^/| /' conftest.$ac_ext >&5
7915
Martin v. Löwis11437992002-04-12 09:54:03 +00007916( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007918 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007919See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007920echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007921See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007922 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923 else
7924 ac_cv_sizeof_int=0
7925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007927rm -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 +00007928fi
7929rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007931{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7932echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933
7934
7935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007937#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007938_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007939
7940
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007941{ echo "$as_me:$LINENO: checking for long" >&5
7942echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7943if test "${ac_cv_type_long+set}" = set; then
7944 echo $ECHO_N "(cached) $ECHO_C" >&6
7945else
7946 cat >conftest.$ac_ext <<_ACEOF
7947/* confdefs.h. */
7948_ACEOF
7949cat confdefs.h >>conftest.$ac_ext
7950cat >>conftest.$ac_ext <<_ACEOF
7951/* end confdefs.h. */
7952$ac_includes_default
7953typedef long ac__type_new_;
7954int
7955main ()
7956{
7957if ((ac__type_new_ *) 0)
7958 return 0;
7959if (sizeof (ac__type_new_))
7960 return 0;
7961 ;
7962 return 0;
7963}
7964_ACEOF
7965rm -f conftest.$ac_objext
7966if { (ac_try="$ac_compile"
7967case "(($ac_try" in
7968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7969 *) ac_try_echo=$ac_try;;
7970esac
7971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7972 (eval "$ac_compile") 2>conftest.er1
7973 ac_status=$?
7974 grep -v '^ *+' conftest.er1 >conftest.err
7975 rm -f conftest.er1
7976 cat conftest.err >&5
7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7978 (exit $ac_status); } && {
7979 test -z "$ac_c_werror_flag" ||
7980 test ! -s conftest.err
7981 } && test -s conftest.$ac_objext; then
7982 ac_cv_type_long=yes
7983else
7984 echo "$as_me: failed program was:" >&5
7985sed 's/^/| /' conftest.$ac_ext >&5
7986
7987 ac_cv_type_long=no
7988fi
7989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7991fi
7992{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7993echo "${ECHO_T}$ac_cv_type_long" >&6; }
7994
Martin v. Löwiseba40652007-08-30 20:10:57 +00007995# The cast to long int works around a bug in the HP C Compiler
7996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7998# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007999{ echo "$as_me:$LINENO: checking size of long" >&5
8000echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008001if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008002 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008003else
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 if test "$cross_compiling" = yes; then
8005 # Depending upon the size, compute the lo and hi bounds.
8006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008007/* confdefs.h. */
8008_ACEOF
8009cat confdefs.h >>conftest.$ac_ext
8010cat >>conftest.$ac_ext <<_ACEOF
8011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008012$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008013 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008014int
8015main ()
8016{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008017static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008018test_array [0] = 0
8019
8020 ;
8021 return 0;
8022}
8023_ACEOF
8024rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025if { (ac_try="$ac_compile"
8026case "(($ac_try" in
8027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8028 *) ac_try_echo=$ac_try;;
8029esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008033 grep -v '^ *+' conftest.er1 >conftest.err
8034 rm -f conftest.er1
8035 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037 (exit $ac_status); } && {
8038 test -z "$ac_c_werror_flag" ||
8039 test ! -s conftest.err
8040 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 ac_lo=0 ac_mid=0
8042 while :; do
8043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008050 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008051int
8052main ()
8053{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008054static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008055test_array [0] = 0
8056
8057 ;
8058 return 0;
8059}
8060_ACEOF
8061rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008062if { (ac_try="$ac_compile"
8063case "(($ac_try" in
8064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8065 *) ac_try_echo=$ac_try;;
8066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008068 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008070 grep -v '^ *+' conftest.er1 >conftest.err
8071 rm -f conftest.er1
8072 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 (exit $ac_status); } && {
8075 test -z "$ac_c_werror_flag" ||
8076 test ! -s conftest.err
8077 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008078 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8084 if test $ac_lo -le $ac_mid; then
8085 ac_lo= ac_hi=
8086 break
8087 fi
8088 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008090
8091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 done
8093else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008095sed 's/^/| /' conftest.$ac_ext >&5
8096
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* confdefs.h. */
8099_ACEOF
8100cat confdefs.h >>conftest.$ac_ext
8101cat >>conftest.$ac_ext <<_ACEOF
8102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008105int
8106main ()
8107{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008108static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008109test_array [0] = 0
8110
8111 ;
8112 return 0;
8113}
8114_ACEOF
8115rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116if { (ac_try="$ac_compile"
8117case "(($ac_try" in
8118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8119 *) ac_try_echo=$ac_try;;
8120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008124 grep -v '^ *+' conftest.er1 >conftest.err
8125 rm -f conftest.er1
8126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128 (exit $ac_status); } && {
8129 test -z "$ac_c_werror_flag" ||
8130 test ! -s conftest.err
8131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 ac_hi=-1 ac_mid=-1
8133 while :; do
8134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008135/* confdefs.h. */
8136_ACEOF
8137cat confdefs.h >>conftest.$ac_ext
8138cat >>conftest.$ac_ext <<_ACEOF
8139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008140$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008141 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008142int
8143main ()
8144{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008145static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008146test_array [0] = 0
8147
8148 ;
8149 return 0;
8150}
8151_ACEOF
8152rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153if { (ac_try="$ac_compile"
8154case "(($ac_try" in
8155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8156 *) ac_try_echo=$ac_try;;
8157esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008161 grep -v '^ *+' conftest.er1 >conftest.err
8162 rm -f conftest.er1
8163 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 (exit $ac_status); } && {
8166 test -z "$ac_c_werror_flag" ||
8167 test ! -s conftest.err
8168 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8175 if test $ac_mid -le $ac_hi; then
8176 ac_lo= ac_hi=
8177 break
8178 fi
8179 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183 done
8184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008186sed 's/^/| /' conftest.$ac_ext >&5
8187
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190
8191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193
8194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008195# Binary search between lo and hi bounds.
8196while test "x$ac_lo" != "x$ac_hi"; do
8197 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008204$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206int
8207main ()
8208{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008210test_array [0] = 0
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
8216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217if { (ac_try="$ac_compile"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 (exit $ac_status); } && {
8230 test -z "$ac_c_werror_flag" ||
8231 test ! -s conftest.err
8232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 ac_hi=$ac_mid
8234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008236sed 's/^/| /' conftest.$ac_ext >&5
8237
Martin v. Löwiseba40652007-08-30 20:10:57 +00008238 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008240
8241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008242done
8243case $ac_lo in
8244?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008246 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008247See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008248echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008249See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008250 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251 else
8252 ac_cv_sizeof_long=0
8253 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008254esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008255else
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008257/* confdefs.h. */
8258_ACEOF
8259cat confdefs.h >>conftest.$ac_ext
8260cat >>conftest.$ac_ext <<_ACEOF
8261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008262$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008263 typedef long ac__type_sizeof_;
8264static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8265static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008266#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008267#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008268int
8269main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270{
Martin v. Löwis11437992002-04-12 09:54:03 +00008271
8272 FILE *f = fopen ("conftest.val", "w");
8273 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008275 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008280 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 }
8282 else
8283 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008284 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008285 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008286 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008289 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291 ;
8292 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293}
Martin v. Löwis11437992002-04-12 09:54:03 +00008294_ACEOF
8295rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296if { (ac_try="$ac_link"
8297case "(($ac_try" in
8298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8299 *) ac_try_echo=$ac_try;;
8300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008306 { (case "(($ac_try" in
8307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8308 *) ac_try_echo=$ac_try;;
8309esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008311 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008312 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 (exit $ac_status); }; }; then
8315 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008317 echo "$as_me: program exited with status $ac_status" >&5
8318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008319sed 's/^/| /' conftest.$ac_ext >&5
8320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008322if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008323 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008324See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008325echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008326See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008327 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328 else
8329 ac_cv_sizeof_long=0
8330 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332rm -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 +00008333fi
8334rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008336{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8337echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008338
8339
8340
Martin v. Löwis11437992002-04-12 09:54:03 +00008341cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008342#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008343_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008344
8345
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008346{ echo "$as_me:$LINENO: checking for void *" >&5
8347echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8348if test "${ac_cv_type_void_p+set}" = set; then
8349 echo $ECHO_N "(cached) $ECHO_C" >&6
8350else
8351 cat >conftest.$ac_ext <<_ACEOF
8352/* confdefs.h. */
8353_ACEOF
8354cat confdefs.h >>conftest.$ac_ext
8355cat >>conftest.$ac_ext <<_ACEOF
8356/* end confdefs.h. */
8357$ac_includes_default
8358typedef void * ac__type_new_;
8359int
8360main ()
8361{
8362if ((ac__type_new_ *) 0)
8363 return 0;
8364if (sizeof (ac__type_new_))
8365 return 0;
8366 ;
8367 return 0;
8368}
8369_ACEOF
8370rm -f conftest.$ac_objext
8371if { (ac_try="$ac_compile"
8372case "(($ac_try" in
8373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8374 *) ac_try_echo=$ac_try;;
8375esac
8376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8377 (eval "$ac_compile") 2>conftest.er1
8378 ac_status=$?
8379 grep -v '^ *+' conftest.er1 >conftest.err
8380 rm -f conftest.er1
8381 cat conftest.err >&5
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); } && {
8384 test -z "$ac_c_werror_flag" ||
8385 test ! -s conftest.err
8386 } && test -s conftest.$ac_objext; then
8387 ac_cv_type_void_p=yes
8388else
8389 echo "$as_me: failed program was:" >&5
8390sed 's/^/| /' conftest.$ac_ext >&5
8391
8392 ac_cv_type_void_p=no
8393fi
8394
8395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8396fi
8397{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8398echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8399
Martin v. Löwiseba40652007-08-30 20:10:57 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008404{ echo "$as_me:$LINENO: checking size of void *" >&5
8405echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008406if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008407 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 if test "$cross_compiling" = yes; then
8410 # Depending upon the size, compute the lo and hi bounds.
8411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008412/* confdefs.h. */
8413_ACEOF
8414cat confdefs.h >>conftest.$ac_ext
8415cat >>conftest.$ac_ext <<_ACEOF
8416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008417$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008418 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008419int
8420main ()
8421{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008422static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008423test_array [0] = 0
8424
8425 ;
8426 return 0;
8427}
8428_ACEOF
8429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430if { (ac_try="$ac_compile"
8431case "(($ac_try" in
8432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8433 *) ac_try_echo=$ac_try;;
8434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442 (exit $ac_status); } && {
8443 test -z "$ac_c_werror_flag" ||
8444 test ! -s conftest.err
8445 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008446 ac_lo=0 ac_mid=0
8447 while :; do
8448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008449/* confdefs.h. */
8450_ACEOF
8451cat confdefs.h >>conftest.$ac_ext
8452cat >>conftest.$ac_ext <<_ACEOF
8453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008455 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008456int
8457main ()
8458{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008459static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008460test_array [0] = 0
8461
8462 ;
8463 return 0;
8464}
8465_ACEOF
8466rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008467if { (ac_try="$ac_compile"
8468case "(($ac_try" in
8469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8470 *) ac_try_echo=$ac_try;;
8471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008475 grep -v '^ *+' conftest.er1 >conftest.err
8476 rm -f conftest.er1
8477 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 (exit $ac_status); } && {
8480 test -z "$ac_c_werror_flag" ||
8481 test ! -s conftest.err
8482 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8489 if test $ac_lo -le $ac_mid; then
8490 ac_lo= ac_hi=
8491 break
8492 fi
8493 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008495
8496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 done
8498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008500sed 's/^/| /' conftest.$ac_ext >&5
8501
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008503/* confdefs.h. */
8504_ACEOF
8505cat confdefs.h >>conftest.$ac_ext
8506cat >>conftest.$ac_ext <<_ACEOF
8507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008508$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008513static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008514test_array [0] = 0
8515
8516 ;
8517 return 0;
8518}
8519_ACEOF
8520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008521if { (ac_try="$ac_compile"
8522case "(($ac_try" in
8523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8524 *) ac_try_echo=$ac_try;;
8525esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533 (exit $ac_status); } && {
8534 test -z "$ac_c_werror_flag" ||
8535 test ! -s conftest.err
8536 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_hi=-1 ac_mid=-1
8538 while :; do
8539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008540/* confdefs.h. */
8541_ACEOF
8542cat confdefs.h >>conftest.$ac_ext
8543cat >>conftest.$ac_ext <<_ACEOF
8544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008545$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008546 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008547int
8548main ()
8549{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008550static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008551test_array [0] = 0
8552
8553 ;
8554 return 0;
8555}
8556_ACEOF
8557rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558if { (ac_try="$ac_compile"
8559case "(($ac_try" in
8560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8561 *) ac_try_echo=$ac_try;;
8562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008566 grep -v '^ *+' conftest.er1 >conftest.err
8567 rm -f conftest.er1
8568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 (exit $ac_status); } && {
8571 test -z "$ac_c_werror_flag" ||
8572 test ! -s conftest.err
8573 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8580 if test $ac_mid -le $ac_hi; then
8581 ac_lo= ac_hi=
8582 break
8583 fi
8584 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 done
8589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595
8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008598
8599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008600# Binary search between lo and hi bounds.
8601while test "x$ac_lo" != "x$ac_hi"; do
8602 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008604/* confdefs.h. */
8605_ACEOF
8606cat confdefs.h >>conftest.$ac_ext
8607cat >>conftest.$ac_ext <<_ACEOF
8608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008609$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008611int
8612main ()
8613{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008614static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008615test_array [0] = 0
8616
8617 ;
8618 return 0;
8619}
8620_ACEOF
8621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622if { (ac_try="$ac_compile"
8623case "(($ac_try" in
8624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8625 *) ac_try_echo=$ac_try;;
8626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008630 grep -v '^ *+' conftest.er1 >conftest.err
8631 rm -f conftest.er1
8632 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008634 (exit $ac_status); } && {
8635 test -z "$ac_c_werror_flag" ||
8636 test ! -s conftest.err
8637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_hi=$ac_mid
8639else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008641sed 's/^/| /' conftest.$ac_ext >&5
8642
Martin v. Löwiseba40652007-08-30 20:10:57 +00008643 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008645
8646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008647done
8648case $ac_lo in
8649?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008651 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008652See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008653echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008654See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008655 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656 else
8657 ac_cv_sizeof_void_p=0
8658 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008659esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008660else
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008668 typedef void * ac__type_sizeof_;
8669static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8670static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008671#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008675{
Martin v. Löwis11437992002-04-12 09:54:03 +00008676
8677 FILE *f = fopen ("conftest.val", "w");
8678 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008680 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008685 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 }
8687 else
8688 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008689 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008690 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008691 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008693 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008694 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008695
8696 ;
8697 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008698}
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
8700rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008701if { (ac_try="$ac_link"
8702case "(($ac_try" in
8703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8704 *) ac_try_echo=$ac_try;;
8705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008711 { (case "(($ac_try" in
8712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8713 *) ac_try_echo=$ac_try;;
8714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008716 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008717 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 (exit $ac_status); }; }; then
8720 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008722 echo "$as_me: program exited with status $ac_status" >&5
8723echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008724sed 's/^/| /' conftest.$ac_ext >&5
8725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008728 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008729See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008730echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008731See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008732 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733 else
8734 ac_cv_sizeof_void_p=0
8735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008737rm -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 +00008738fi
8739rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008741{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8742echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008743
8744
8745
Martin v. Löwis11437992002-04-12 09:54:03 +00008746cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008747#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008748_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008749
8750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008751{ echo "$as_me:$LINENO: checking for short" >&5
8752echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8753if test "${ac_cv_type_short+set}" = set; then
8754 echo $ECHO_N "(cached) $ECHO_C" >&6
8755else
8756 cat >conftest.$ac_ext <<_ACEOF
8757/* confdefs.h. */
8758_ACEOF
8759cat confdefs.h >>conftest.$ac_ext
8760cat >>conftest.$ac_ext <<_ACEOF
8761/* end confdefs.h. */
8762$ac_includes_default
8763typedef short ac__type_new_;
8764int
8765main ()
8766{
8767if ((ac__type_new_ *) 0)
8768 return 0;
8769if (sizeof (ac__type_new_))
8770 return 0;
8771 ;
8772 return 0;
8773}
8774_ACEOF
8775rm -f conftest.$ac_objext
8776if { (ac_try="$ac_compile"
8777case "(($ac_try" in
8778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8779 *) ac_try_echo=$ac_try;;
8780esac
8781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8782 (eval "$ac_compile") 2>conftest.er1
8783 ac_status=$?
8784 grep -v '^ *+' conftest.er1 >conftest.err
8785 rm -f conftest.er1
8786 cat conftest.err >&5
8787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788 (exit $ac_status); } && {
8789 test -z "$ac_c_werror_flag" ||
8790 test ! -s conftest.err
8791 } && test -s conftest.$ac_objext; then
8792 ac_cv_type_short=yes
8793else
8794 echo "$as_me: failed program was:" >&5
8795sed 's/^/| /' conftest.$ac_ext >&5
8796
8797 ac_cv_type_short=no
8798fi
8799
8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8801fi
8802{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8803echo "${ECHO_T}$ac_cv_type_short" >&6; }
8804
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805# The cast to long int works around a bug in the HP C Compiler
8806# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8807# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8808# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008809{ echo "$as_me:$LINENO: checking size of short" >&5
8810echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008811if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008812 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 if test "$cross_compiling" = yes; then
8815 # Depending upon the size, compute the lo and hi bounds.
8816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* confdefs.h. */
8818_ACEOF
8819cat confdefs.h >>conftest.$ac_ext
8820cat >>conftest.$ac_ext <<_ACEOF
8821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008823 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008824int
8825main ()
8826{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008827static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008828test_array [0] = 0
8829
8830 ;
8831 return 0;
8832}
8833_ACEOF
8834rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835if { (ac_try="$ac_compile"
8836case "(($ac_try" in
8837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8838 *) ac_try_echo=$ac_try;;
8839esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 grep -v '^ *+' conftest.er1 >conftest.err
8844 rm -f conftest.er1
8845 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847 (exit $ac_status); } && {
8848 test -z "$ac_c_werror_flag" ||
8849 test ! -s conftest.err
8850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_lo=0 ac_mid=0
8852 while :; do
8853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008859$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008860 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008865test_array [0] = 0
8866
8867 ;
8868 return 0;
8869}
8870_ACEOF
8871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872if { (ac_try="$ac_compile"
8873case "(($ac_try" in
8874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8875 *) ac_try_echo=$ac_try;;
8876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008880 grep -v '^ *+' conftest.er1 >conftest.err
8881 rm -f conftest.er1
8882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 (exit $ac_status); } && {
8885 test -z "$ac_c_werror_flag" ||
8886 test ! -s conftest.err
8887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
8894 if test $ac_lo -le $ac_mid; then
8895 ac_lo= ac_hi=
8896 break
8897 fi
8898 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008900
8901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 done
8903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008905sed 's/^/| /' conftest.$ac_ext >&5
8906
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* confdefs.h. */
8909_ACEOF
8910cat confdefs.h >>conftest.$ac_ext
8911cat >>conftest.$ac_ext <<_ACEOF
8912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008918static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008919test_array [0] = 0
8920
8921 ;
8922 return 0;
8923}
8924_ACEOF
8925rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926if { (ac_try="$ac_compile"
8927case "(($ac_try" in
8928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8929 *) ac_try_echo=$ac_try;;
8930esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008934 grep -v '^ *+' conftest.er1 >conftest.err
8935 rm -f conftest.er1
8936 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938 (exit $ac_status); } && {
8939 test -z "$ac_c_werror_flag" ||
8940 test ! -s conftest.err
8941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_hi=-1 ac_mid=-1
8943 while :; do
8944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* confdefs.h. */
8946_ACEOF
8947cat confdefs.h >>conftest.$ac_ext
8948cat >>conftest.$ac_ext <<_ACEOF
8949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008950$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008951 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008952int
8953main ()
8954{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008955static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008956test_array [0] = 0
8957
8958 ;
8959 return 0;
8960}
8961_ACEOF
8962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963if { (ac_try="$ac_compile"
8964case "(($ac_try" in
8965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8966 *) ac_try_echo=$ac_try;;
8967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008971 grep -v '^ *+' conftest.er1 >conftest.err
8972 rm -f conftest.er1
8973 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 (exit $ac_status); } && {
8976 test -z "$ac_c_werror_flag" ||
8977 test ! -s conftest.err
8978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008979 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
8985 if test $ac_mid -le $ac_hi; then
8986 ac_lo= ac_hi=
8987 break
8988 fi
8989 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 done
8994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008996sed 's/^/| /' conftest.$ac_ext >&5
8997
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000
9001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009003
9004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009005# Binary search between lo and hi bounds.
9006while test "x$ac_lo" != "x$ac_hi"; do
9007 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9008 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009009/* confdefs.h. */
9010_ACEOF
9011cat confdefs.h >>conftest.$ac_ext
9012cat >>conftest.$ac_ext <<_ACEOF
9013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009014$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009016int
9017main ()
9018{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009020test_array [0] = 0
9021
9022 ;
9023 return 0;
9024}
9025_ACEOF
9026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027if { (ac_try="$ac_compile"
9028case "(($ac_try" in
9029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9030 *) ac_try_echo=$ac_try;;
9031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009035 grep -v '^ *+' conftest.er1 >conftest.err
9036 rm -f conftest.er1
9037 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009039 (exit $ac_status); } && {
9040 test -z "$ac_c_werror_flag" ||
9041 test ! -s conftest.err
9042 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_hi=$ac_mid
9044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009046sed 's/^/| /' conftest.$ac_ext >&5
9047
Martin v. Löwiseba40652007-08-30 20:10:57 +00009048 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009050
9051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009052done
9053case $ac_lo in
9054?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009057See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009058echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009059See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009060 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061 else
9062 ac_cv_sizeof_short=0
9063 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009064esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009065else
Martin v. Löwis11437992002-04-12 09:54:03 +00009066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* confdefs.h. */
9068_ACEOF
9069cat confdefs.h >>conftest.$ac_ext
9070cat >>conftest.$ac_ext <<_ACEOF
9071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009073 typedef short ac__type_sizeof_;
9074static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9075static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009076#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009078int
9079main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080{
Martin v. Löwis11437992002-04-12 09:54:03 +00009081
9082 FILE *f = fopen ("conftest.val", "w");
9083 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009085 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009090 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 }
9092 else
9093 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009094 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009095 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009096 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009100
9101 ;
9102 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009103}
Martin v. Löwis11437992002-04-12 09:54:03 +00009104_ACEOF
9105rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009106if { (ac_try="$ac_link"
9107case "(($ac_try" in
9108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9109 *) ac_try_echo=$ac_try;;
9110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009116 { (case "(($ac_try" in
9117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9118 *) ac_try_echo=$ac_try;;
9119esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 (exit $ac_status); }; }; then
9125 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009126else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009127 echo "$as_me: program exited with status $ac_status" >&5
9128echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009129sed 's/^/| /' conftest.$ac_ext >&5
9130
Martin v. Löwis11437992002-04-12 09:54:03 +00009131( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009133 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009134See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009135echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009136See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009137 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138 else
9139 ac_cv_sizeof_short=0
9140 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142rm -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 +00009143fi
9144rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009146{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9147echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009148
9149
9150
Martin v. Löwis11437992002-04-12 09:54:03 +00009151cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009152#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009153_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009154
9155
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009156{ echo "$as_me:$LINENO: checking for float" >&5
9157echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9158if test "${ac_cv_type_float+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161 cat >conftest.$ac_ext <<_ACEOF
9162/* confdefs.h. */
9163_ACEOF
9164cat confdefs.h >>conftest.$ac_ext
9165cat >>conftest.$ac_ext <<_ACEOF
9166/* end confdefs.h. */
9167$ac_includes_default
9168typedef float ac__type_new_;
9169int
9170main ()
9171{
9172if ((ac__type_new_ *) 0)
9173 return 0;
9174if (sizeof (ac__type_new_))
9175 return 0;
9176 ;
9177 return 0;
9178}
9179_ACEOF
9180rm -f conftest.$ac_objext
9181if { (ac_try="$ac_compile"
9182case "(($ac_try" in
9183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9184 *) ac_try_echo=$ac_try;;
9185esac
9186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9187 (eval "$ac_compile") 2>conftest.er1
9188 ac_status=$?
9189 grep -v '^ *+' conftest.er1 >conftest.err
9190 rm -f conftest.er1
9191 cat conftest.err >&5
9192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9193 (exit $ac_status); } && {
9194 test -z "$ac_c_werror_flag" ||
9195 test ! -s conftest.err
9196 } && test -s conftest.$ac_objext; then
9197 ac_cv_type_float=yes
9198else
9199 echo "$as_me: failed program was:" >&5
9200sed 's/^/| /' conftest.$ac_ext >&5
9201
9202 ac_cv_type_float=no
9203fi
9204
9205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9206fi
9207{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9208echo "${ECHO_T}$ac_cv_type_float" >&6; }
9209
Martin v. Löwiseba40652007-08-30 20:10:57 +00009210# The cast to long int works around a bug in the HP C Compiler
9211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9213# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009214{ echo "$as_me:$LINENO: checking size of float" >&5
9215echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009216if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009217 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009218else
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 if test "$cross_compiling" = yes; then
9220 # Depending upon the size, compute the lo and hi bounds.
9221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009222/* confdefs.h. */
9223_ACEOF
9224cat confdefs.h >>conftest.$ac_ext
9225cat >>conftest.$ac_ext <<_ACEOF
9226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009227$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009228 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009229int
9230main ()
9231{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009232static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009233test_array [0] = 0
9234
9235 ;
9236 return 0;
9237}
9238_ACEOF
9239rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240if { (ac_try="$ac_compile"
9241case "(($ac_try" in
9242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9243 *) ac_try_echo=$ac_try;;
9244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009248 grep -v '^ *+' conftest.er1 >conftest.err
9249 rm -f conftest.er1
9250 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252 (exit $ac_status); } && {
9253 test -z "$ac_c_werror_flag" ||
9254 test ! -s conftest.err
9255 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009256 ac_lo=0 ac_mid=0
9257 while :; do
9258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009264$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009265 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009266int
9267main ()
9268{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009269static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009270test_array [0] = 0
9271
9272 ;
9273 return 0;
9274}
9275_ACEOF
9276rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009277if { (ac_try="$ac_compile"
9278case "(($ac_try" in
9279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9280 *) ac_try_echo=$ac_try;;
9281esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009285 grep -v '^ *+' conftest.er1 >conftest.err
9286 rm -f conftest.er1
9287 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 (exit $ac_status); } && {
9290 test -z "$ac_c_werror_flag" ||
9291 test ! -s conftest.err
9292 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
9299 if test $ac_lo -le $ac_mid; then
9300 ac_lo= ac_hi=
9301 break
9302 fi
9303 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305
9306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 done
9308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009310sed 's/^/| /' conftest.$ac_ext >&5
9311
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009313/* confdefs.h. */
9314_ACEOF
9315cat confdefs.h >>conftest.$ac_ext
9316cat >>conftest.$ac_ext <<_ACEOF
9317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009318$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009320int
9321main ()
9322{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009323static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009324test_array [0] = 0
9325
9326 ;
9327 return 0;
9328}
9329_ACEOF
9330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009331if { (ac_try="$ac_compile"
9332case "(($ac_try" in
9333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9334 *) ac_try_echo=$ac_try;;
9335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009339 grep -v '^ *+' conftest.er1 >conftest.err
9340 rm -f conftest.er1
9341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343 (exit $ac_status); } && {
9344 test -z "$ac_c_werror_flag" ||
9345 test ! -s conftest.err
9346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 ac_hi=-1 ac_mid=-1
9348 while :; do
9349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009350/* confdefs.h. */
9351_ACEOF
9352cat confdefs.h >>conftest.$ac_ext
9353cat >>conftest.$ac_ext <<_ACEOF
9354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009355$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009356 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009357int
9358main ()
9359{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009360static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009361test_array [0] = 0
9362
9363 ;
9364 return 0;
9365}
9366_ACEOF
9367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368if { (ac_try="$ac_compile"
9369case "(($ac_try" in
9370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9371 *) ac_try_echo=$ac_try;;
9372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009376 grep -v '^ *+' conftest.er1 >conftest.err
9377 rm -f conftest.er1
9378 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 (exit $ac_status); } && {
9381 test -z "$ac_c_werror_flag" ||
9382 test ! -s conftest.err
9383 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
9390 if test $ac_mid -le $ac_hi; then
9391 ac_lo= ac_hi=
9392 break
9393 fi
9394 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398 done
9399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009401sed 's/^/| /' conftest.$ac_ext >&5
9402
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408
9409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009410# Binary search between lo and hi bounds.
9411while test "x$ac_lo" != "x$ac_hi"; do
9412 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* confdefs.h. */
9415_ACEOF
9416cat confdefs.h >>conftest.$ac_ext
9417cat >>conftest.$ac_ext <<_ACEOF
9418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009421int
9422main ()
9423{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009425test_array [0] = 0
9426
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432if { (ac_try="$ac_compile"
9433case "(($ac_try" in
9434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9435 *) ac_try_echo=$ac_try;;
9436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009440 grep -v '^ *+' conftest.er1 >conftest.err
9441 rm -f conftest.er1
9442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444 (exit $ac_status); } && {
9445 test -z "$ac_c_werror_flag" ||
9446 test ! -s conftest.err
9447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ac_hi=$ac_mid
9449else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009451sed 's/^/| /' conftest.$ac_ext >&5
9452
Martin v. Löwiseba40652007-08-30 20:10:57 +00009453 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009454fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455
9456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009457done
9458case $ac_lo in
9459?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009461 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009462See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009463echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009464See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009465 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466 else
9467 ac_cv_sizeof_float=0
9468 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009469esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009470else
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* confdefs.h. */
9473_ACEOF
9474cat confdefs.h >>conftest.$ac_ext
9475cat >>conftest.$ac_ext <<_ACEOF
9476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009478 typedef float ac__type_sizeof_;
9479static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9480static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009481#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009482#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009483int
9484main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485{
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
9487 FILE *f = fopen ("conftest.val", "w");
9488 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009490 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009495 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 }
9497 else
9498 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009499 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009500 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009504 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
9506 ;
9507 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009508}
Martin v. Löwis11437992002-04-12 09:54:03 +00009509_ACEOF
9510rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511if { (ac_try="$ac_link"
9512case "(($ac_try" in
9513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9514 *) ac_try_echo=$ac_try;;
9515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009521 { (case "(($ac_try" in
9522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9523 *) ac_try_echo=$ac_try;;
9524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009526 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 (exit $ac_status); }; }; then
9530 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009532 echo "$as_me: program exited with status $ac_status" >&5
9533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009534sed 's/^/| /' conftest.$ac_ext >&5
9535
Martin v. Löwis11437992002-04-12 09:54:03 +00009536( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009537if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009538 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009539See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009540echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009541See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009542 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543 else
9544 ac_cv_sizeof_float=0
9545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009547rm -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 +00009548fi
9549rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009551{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9552echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009553
9554
9555
Martin v. Löwis11437992002-04-12 09:54:03 +00009556cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009557#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009558_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009559
9560
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009561{ echo "$as_me:$LINENO: checking for double" >&5
9562echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9563if test "${ac_cv_type_double+set}" = set; then
9564 echo $ECHO_N "(cached) $ECHO_C" >&6
9565else
9566 cat >conftest.$ac_ext <<_ACEOF
9567/* confdefs.h. */
9568_ACEOF
9569cat confdefs.h >>conftest.$ac_ext
9570cat >>conftest.$ac_ext <<_ACEOF
9571/* end confdefs.h. */
9572$ac_includes_default
9573typedef double ac__type_new_;
9574int
9575main ()
9576{
9577if ((ac__type_new_ *) 0)
9578 return 0;
9579if (sizeof (ac__type_new_))
9580 return 0;
9581 ;
9582 return 0;
9583}
9584_ACEOF
9585rm -f conftest.$ac_objext
9586if { (ac_try="$ac_compile"
9587case "(($ac_try" in
9588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9589 *) ac_try_echo=$ac_try;;
9590esac
9591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9592 (eval "$ac_compile") 2>conftest.er1
9593 ac_status=$?
9594 grep -v '^ *+' conftest.er1 >conftest.err
9595 rm -f conftest.er1
9596 cat conftest.err >&5
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); } && {
9599 test -z "$ac_c_werror_flag" ||
9600 test ! -s conftest.err
9601 } && test -s conftest.$ac_objext; then
9602 ac_cv_type_double=yes
9603else
9604 echo "$as_me: failed program was:" >&5
9605sed 's/^/| /' conftest.$ac_ext >&5
9606
9607 ac_cv_type_double=no
9608fi
9609
9610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9611fi
9612{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9613echo "${ECHO_T}$ac_cv_type_double" >&6; }
9614
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615# The cast to long int works around a bug in the HP C Compiler
9616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9618# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009619{ echo "$as_me:$LINENO: checking size of double" >&5
9620echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009621if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009622 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009623else
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 if test "$cross_compiling" = yes; then
9625 # Depending upon the size, compute the lo and hi bounds.
9626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* confdefs.h. */
9628_ACEOF
9629cat confdefs.h >>conftest.$ac_ext
9630cat >>conftest.$ac_ext <<_ACEOF
9631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009632$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009633 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009638test_array [0] = 0
9639
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645if { (ac_try="$ac_compile"
9646case "(($ac_try" in
9647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9648 *) ac_try_echo=$ac_try;;
9649esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009653 grep -v '^ *+' conftest.er1 >conftest.err
9654 rm -f conftest.er1
9655 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657 (exit $ac_status); } && {
9658 test -z "$ac_c_werror_flag" ||
9659 test ! -s conftest.err
9660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009661 ac_lo=0 ac_mid=0
9662 while :; do
9663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* confdefs.h. */
9665_ACEOF
9666cat confdefs.h >>conftest.$ac_ext
9667cat >>conftest.$ac_ext <<_ACEOF
9668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009669$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009670 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009675test_array [0] = 0
9676
9677 ;
9678 return 0;
9679}
9680_ACEOF
9681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009682if { (ac_try="$ac_compile"
9683case "(($ac_try" in
9684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9685 *) ac_try_echo=$ac_try;;
9686esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009690 grep -v '^ *+' conftest.er1 >conftest.err
9691 rm -f conftest.er1
9692 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 (exit $ac_status); } && {
9695 test -z "$ac_c_werror_flag" ||
9696 test ! -s conftest.err
9697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
9704 if test $ac_lo -le $ac_mid; then
9705 ac_lo= ac_hi=
9706 break
9707 fi
9708 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009710
9711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009712 done
9713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009715sed 's/^/| /' conftest.$ac_ext >&5
9716
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* confdefs.h. */
9719_ACEOF
9720cat confdefs.h >>conftest.$ac_ext
9721cat >>conftest.$ac_ext <<_ACEOF
9722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009729test_array [0] = 0
9730
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009736if { (ac_try="$ac_compile"
9737case "(($ac_try" in
9738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9739 *) ac_try_echo=$ac_try;;
9740esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009744 grep -v '^ *+' conftest.er1 >conftest.err
9745 rm -f conftest.er1
9746 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748 (exit $ac_status); } && {
9749 test -z "$ac_c_werror_flag" ||
9750 test ! -s conftest.err
9751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_hi=-1 ac_mid=-1
9753 while :; do
9754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* confdefs.h. */
9756_ACEOF
9757cat confdefs.h >>conftest.$ac_ext
9758cat >>conftest.$ac_ext <<_ACEOF
9759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009760$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009761 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009762int
9763main ()
9764{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009765static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009766test_array [0] = 0
9767
9768 ;
9769 return 0;
9770}
9771_ACEOF
9772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773if { (ac_try="$ac_compile"
9774case "(($ac_try" in
9775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9776 *) ac_try_echo=$ac_try;;
9777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009781 grep -v '^ *+' conftest.er1 >conftest.err
9782 rm -f conftest.er1
9783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 (exit $ac_status); } && {
9786 test -z "$ac_c_werror_flag" ||
9787 test ! -s conftest.err
9788 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
9795 if test $ac_mid -le $ac_hi; then
9796 ac_lo= ac_hi=
9797 break
9798 fi
9799 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 done
9804else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009813
9814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009815# Binary search between lo and hi bounds.
9816while test "x$ac_lo" != "x$ac_hi"; do
9817 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9818 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009819/* confdefs.h. */
9820_ACEOF
9821cat confdefs.h >>conftest.$ac_ext
9822cat >>conftest.$ac_ext <<_ACEOF
9823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009826int
9827main ()
9828{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009830test_array [0] = 0
9831
9832 ;
9833 return 0;
9834}
9835_ACEOF
9836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837if { (ac_try="$ac_compile"
9838case "(($ac_try" in
9839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9840 *) ac_try_echo=$ac_try;;
9841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009845 grep -v '^ *+' conftest.er1 >conftest.err
9846 rm -f conftest.er1
9847 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849 (exit $ac_status); } && {
9850 test -z "$ac_c_werror_flag" ||
9851 test ! -s conftest.err
9852 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 ac_hi=$ac_mid
9854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009856sed 's/^/| /' conftest.$ac_ext >&5
9857
Martin v. Löwiseba40652007-08-30 20:10:57 +00009858 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009862done
9863case $ac_lo in
9864?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009866 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009867See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009868echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009869See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009870 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871 else
9872 ac_cv_sizeof_double=0
9873 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009874esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* confdefs.h. */
9878_ACEOF
9879cat confdefs.h >>conftest.$ac_ext
9880cat >>conftest.$ac_ext <<_ACEOF
9881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009883 typedef double ac__type_sizeof_;
9884static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9885static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009886#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009887#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009888int
9889main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890{
Martin v. Löwis11437992002-04-12 09:54:03 +00009891
9892 FILE *f = fopen ("conftest.val", "w");
9893 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009895 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009900 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 }
9902 else
9903 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009904 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009905 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009906 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
9911 ;
9912 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009913}
Martin v. Löwis11437992002-04-12 09:54:03 +00009914_ACEOF
9915rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009916if { (ac_try="$ac_link"
9917case "(($ac_try" in
9918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9919 *) ac_try_echo=$ac_try;;
9920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926 { (case "(($ac_try" in
9927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9928 *) ac_try_echo=$ac_try;;
9929esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009931 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009934 (exit $ac_status); }; }; then
9935 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009937 echo "$as_me: program exited with status $ac_status" >&5
9938echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009939sed 's/^/| /' conftest.$ac_ext >&5
9940
Martin v. Löwis11437992002-04-12 09:54:03 +00009941( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009942if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009943 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009944See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009945echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009946See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009947 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948 else
9949 ac_cv_sizeof_double=0
9950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009952rm -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 +00009953fi
9954rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009956{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9957echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958
9959
9960
Martin v. Löwis11437992002-04-12 09:54:03 +00009961cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009962#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009963_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009964
9965
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009966{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9967echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9968if test "${ac_cv_type_fpos_t+set}" = set; then
9969 echo $ECHO_N "(cached) $ECHO_C" >&6
9970else
9971 cat >conftest.$ac_ext <<_ACEOF
9972/* confdefs.h. */
9973_ACEOF
9974cat confdefs.h >>conftest.$ac_ext
9975cat >>conftest.$ac_ext <<_ACEOF
9976/* end confdefs.h. */
9977$ac_includes_default
9978typedef fpos_t ac__type_new_;
9979int
9980main ()
9981{
9982if ((ac__type_new_ *) 0)
9983 return 0;
9984if (sizeof (ac__type_new_))
9985 return 0;
9986 ;
9987 return 0;
9988}
9989_ACEOF
9990rm -f conftest.$ac_objext
9991if { (ac_try="$ac_compile"
9992case "(($ac_try" in
9993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9994 *) ac_try_echo=$ac_try;;
9995esac
9996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9997 (eval "$ac_compile") 2>conftest.er1
9998 ac_status=$?
9999 grep -v '^ *+' conftest.er1 >conftest.err
10000 rm -f conftest.er1
10001 cat conftest.err >&5
10002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10003 (exit $ac_status); } && {
10004 test -z "$ac_c_werror_flag" ||
10005 test ! -s conftest.err
10006 } && test -s conftest.$ac_objext; then
10007 ac_cv_type_fpos_t=yes
10008else
10009 echo "$as_me: failed program was:" >&5
10010sed 's/^/| /' conftest.$ac_ext >&5
10011
10012 ac_cv_type_fpos_t=no
10013fi
10014
10015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10016fi
10017{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10018echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10019
Martin v. Löwiseba40652007-08-30 20:10:57 +000010020# The cast to long int works around a bug in the HP C Compiler
10021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10023# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010024{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10025echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010026if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010027 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010028else
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 if test "$cross_compiling" = yes; then
10030 # Depending upon the size, compute the lo and hi bounds.
10031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010032/* confdefs.h. */
10033_ACEOF
10034cat confdefs.h >>conftest.$ac_ext
10035cat >>conftest.$ac_ext <<_ACEOF
10036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010037$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010038 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010039int
10040main ()
10041{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010043test_array [0] = 0
10044
10045 ;
10046 return 0;
10047}
10048_ACEOF
10049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050if { (ac_try="$ac_compile"
10051case "(($ac_try" in
10052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10053 *) ac_try_echo=$ac_try;;
10054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010058 grep -v '^ *+' conftest.er1 >conftest.err
10059 rm -f conftest.er1
10060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062 (exit $ac_status); } && {
10063 test -z "$ac_c_werror_flag" ||
10064 test ! -s conftest.err
10065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_lo=0 ac_mid=0
10067 while :; do
10068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* confdefs.h. */
10070_ACEOF
10071cat confdefs.h >>conftest.$ac_ext
10072cat >>conftest.$ac_ext <<_ACEOF
10073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010074$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010075 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010080test_array [0] = 0
10081
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010087if { (ac_try="$ac_compile"
10088case "(($ac_try" in
10089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10090 *) ac_try_echo=$ac_try;;
10091esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010095 grep -v '^ *+' conftest.er1 >conftest.err
10096 rm -f conftest.er1
10097 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 (exit $ac_status); } && {
10100 test -z "$ac_c_werror_flag" ||
10101 test ! -s conftest.err
10102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10109 if test $ac_lo -le $ac_mid; then
10110 ac_lo= ac_hi=
10111 break
10112 fi
10113 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010115
10116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 done
10118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010120sed 's/^/| /' conftest.$ac_ext >&5
10121
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* confdefs.h. */
10124_ACEOF
10125cat confdefs.h >>conftest.$ac_ext
10126cat >>conftest.$ac_ext <<_ACEOF
10127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010130int
10131main ()
10132{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010134test_array [0] = 0
10135
10136 ;
10137 return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010141if { (ac_try="$ac_compile"
10142case "(($ac_try" in
10143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10144 *) ac_try_echo=$ac_try;;
10145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153 (exit $ac_status); } && {
10154 test -z "$ac_c_werror_flag" ||
10155 test ! -s conftest.err
10156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_hi=-1 ac_mid=-1
10158 while :; do
10159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010160/* confdefs.h. */
10161_ACEOF
10162cat confdefs.h >>conftest.$ac_ext
10163cat >>conftest.$ac_ext <<_ACEOF
10164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010165$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010167int
10168main ()
10169{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010171test_array [0] = 0
10172
10173 ;
10174 return 0;
10175}
10176_ACEOF
10177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010178if { (ac_try="$ac_compile"
10179case "(($ac_try" in
10180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10181 *) ac_try_echo=$ac_try;;
10182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010186 grep -v '^ *+' conftest.er1 >conftest.err
10187 rm -f conftest.er1
10188 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 (exit $ac_status); } && {
10191 test -z "$ac_c_werror_flag" ||
10192 test ! -s conftest.err
10193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010194 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
10200 if test $ac_mid -le $ac_hi; then
10201 ac_lo= ac_hi=
10202 break
10203 fi
10204 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 done
10209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010211sed 's/^/| /' conftest.$ac_ext >&5
10212
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215
10216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010218
10219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010220# Binary search between lo and hi bounds.
10221while test "x$ac_lo" != "x$ac_hi"; do
10222 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010224/* confdefs.h. */
10225_ACEOF
10226cat confdefs.h >>conftest.$ac_ext
10227cat >>conftest.$ac_ext <<_ACEOF
10228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010231int
10232main ()
10233{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010235test_array [0] = 0
10236
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242if { (ac_try="$ac_compile"
10243case "(($ac_try" in
10244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10245 *) ac_try_echo=$ac_try;;
10246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010250 grep -v '^ *+' conftest.er1 >conftest.err
10251 rm -f conftest.er1
10252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010254 (exit $ac_status); } && {
10255 test -z "$ac_c_werror_flag" ||
10256 test ! -s conftest.err
10257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ac_hi=$ac_mid
10259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010261sed 's/^/| /' conftest.$ac_ext >&5
10262
Martin v. Löwiseba40652007-08-30 20:10:57 +000010263 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010265
10266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010267done
10268case $ac_lo in
10269?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010270'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010271 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010272See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010273echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010274See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010275 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276 else
10277 ac_cv_sizeof_fpos_t=0
10278 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010279esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010280else
Martin v. Löwis11437992002-04-12 09:54:03 +000010281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010287$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288 typedef fpos_t ac__type_sizeof_;
10289static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10290static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010292#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010293int
10294main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295{
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
10297 FILE *f = fopen ("conftest.val", "w");
10298 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010299 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010300 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010305 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 }
10307 else
10308 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010309 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010310 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010311 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010314 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010315
10316 ;
10317 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318}
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
10320rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321if { (ac_try="$ac_link"
10322case "(($ac_try" in
10323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10324 *) ac_try_echo=$ac_try;;
10325esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010327 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010331 { (case "(($ac_try" in
10332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10333 *) ac_try_echo=$ac_try;;
10334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010336 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 (exit $ac_status); }; }; then
10340 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010341else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010342 echo "$as_me: program exited with status $ac_status" >&5
10343echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010344sed 's/^/| /' conftest.$ac_ext >&5
10345
Martin v. Löwis11437992002-04-12 09:54:03 +000010346( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010347if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010348 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010349See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010350echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010351See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010352 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353 else
10354 ac_cv_sizeof_fpos_t=0
10355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010357rm -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 +000010358fi
10359rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010361{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10362echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010363
10364
10365
Martin v. Löwis11437992002-04-12 09:54:03 +000010366cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010367#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010368_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010369
Michael W. Hudson54241132001-12-07 15:38:26 +000010370
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010371{ echo "$as_me:$LINENO: checking for size_t" >&5
10372echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10373if test "${ac_cv_type_size_t+set}" = set; then
10374 echo $ECHO_N "(cached) $ECHO_C" >&6
10375else
10376 cat >conftest.$ac_ext <<_ACEOF
10377/* confdefs.h. */
10378_ACEOF
10379cat confdefs.h >>conftest.$ac_ext
10380cat >>conftest.$ac_ext <<_ACEOF
10381/* end confdefs.h. */
10382$ac_includes_default
10383typedef size_t ac__type_new_;
10384int
10385main ()
10386{
10387if ((ac__type_new_ *) 0)
10388 return 0;
10389if (sizeof (ac__type_new_))
10390 return 0;
10391 ;
10392 return 0;
10393}
10394_ACEOF
10395rm -f conftest.$ac_objext
10396if { (ac_try="$ac_compile"
10397case "(($ac_try" in
10398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10399 *) ac_try_echo=$ac_try;;
10400esac
10401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10402 (eval "$ac_compile") 2>conftest.er1
10403 ac_status=$?
10404 grep -v '^ *+' conftest.er1 >conftest.err
10405 rm -f conftest.er1
10406 cat conftest.err >&5
10407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408 (exit $ac_status); } && {
10409 test -z "$ac_c_werror_flag" ||
10410 test ! -s conftest.err
10411 } && test -s conftest.$ac_objext; then
10412 ac_cv_type_size_t=yes
10413else
10414 echo "$as_me: failed program was:" >&5
10415sed 's/^/| /' conftest.$ac_ext >&5
10416
10417 ac_cv_type_size_t=no
10418fi
10419
10420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10421fi
10422{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10423echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10424
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425# The cast to long int works around a bug in the HP C Compiler
10426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10428# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010429{ echo "$as_me:$LINENO: checking size of size_t" >&5
10430echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010431if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010432 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010433else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434 if test "$cross_compiling" = yes; then
10435 # Depending upon the size, compute the lo and hi bounds.
10436cat >conftest.$ac_ext <<_ACEOF
10437/* confdefs.h. */
10438_ACEOF
10439cat confdefs.h >>conftest.$ac_ext
10440cat >>conftest.$ac_ext <<_ACEOF
10441/* end confdefs.h. */
10442$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010443 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444int
10445main ()
10446{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448test_array [0] = 0
10449
10450 ;
10451 return 0;
10452}
10453_ACEOF
10454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010455if { (ac_try="$ac_compile"
10456case "(($ac_try" in
10457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10458 *) ac_try_echo=$ac_try;;
10459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462 ac_status=$?
10463 grep -v '^ *+' conftest.er1 >conftest.err
10464 rm -f conftest.er1
10465 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467 (exit $ac_status); } && {
10468 test -z "$ac_c_werror_flag" ||
10469 test ! -s conftest.err
10470 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010471 ac_lo=0 ac_mid=0
10472 while :; do
10473 cat >conftest.$ac_ext <<_ACEOF
10474/* confdefs.h. */
10475_ACEOF
10476cat confdefs.h >>conftest.$ac_ext
10477cat >>conftest.$ac_ext <<_ACEOF
10478/* end confdefs.h. */
10479$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010480 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481int
10482main ()
10483{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485test_array [0] = 0
10486
10487 ;
10488 return 0;
10489}
10490_ACEOF
10491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010492if { (ac_try="$ac_compile"
10493case "(($ac_try" in
10494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10495 *) ac_try_echo=$ac_try;;
10496esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 ac_status=$?
10500 grep -v '^ *+' conftest.er1 >conftest.err
10501 rm -f conftest.er1
10502 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 (exit $ac_status); } && {
10505 test -z "$ac_c_werror_flag" ||
10506 test ! -s conftest.err
10507 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10514 if test $ac_lo -le $ac_mid; then
10515 ac_lo= ac_hi=
10516 break
10517 fi
10518 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010520
10521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522 done
10523else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010524 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525sed 's/^/| /' conftest.$ac_ext >&5
10526
Martin v. Löwiseba40652007-08-30 20:10:57 +000010527 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528/* confdefs.h. */
10529_ACEOF
10530cat confdefs.h >>conftest.$ac_ext
10531cat >>conftest.$ac_ext <<_ACEOF
10532/* end confdefs.h. */
10533$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535int
10536main ()
10537{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539test_array [0] = 0
10540
10541 ;
10542 return 0;
10543}
10544_ACEOF
10545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010546if { (ac_try="$ac_compile"
10547case "(($ac_try" in
10548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10549 *) ac_try_echo=$ac_try;;
10550esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553 ac_status=$?
10554 grep -v '^ *+' conftest.er1 >conftest.err
10555 rm -f conftest.er1
10556 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558 (exit $ac_status); } && {
10559 test -z "$ac_c_werror_flag" ||
10560 test ! -s conftest.err
10561 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010562 ac_hi=-1 ac_mid=-1
10563 while :; do
10564 cat >conftest.$ac_ext <<_ACEOF
10565/* confdefs.h. */
10566_ACEOF
10567cat confdefs.h >>conftest.$ac_ext
10568cat >>conftest.$ac_ext <<_ACEOF
10569/* end confdefs.h. */
10570$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010571 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572int
10573main ()
10574{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576test_array [0] = 0
10577
10578 ;
10579 return 0;
10580}
10581_ACEOF
10582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010583if { (ac_try="$ac_compile"
10584case "(($ac_try" in
10585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10586 *) ac_try_echo=$ac_try;;
10587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 ac_status=$?
10591 grep -v '^ *+' conftest.er1 >conftest.err
10592 rm -f conftest.er1
10593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 (exit $ac_status); } && {
10596 test -z "$ac_c_werror_flag" ||
10597 test ! -s conftest.err
10598 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
10605 if test $ac_mid -le $ac_hi; then
10606 ac_lo= ac_hi=
10607 break
10608 fi
10609 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 done
10614else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010615 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010616sed 's/^/| /' conftest.$ac_ext >&5
10617
Martin v. Löwiseba40652007-08-30 20:10:57 +000010618 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620
10621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010623
10624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625# Binary search between lo and hi bounds.
10626while test "x$ac_lo" != "x$ac_hi"; do
10627 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10628 cat >conftest.$ac_ext <<_ACEOF
10629/* confdefs.h. */
10630_ACEOF
10631cat confdefs.h >>conftest.$ac_ext
10632cat >>conftest.$ac_ext <<_ACEOF
10633/* end confdefs.h. */
10634$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636int
10637main ()
10638{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640test_array [0] = 0
10641
10642 ;
10643 return 0;
10644}
10645_ACEOF
10646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647if { (ac_try="$ac_compile"
10648case "(($ac_try" in
10649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10650 *) ac_try_echo=$ac_try;;
10651esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 ac_status=$?
10655 grep -v '^ *+' conftest.er1 >conftest.err
10656 rm -f conftest.er1
10657 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659 (exit $ac_status); } && {
10660 test -z "$ac_c_werror_flag" ||
10661 test ! -s conftest.err
10662 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 ac_hi=$ac_mid
10664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010665 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666sed 's/^/| /' conftest.$ac_ext >&5
10667
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010670
10671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672done
10673case $ac_lo in
10674?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010675'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010676 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010677See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010678echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010680 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010681 else
10682 ac_cv_sizeof_size_t=0
10683 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684esac
10685else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686 cat >conftest.$ac_ext <<_ACEOF
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
10692$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010693 typedef size_t ac__type_sizeof_;
10694static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10695static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696#include <stdio.h>
10697#include <stdlib.h>
10698int
10699main ()
10700{
10701
10702 FILE *f = fopen ("conftest.val", "w");
10703 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010704 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010705 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010707 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010710 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010711 }
10712 else
10713 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010714 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010715 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010716 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010719 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726if { (ac_try="$ac_link"
10727case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010732 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736 { (case "(($ac_try" in
10737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10738 *) ac_try_echo=$ac_try;;
10739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010741 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744 (exit $ac_status); }; }; then
10745 ac_cv_sizeof_size_t=`cat conftest.val`
10746else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010747 echo "$as_me: program exited with status $ac_status" >&5
10748echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749sed 's/^/| /' conftest.$ac_ext >&5
10750
10751( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010752if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010753 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010754See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010755echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010757 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010758 else
10759 ac_cv_sizeof_size_t=0
10760 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762rm -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 +000010763fi
10764rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010765fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010766{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10767echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768
10769
10770
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771cat >>confdefs.h <<_ACEOF
10772#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10773_ACEOF
10774
10775
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010776{ echo "$as_me:$LINENO: checking for pid_t" >&5
10777echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10778if test "${ac_cv_type_pid_t+set}" = set; then
10779 echo $ECHO_N "(cached) $ECHO_C" >&6
10780else
10781 cat >conftest.$ac_ext <<_ACEOF
10782/* confdefs.h. */
10783_ACEOF
10784cat confdefs.h >>conftest.$ac_ext
10785cat >>conftest.$ac_ext <<_ACEOF
10786/* end confdefs.h. */
10787$ac_includes_default
10788typedef pid_t ac__type_new_;
10789int
10790main ()
10791{
10792if ((ac__type_new_ *) 0)
10793 return 0;
10794if (sizeof (ac__type_new_))
10795 return 0;
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext
10801if { (ac_try="$ac_compile"
10802case "(($ac_try" in
10803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10804 *) ac_try_echo=$ac_try;;
10805esac
10806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10807 (eval "$ac_compile") 2>conftest.er1
10808 ac_status=$?
10809 grep -v '^ *+' conftest.er1 >conftest.err
10810 rm -f conftest.er1
10811 cat conftest.err >&5
10812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10813 (exit $ac_status); } && {
10814 test -z "$ac_c_werror_flag" ||
10815 test ! -s conftest.err
10816 } && test -s conftest.$ac_objext; then
10817 ac_cv_type_pid_t=yes
10818else
10819 echo "$as_me: failed program was:" >&5
10820sed 's/^/| /' conftest.$ac_ext >&5
10821
10822 ac_cv_type_pid_t=no
10823fi
10824
10825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10826fi
10827{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10828echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10829
Christian Heimes951cc0f2008-01-31 23:08:23 +000010830# The cast to long int works around a bug in the HP C Compiler
10831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10833# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010834{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10835echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010836if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010837 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010838else
10839 if test "$cross_compiling" = yes; then
10840 # Depending upon the size, compute the lo and hi bounds.
10841cat >conftest.$ac_ext <<_ACEOF
10842/* confdefs.h. */
10843_ACEOF
10844cat confdefs.h >>conftest.$ac_ext
10845cat >>conftest.$ac_ext <<_ACEOF
10846/* end confdefs.h. */
10847$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010848 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010849int
10850main ()
10851{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010853test_array [0] = 0
10854
10855 ;
10856 return 0;
10857}
10858_ACEOF
10859rm -f conftest.$ac_objext
10860if { (ac_try="$ac_compile"
10861case "(($ac_try" in
10862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10863 *) ac_try_echo=$ac_try;;
10864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010866 (eval "$ac_compile") 2>conftest.er1
10867 ac_status=$?
10868 grep -v '^ *+' conftest.er1 >conftest.err
10869 rm -f conftest.er1
10870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010872 (exit $ac_status); } && {
10873 test -z "$ac_c_werror_flag" ||
10874 test ! -s conftest.err
10875 } && test -s conftest.$ac_objext; then
10876 ac_lo=0 ac_mid=0
10877 while :; do
10878 cat >conftest.$ac_ext <<_ACEOF
10879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
10884$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010885 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010886int
10887main ()
10888{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010890test_array [0] = 0
10891
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f conftest.$ac_objext
10897if { (ac_try="$ac_compile"
10898case "(($ac_try" in
10899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10900 *) ac_try_echo=$ac_try;;
10901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010903 (eval "$ac_compile") 2>conftest.er1
10904 ac_status=$?
10905 grep -v '^ *+' conftest.er1 >conftest.err
10906 rm -f conftest.er1
10907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010909 (exit $ac_status); } && {
10910 test -z "$ac_c_werror_flag" ||
10911 test ! -s conftest.err
10912 } && test -s conftest.$ac_objext; then
10913 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
10919 if test $ac_lo -le $ac_mid; then
10920 ac_lo= ac_hi=
10921 break
10922 fi
10923 ac_mid=`expr 2 '*' $ac_mid + 1`
10924fi
10925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10927 done
10928else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010929 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010930sed 's/^/| /' conftest.$ac_ext >&5
10931
10932 cat >conftest.$ac_ext <<_ACEOF
10933/* confdefs.h. */
10934_ACEOF
10935cat confdefs.h >>conftest.$ac_ext
10936cat >>conftest.$ac_ext <<_ACEOF
10937/* end confdefs.h. */
10938$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940int
10941main ()
10942{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010944test_array [0] = 0
10945
10946 ;
10947 return 0;
10948}
10949_ACEOF
10950rm -f conftest.$ac_objext
10951if { (ac_try="$ac_compile"
10952case "(($ac_try" in
10953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10954 *) ac_try_echo=$ac_try;;
10955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010957 (eval "$ac_compile") 2>conftest.er1
10958 ac_status=$?
10959 grep -v '^ *+' conftest.er1 >conftest.err
10960 rm -f conftest.er1
10961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010963 (exit $ac_status); } && {
10964 test -z "$ac_c_werror_flag" ||
10965 test ! -s conftest.err
10966 } && test -s conftest.$ac_objext; then
10967 ac_hi=-1 ac_mid=-1
10968 while :; do
10969 cat >conftest.$ac_ext <<_ACEOF
10970/* confdefs.h. */
10971_ACEOF
10972cat confdefs.h >>conftest.$ac_ext
10973cat >>conftest.$ac_ext <<_ACEOF
10974/* end confdefs.h. */
10975$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010976 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010977int
10978main ()
10979{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010981test_array [0] = 0
10982
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987rm -f conftest.$ac_objext
10988if { (ac_try="$ac_compile"
10989case "(($ac_try" in
10990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10991 *) ac_try_echo=$ac_try;;
10992esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010994 (eval "$ac_compile") 2>conftest.er1
10995 ac_status=$?
10996 grep -v '^ *+' conftest.er1 >conftest.err
10997 rm -f conftest.er1
10998 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011000 (exit $ac_status); } && {
11001 test -z "$ac_c_werror_flag" ||
11002 test ! -s conftest.err
11003 } && test -s conftest.$ac_objext; then
11004 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
11010 if test $ac_mid -le $ac_hi; then
11011 ac_lo= ac_hi=
11012 break
11013 fi
11014 ac_mid=`expr 2 '*' $ac_mid`
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018 done
11019else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011020 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011021sed 's/^/| /' conftest.$ac_ext >&5
11022
11023 ac_lo= ac_hi=
11024fi
11025
11026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11027fi
11028
11029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11030# Binary search between lo and hi bounds.
11031while test "x$ac_lo" != "x$ac_hi"; do
11032 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11033 cat >conftest.$ac_ext <<_ACEOF
11034/* confdefs.h. */
11035_ACEOF
11036cat confdefs.h >>conftest.$ac_ext
11037cat >>conftest.$ac_ext <<_ACEOF
11038/* end confdefs.h. */
11039$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041int
11042main ()
11043{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011045test_array [0] = 0
11046
11047 ;
11048 return 0;
11049}
11050_ACEOF
11051rm -f conftest.$ac_objext
11052if { (ac_try="$ac_compile"
11053case "(($ac_try" in
11054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055 *) ac_try_echo=$ac_try;;
11056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011058 (eval "$ac_compile") 2>conftest.er1
11059 ac_status=$?
11060 grep -v '^ *+' conftest.er1 >conftest.err
11061 rm -f conftest.er1
11062 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011064 (exit $ac_status); } && {
11065 test -z "$ac_c_werror_flag" ||
11066 test ! -s conftest.err
11067 } && test -s conftest.$ac_objext; then
11068 ac_hi=$ac_mid
11069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011070 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011071sed 's/^/| /' conftest.$ac_ext >&5
11072
11073 ac_lo=`expr '(' $ac_mid ')' + 1`
11074fi
11075
11076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11077done
11078case $ac_lo in
11079?*) ac_cv_sizeof_pid_t=$ac_lo;;
11080'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011082See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011083echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011084See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011085 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011086 else
11087 ac_cv_sizeof_pid_t=0
11088 fi ;;
11089esac
11090else
11091 cat >conftest.$ac_ext <<_ACEOF
11092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
11096/* end confdefs.h. */
11097$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011098 typedef pid_t ac__type_sizeof_;
11099static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11100static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011101#include <stdio.h>
11102#include <stdlib.h>
11103int
11104main ()
11105{
11106
11107 FILE *f = fopen ("conftest.val", "w");
11108 if (! f)
11109 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011110 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011111 {
11112 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011115 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011116 }
11117 else
11118 {
11119 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011120 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011121 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123 }
11124 return ferror (f) || fclose (f) != 0;
11125
11126 ;
11127 return 0;
11128}
11129_ACEOF
11130rm -f conftest$ac_exeext
11131if { (ac_try="$ac_link"
11132case "(($ac_try" in
11133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11134 *) ac_try_echo=$ac_try;;
11135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011137 (eval "$ac_link") 2>&5
11138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11141 { (case "(($ac_try" in
11142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11143 *) ac_try_echo=$ac_try;;
11144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011146 (eval "$ac_try") 2>&5
11147 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011149 (exit $ac_status); }; }; then
11150 ac_cv_sizeof_pid_t=`cat conftest.val`
11151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011152 echo "$as_me: program exited with status $ac_status" >&5
11153echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011154sed 's/^/| /' conftest.$ac_ext >&5
11155
11156( exit $ac_status )
11157if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011158 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011159See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011160echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011161See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011162 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011163 else
11164 ac_cv_sizeof_pid_t=0
11165 fi
11166fi
11167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11168fi
11169rm -f conftest.val
11170fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011171{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11172echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011173
11174
11175
11176cat >>confdefs.h <<_ACEOF
11177#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11178_ACEOF
11179
11180
Michael W. Hudson54241132001-12-07 15:38:26 +000011181
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011182{ echo "$as_me:$LINENO: checking for long long support" >&5
11183echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011184have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011186/* confdefs.h. */
11187_ACEOF
11188cat confdefs.h >>conftest.$ac_ext
11189cat >>conftest.$ac_ext <<_ACEOF
11190/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011191
Martin v. Löwis11437992002-04-12 09:54:03 +000011192int
11193main ()
11194{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011195long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 ;
11197 return 0;
11198}
11199_ACEOF
11200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011201if { (ac_try="$ac_compile"
11202case "(($ac_try" in
11203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11204 *) ac_try_echo=$ac_try;;
11205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011209 grep -v '^ *+' conftest.er1 >conftest.err
11210 rm -f conftest.er1
11211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011213 (exit $ac_status); } && {
11214 test -z "$ac_c_werror_flag" ||
11215 test ! -s conftest.err
11216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
11218
11219cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011220#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011221_ACEOF
11222
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011223 have_long_long=yes
11224
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011225else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011227sed 's/^/| /' conftest.$ac_ext >&5
11228
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011231
11232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011233{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11234echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011235if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011236{ echo "$as_me:$LINENO: checking for long long" >&5
11237echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11238if test "${ac_cv_type_long_long+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11240else
11241 cat >conftest.$ac_ext <<_ACEOF
11242/* confdefs.h. */
11243_ACEOF
11244cat confdefs.h >>conftest.$ac_ext
11245cat >>conftest.$ac_ext <<_ACEOF
11246/* end confdefs.h. */
11247$ac_includes_default
11248typedef long long ac__type_new_;
11249int
11250main ()
11251{
11252if ((ac__type_new_ *) 0)
11253 return 0;
11254if (sizeof (ac__type_new_))
11255 return 0;
11256 ;
11257 return 0;
11258}
11259_ACEOF
11260rm -f conftest.$ac_objext
11261if { (ac_try="$ac_compile"
11262case "(($ac_try" in
11263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11264 *) ac_try_echo=$ac_try;;
11265esac
11266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11267 (eval "$ac_compile") 2>conftest.er1
11268 ac_status=$?
11269 grep -v '^ *+' conftest.er1 >conftest.err
11270 rm -f conftest.er1
11271 cat conftest.err >&5
11272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11273 (exit $ac_status); } && {
11274 test -z "$ac_c_werror_flag" ||
11275 test ! -s conftest.err
11276 } && test -s conftest.$ac_objext; then
11277 ac_cv_type_long_long=yes
11278else
11279 echo "$as_me: failed program was:" >&5
11280sed 's/^/| /' conftest.$ac_ext >&5
11281
11282 ac_cv_type_long_long=no
11283fi
11284
11285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286fi
11287{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11288echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11289
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290# The cast to long int works around a bug in the HP C Compiler
11291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11293# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011294{ echo "$as_me:$LINENO: checking size of long long" >&5
11295echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011296if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011298else
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 if test "$cross_compiling" = yes; then
11300 # Depending upon the size, compute the lo and hi bounds.
11301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* confdefs.h. */
11303_ACEOF
11304cat confdefs.h >>conftest.$ac_ext
11305cat >>conftest.$ac_ext <<_ACEOF
11306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011307$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011308 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011309int
11310main ()
11311{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011313test_array [0] = 0
11314
11315 ;
11316 return 0;
11317}
11318_ACEOF
11319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320if { (ac_try="$ac_compile"
11321case "(($ac_try" in
11322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11323 *) ac_try_echo=$ac_try;;
11324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011328 grep -v '^ *+' conftest.er1 >conftest.err
11329 rm -f conftest.er1
11330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011332 (exit $ac_status); } && {
11333 test -z "$ac_c_werror_flag" ||
11334 test ! -s conftest.err
11335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ac_lo=0 ac_mid=0
11337 while :; do
11338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* confdefs.h. */
11340_ACEOF
11341cat confdefs.h >>conftest.$ac_ext
11342cat >>conftest.$ac_ext <<_ACEOF
11343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011344$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011345 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011346int
11347main ()
11348{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011350test_array [0] = 0
11351
11352 ;
11353 return 0;
11354}
11355_ACEOF
11356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011357if { (ac_try="$ac_compile"
11358case "(($ac_try" in
11359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11360 *) ac_try_echo=$ac_try;;
11361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011365 grep -v '^ *+' conftest.er1 >conftest.err
11366 rm -f conftest.er1
11367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 (exit $ac_status); } && {
11370 test -z "$ac_c_werror_flag" ||
11371 test ! -s conftest.err
11372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
11379 if test $ac_lo -le $ac_mid; then
11380 ac_lo= ac_hi=
11381 break
11382 fi
11383 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385
11386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 done
11388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011390sed 's/^/| /' conftest.$ac_ext >&5
11391
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* confdefs.h. */
11394_ACEOF
11395cat confdefs.h >>conftest.$ac_ext
11396cat >>conftest.$ac_ext <<_ACEOF
11397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011398$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011400int
11401main ()
11402{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011404test_array [0] = 0
11405
11406 ;
11407 return 0;
11408}
11409_ACEOF
11410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011411if { (ac_try="$ac_compile"
11412case "(($ac_try" in
11413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11414 *) ac_try_echo=$ac_try;;
11415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011419 grep -v '^ *+' conftest.er1 >conftest.err
11420 rm -f conftest.er1
11421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423 (exit $ac_status); } && {
11424 test -z "$ac_c_werror_flag" ||
11425 test ! -s conftest.err
11426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_hi=-1 ac_mid=-1
11428 while :; do
11429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011430/* confdefs.h. */
11431_ACEOF
11432cat confdefs.h >>conftest.$ac_ext
11433cat >>conftest.$ac_ext <<_ACEOF
11434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011435$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011436 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011437int
11438main ()
11439{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011441test_array [0] = 0
11442
11443 ;
11444 return 0;
11445}
11446_ACEOF
11447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011448if { (ac_try="$ac_compile"
11449case "(($ac_try" in
11450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11451 *) ac_try_echo=$ac_try;;
11452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011456 grep -v '^ *+' conftest.er1 >conftest.err
11457 rm -f conftest.er1
11458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 (exit $ac_status); } && {
11461 test -z "$ac_c_werror_flag" ||
11462 test ! -s conftest.err
11463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011464 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
11470 if test $ac_mid -le $ac_hi; then
11471 ac_lo= ac_hi=
11472 break
11473 fi
11474 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 done
11479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011481sed 's/^/| /' conftest.$ac_ext >&5
11482
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011485
11486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011488
11489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011490# Binary search between lo and hi bounds.
11491while test "x$ac_lo" != "x$ac_hi"; do
11492 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* confdefs.h. */
11495_ACEOF
11496cat confdefs.h >>conftest.$ac_ext
11497cat >>conftest.$ac_ext <<_ACEOF
11498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011501int
11502main ()
11503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011505test_array [0] = 0
11506
11507 ;
11508 return 0;
11509}
11510_ACEOF
11511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512if { (ac_try="$ac_compile"
11513case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011520 grep -v '^ *+' conftest.er1 >conftest.err
11521 rm -f conftest.er1
11522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011524 (exit $ac_status); } && {
11525 test -z "$ac_c_werror_flag" ||
11526 test ! -s conftest.err
11527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 ac_hi=$ac_mid
11529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
Martin v. Löwiseba40652007-08-30 20:10:57 +000011533 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011535
11536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011537done
11538case $ac_lo in
11539?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011542See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011543echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011544See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011545 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546 else
11547 ac_cv_sizeof_long_long=0
11548 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011549esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011550else
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011552/* confdefs.h. */
11553_ACEOF
11554cat confdefs.h >>conftest.$ac_ext
11555cat >>conftest.$ac_ext <<_ACEOF
11556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011557$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011558 typedef long long ac__type_sizeof_;
11559static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11560static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011561#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011563int
11564main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565{
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
11567 FILE *f = fopen ("conftest.val", "w");
11568 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011570 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011575 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 }
11577 else
11578 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011579 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011580 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011584 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
11586 ;
11587 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588}
Martin v. Löwis11437992002-04-12 09:54:03 +000011589_ACEOF
11590rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011591if { (ac_try="$ac_link"
11592case "(($ac_try" in
11593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11594 *) ac_try_echo=$ac_try;;
11595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011601 { (case "(($ac_try" in
11602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11603 *) ac_try_echo=$ac_try;;
11604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011606 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011607 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 (exit $ac_status); }; }; then
11610 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011612 echo "$as_me: program exited with status $ac_status" >&5
11613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011614sed 's/^/| /' conftest.$ac_ext >&5
11615
Martin v. Löwis11437992002-04-12 09:54:03 +000011616( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011617if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011618 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011619See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011620echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011621See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011622 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623 else
11624 ac_cv_sizeof_long_long=0
11625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011627rm -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 +000011628fi
11629rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011631{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11632echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633
11634
11635
Martin v. Löwis11437992002-04-12 09:54:03 +000011636cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011637#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011638_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011639
Michael W. Hudson54241132001-12-07 15:38:26 +000011640
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011641fi
11642
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011643{ echo "$as_me:$LINENO: checking for long double support" >&5
11644echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011645have_long_double=no
11646cat >conftest.$ac_ext <<_ACEOF
11647/* confdefs.h. */
11648_ACEOF
11649cat confdefs.h >>conftest.$ac_ext
11650cat >>conftest.$ac_ext <<_ACEOF
11651/* end confdefs.h. */
11652
11653int
11654main ()
11655{
11656long double x; x = (long double)0.;
11657 ;
11658 return 0;
11659}
11660_ACEOF
11661rm -f conftest.$ac_objext
11662if { (ac_try="$ac_compile"
11663case "(($ac_try" in
11664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11665 *) ac_try_echo=$ac_try;;
11666esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011668 (eval "$ac_compile") 2>conftest.er1
11669 ac_status=$?
11670 grep -v '^ *+' conftest.er1 >conftest.err
11671 rm -f conftest.er1
11672 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011674 (exit $ac_status); } && {
11675 test -z "$ac_c_werror_flag" ||
11676 test ! -s conftest.err
11677 } && test -s conftest.$ac_objext; then
11678
11679
11680cat >>confdefs.h <<\_ACEOF
11681#define HAVE_LONG_DOUBLE 1
11682_ACEOF
11683
11684 have_long_double=yes
11685
11686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011687 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011688sed 's/^/| /' conftest.$ac_ext >&5
11689
11690
11691fi
11692
11693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011694{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11695echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011696if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011697{ echo "$as_me:$LINENO: checking for long double" >&5
11698echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11699if test "${ac_cv_type_long_double+set}" = set; then
11700 echo $ECHO_N "(cached) $ECHO_C" >&6
11701else
11702 cat >conftest.$ac_ext <<_ACEOF
11703/* confdefs.h. */
11704_ACEOF
11705cat confdefs.h >>conftest.$ac_ext
11706cat >>conftest.$ac_ext <<_ACEOF
11707/* end confdefs.h. */
11708$ac_includes_default
11709typedef long double ac__type_new_;
11710int
11711main ()
11712{
11713if ((ac__type_new_ *) 0)
11714 return 0;
11715if (sizeof (ac__type_new_))
11716 return 0;
11717 ;
11718 return 0;
11719}
11720_ACEOF
11721rm -f conftest.$ac_objext
11722if { (ac_try="$ac_compile"
11723case "(($ac_try" in
11724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11725 *) ac_try_echo=$ac_try;;
11726esac
11727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11728 (eval "$ac_compile") 2>conftest.er1
11729 ac_status=$?
11730 grep -v '^ *+' conftest.er1 >conftest.err
11731 rm -f conftest.er1
11732 cat conftest.err >&5
11733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11734 (exit $ac_status); } && {
11735 test -z "$ac_c_werror_flag" ||
11736 test ! -s conftest.err
11737 } && test -s conftest.$ac_objext; then
11738 ac_cv_type_long_double=yes
11739else
11740 echo "$as_me: failed program was:" >&5
11741sed 's/^/| /' conftest.$ac_ext >&5
11742
11743 ac_cv_type_long_double=no
11744fi
11745
11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11747fi
11748{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11749echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11750
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011751# The cast to long int works around a bug in the HP C Compiler
11752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11754# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011755{ echo "$as_me:$LINENO: checking size of long double" >&5
11756echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011757if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011758 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011759else
11760 if test "$cross_compiling" = yes; then
11761 # Depending upon the size, compute the lo and hi bounds.
11762cat >conftest.$ac_ext <<_ACEOF
11763/* confdefs.h. */
11764_ACEOF
11765cat confdefs.h >>conftest.$ac_ext
11766cat >>conftest.$ac_ext <<_ACEOF
11767/* end confdefs.h. */
11768$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011769 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011770int
11771main ()
11772{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011773static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011774test_array [0] = 0
11775
11776 ;
11777 return 0;
11778}
11779_ACEOF
11780rm -f conftest.$ac_objext
11781if { (ac_try="$ac_compile"
11782case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011787 (eval "$ac_compile") 2>conftest.er1
11788 ac_status=$?
11789 grep -v '^ *+' conftest.er1 >conftest.err
11790 rm -f conftest.er1
11791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011793 (exit $ac_status); } && {
11794 test -z "$ac_c_werror_flag" ||
11795 test ! -s conftest.err
11796 } && test -s conftest.$ac_objext; then
11797 ac_lo=0 ac_mid=0
11798 while :; do
11799 cat >conftest.$ac_ext <<_ACEOF
11800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
11805$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011806 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011807int
11808main ()
11809{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011811test_array [0] = 0
11812
11813 ;
11814 return 0;
11815}
11816_ACEOF
11817rm -f conftest.$ac_objext
11818if { (ac_try="$ac_compile"
11819case "(($ac_try" in
11820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11821 *) ac_try_echo=$ac_try;;
11822esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011824 (eval "$ac_compile") 2>conftest.er1
11825 ac_status=$?
11826 grep -v '^ *+' conftest.er1 >conftest.err
11827 rm -f conftest.er1
11828 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011830 (exit $ac_status); } && {
11831 test -z "$ac_c_werror_flag" ||
11832 test ! -s conftest.err
11833 } && test -s conftest.$ac_objext; then
11834 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
11840 if test $ac_lo -le $ac_mid; then
11841 ac_lo= ac_hi=
11842 break
11843 fi
11844 ac_mid=`expr 2 '*' $ac_mid + 1`
11845fi
11846
11847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11848 done
11849else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011850 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011851sed 's/^/| /' conftest.$ac_ext >&5
11852
11853 cat >conftest.$ac_ext <<_ACEOF
11854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
11859$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861int
11862main ()
11863{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011865test_array [0] = 0
11866
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
11872if { (ac_try="$ac_compile"
11873case "(($ac_try" in
11874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11875 *) ac_try_echo=$ac_try;;
11876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011878 (eval "$ac_compile") 2>conftest.er1
11879 ac_status=$?
11880 grep -v '^ *+' conftest.er1 >conftest.err
11881 rm -f conftest.er1
11882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011884 (exit $ac_status); } && {
11885 test -z "$ac_c_werror_flag" ||
11886 test ! -s conftest.err
11887 } && test -s conftest.$ac_objext; then
11888 ac_hi=-1 ac_mid=-1
11889 while :; do
11890 cat >conftest.$ac_ext <<_ACEOF
11891/* confdefs.h. */
11892_ACEOF
11893cat confdefs.h >>conftest.$ac_ext
11894cat >>conftest.$ac_ext <<_ACEOF
11895/* end confdefs.h. */
11896$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011897 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011898int
11899main ()
11900{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011902test_array [0] = 0
11903
11904 ;
11905 return 0;
11906}
11907_ACEOF
11908rm -f conftest.$ac_objext
11909if { (ac_try="$ac_compile"
11910case "(($ac_try" in
11911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11912 *) ac_try_echo=$ac_try;;
11913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011915 (eval "$ac_compile") 2>conftest.er1
11916 ac_status=$?
11917 grep -v '^ *+' conftest.er1 >conftest.err
11918 rm -f conftest.er1
11919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011921 (exit $ac_status); } && {
11922 test -z "$ac_c_werror_flag" ||
11923 test ! -s conftest.err
11924 } && test -s conftest.$ac_objext; then
11925 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
11931 if test $ac_mid -le $ac_hi; then
11932 ac_lo= ac_hi=
11933 break
11934 fi
11935 ac_mid=`expr 2 '*' $ac_mid`
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939 done
11940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011941 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011942sed 's/^/| /' conftest.$ac_ext >&5
11943
11944 ac_lo= ac_hi=
11945fi
11946
11947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11948fi
11949
11950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11951# Binary search between lo and hi bounds.
11952while test "x$ac_lo" != "x$ac_hi"; do
11953 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11954 cat >conftest.$ac_ext <<_ACEOF
11955/* confdefs.h. */
11956_ACEOF
11957cat confdefs.h >>conftest.$ac_ext
11958cat >>conftest.$ac_ext <<_ACEOF
11959/* end confdefs.h. */
11960$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962int
11963main ()
11964{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011966test_array [0] = 0
11967
11968 ;
11969 return 0;
11970}
11971_ACEOF
11972rm -f conftest.$ac_objext
11973if { (ac_try="$ac_compile"
11974case "(($ac_try" in
11975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11976 *) ac_try_echo=$ac_try;;
11977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011979 (eval "$ac_compile") 2>conftest.er1
11980 ac_status=$?
11981 grep -v '^ *+' conftest.er1 >conftest.err
11982 rm -f conftest.er1
11983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011985 (exit $ac_status); } && {
11986 test -z "$ac_c_werror_flag" ||
11987 test ! -s conftest.err
11988 } && test -s conftest.$ac_objext; then
11989 ac_hi=$ac_mid
11990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011991 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011992sed 's/^/| /' conftest.$ac_ext >&5
11993
11994 ac_lo=`expr '(' $ac_mid ')' + 1`
11995fi
11996
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998done
11999case $ac_lo in
12000?*) ac_cv_sizeof_long_double=$ac_lo;;
12001'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012002 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012003See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012004echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012005See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012006 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012007 else
12008 ac_cv_sizeof_long_double=0
12009 fi ;;
12010esac
12011else
12012 cat >conftest.$ac_ext <<_ACEOF
12013/* confdefs.h. */
12014_ACEOF
12015cat confdefs.h >>conftest.$ac_ext
12016cat >>conftest.$ac_ext <<_ACEOF
12017/* end confdefs.h. */
12018$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012019 typedef long double ac__type_sizeof_;
12020static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12021static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012022#include <stdio.h>
12023#include <stdlib.h>
12024int
12025main ()
12026{
12027
12028 FILE *f = fopen ("conftest.val", "w");
12029 if (! f)
12030 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012031 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012032 {
12033 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012036 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012037 }
12038 else
12039 {
12040 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012041 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012042 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044 }
12045 return ferror (f) || fclose (f) != 0;
12046
12047 ;
12048 return 0;
12049}
12050_ACEOF
12051rm -f conftest$ac_exeext
12052if { (ac_try="$ac_link"
12053case "(($ac_try" in
12054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12055 *) ac_try_echo=$ac_try;;
12056esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012058 (eval "$ac_link") 2>&5
12059 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12062 { (case "(($ac_try" in
12063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12064 *) ac_try_echo=$ac_try;;
12065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012067 (eval "$ac_try") 2>&5
12068 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012070 (exit $ac_status); }; }; then
12071 ac_cv_sizeof_long_double=`cat conftest.val`
12072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012073 echo "$as_me: program exited with status $ac_status" >&5
12074echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012075sed 's/^/| /' conftest.$ac_ext >&5
12076
12077( exit $ac_status )
12078if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012079 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012080See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012081echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012082See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012083 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012084 else
12085 ac_cv_sizeof_long_double=0
12086 fi
12087fi
12088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12089fi
12090rm -f conftest.val
12091fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012092{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12093echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012094
12095
12096
12097cat >>confdefs.h <<_ACEOF
12098#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12099_ACEOF
12100
12101
12102fi
12103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012104{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12105echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012106have_c99_bool=no
12107cat >conftest.$ac_ext <<_ACEOF
12108/* confdefs.h. */
12109_ACEOF
12110cat confdefs.h >>conftest.$ac_ext
12111cat >>conftest.$ac_ext <<_ACEOF
12112/* end confdefs.h. */
12113
12114int
12115main ()
12116{
12117_Bool x; x = (_Bool)0;
12118 ;
12119 return 0;
12120}
12121_ACEOF
12122rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012123if { (ac_try="$ac_compile"
12124case "(($ac_try" in
12125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12126 *) ac_try_echo=$ac_try;;
12127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130 ac_status=$?
12131 grep -v '^ *+' conftest.er1 >conftest.err
12132 rm -f conftest.er1
12133 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012135 (exit $ac_status); } && {
12136 test -z "$ac_c_werror_flag" ||
12137 test ! -s conftest.err
12138 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012139
12140
12141cat >>confdefs.h <<\_ACEOF
12142#define HAVE_C99_BOOL 1
12143_ACEOF
12144
12145 have_c99_bool=yes
12146
12147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012148 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012149sed 's/^/| /' conftest.$ac_ext >&5
12150
Martin v. Löwiseba40652007-08-30 20:10:57 +000012151
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012153
12154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012155{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12156echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012157if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012158{ echo "$as_me:$LINENO: checking for _Bool" >&5
12159echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12160if test "${ac_cv_type__Bool+set}" = set; then
12161 echo $ECHO_N "(cached) $ECHO_C" >&6
12162else
12163 cat >conftest.$ac_ext <<_ACEOF
12164/* confdefs.h. */
12165_ACEOF
12166cat confdefs.h >>conftest.$ac_ext
12167cat >>conftest.$ac_ext <<_ACEOF
12168/* end confdefs.h. */
12169$ac_includes_default
12170typedef _Bool ac__type_new_;
12171int
12172main ()
12173{
12174if ((ac__type_new_ *) 0)
12175 return 0;
12176if (sizeof (ac__type_new_))
12177 return 0;
12178 ;
12179 return 0;
12180}
12181_ACEOF
12182rm -f conftest.$ac_objext
12183if { (ac_try="$ac_compile"
12184case "(($ac_try" in
12185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12186 *) ac_try_echo=$ac_try;;
12187esac
12188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12189 (eval "$ac_compile") 2>conftest.er1
12190 ac_status=$?
12191 grep -v '^ *+' conftest.er1 >conftest.err
12192 rm -f conftest.er1
12193 cat conftest.err >&5
12194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12195 (exit $ac_status); } && {
12196 test -z "$ac_c_werror_flag" ||
12197 test ! -s conftest.err
12198 } && test -s conftest.$ac_objext; then
12199 ac_cv_type__Bool=yes
12200else
12201 echo "$as_me: failed program was:" >&5
12202sed 's/^/| /' conftest.$ac_ext >&5
12203
12204 ac_cv_type__Bool=no
12205fi
12206
12207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12208fi
12209{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12210echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12211
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212# The cast to long int works around a bug in the HP C Compiler
12213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12215# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012216{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12217echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012218if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012219 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012220else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012221 if test "$cross_compiling" = yes; then
12222 # Depending upon the size, compute the lo and hi bounds.
12223cat >conftest.$ac_ext <<_ACEOF
12224/* confdefs.h. */
12225_ACEOF
12226cat confdefs.h >>conftest.$ac_ext
12227cat >>conftest.$ac_ext <<_ACEOF
12228/* end confdefs.h. */
12229$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012230 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012231int
12232main ()
12233{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012235test_array [0] = 0
12236
12237 ;
12238 return 0;
12239}
12240_ACEOF
12241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242if { (ac_try="$ac_compile"
12243case "(($ac_try" in
12244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12245 *) ac_try_echo=$ac_try;;
12246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249 ac_status=$?
12250 grep -v '^ *+' conftest.er1 >conftest.err
12251 rm -f conftest.er1
12252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254 (exit $ac_status); } && {
12255 test -z "$ac_c_werror_flag" ||
12256 test ! -s conftest.err
12257 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012258 ac_lo=0 ac_mid=0
12259 while :; do
12260 cat >conftest.$ac_ext <<_ACEOF
12261/* confdefs.h. */
12262_ACEOF
12263cat confdefs.h >>conftest.$ac_ext
12264cat >>conftest.$ac_ext <<_ACEOF
12265/* end confdefs.h. */
12266$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012267 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012268int
12269main ()
12270{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012271static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272test_array [0] = 0
12273
12274 ;
12275 return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012279if { (ac_try="$ac_compile"
12280case "(($ac_try" in
12281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12282 *) ac_try_echo=$ac_try;;
12283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286 ac_status=$?
12287 grep -v '^ *+' conftest.er1 >conftest.err
12288 rm -f conftest.er1
12289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 (exit $ac_status); } && {
12292 test -z "$ac_c_werror_flag" ||
12293 test ! -s conftest.err
12294 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012295 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
12301 if test $ac_lo -le $ac_mid; then
12302 ac_lo= ac_hi=
12303 break
12304 fi
12305 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012307
12308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012309 done
12310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012311 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012312sed 's/^/| /' conftest.$ac_ext >&5
12313
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315/* confdefs.h. */
12316_ACEOF
12317cat confdefs.h >>conftest.$ac_ext
12318cat >>conftest.$ac_ext <<_ACEOF
12319/* end confdefs.h. */
12320$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012322int
12323main ()
12324{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326test_array [0] = 0
12327
12328 ;
12329 return 0;
12330}
12331_ACEOF
12332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333if { (ac_try="$ac_compile"
12334case "(($ac_try" in
12335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12336 *) ac_try_echo=$ac_try;;
12337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340 ac_status=$?
12341 grep -v '^ *+' conftest.er1 >conftest.err
12342 rm -f conftest.er1
12343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 (exit $ac_status); } && {
12346 test -z "$ac_c_werror_flag" ||
12347 test ! -s conftest.err
12348 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349 ac_hi=-1 ac_mid=-1
12350 while :; do
12351 cat >conftest.$ac_ext <<_ACEOF
12352/* confdefs.h. */
12353_ACEOF
12354cat confdefs.h >>conftest.$ac_ext
12355cat >>conftest.$ac_ext <<_ACEOF
12356/* end confdefs.h. */
12357$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012358 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359int
12360main ()
12361{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363test_array [0] = 0
12364
12365 ;
12366 return 0;
12367}
12368_ACEOF
12369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370if { (ac_try="$ac_compile"
12371case "(($ac_try" in
12372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12373 *) ac_try_echo=$ac_try;;
12374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 ac_status=$?
12378 grep -v '^ *+' conftest.er1 >conftest.err
12379 rm -f conftest.er1
12380 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 (exit $ac_status); } && {
12383 test -z "$ac_c_werror_flag" ||
12384 test ! -s conftest.err
12385 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012386 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
12392 if test $ac_mid -le $ac_hi; then
12393 ac_lo= ac_hi=
12394 break
12395 fi
12396 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012398
12399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400 done
12401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012402 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403sed 's/^/| /' conftest.$ac_ext >&5
12404
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407
12408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012410
12411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012412# Binary search between lo and hi bounds.
12413while test "x$ac_lo" != "x$ac_hi"; do
12414 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12415 cat >conftest.$ac_ext <<_ACEOF
12416/* confdefs.h. */
12417_ACEOF
12418cat confdefs.h >>conftest.$ac_ext
12419cat >>conftest.$ac_ext <<_ACEOF
12420/* end confdefs.h. */
12421$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012423int
12424main ()
12425{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012426static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427test_array [0] = 0
12428
12429 ;
12430 return 0;
12431}
12432_ACEOF
12433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434if { (ac_try="$ac_compile"
12435case "(($ac_try" in
12436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12437 *) ac_try_echo=$ac_try;;
12438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441 ac_status=$?
12442 grep -v '^ *+' conftest.er1 >conftest.err
12443 rm -f conftest.er1
12444 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012446 (exit $ac_status); } && {
12447 test -z "$ac_c_werror_flag" ||
12448 test ! -s conftest.err
12449 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450 ac_hi=$ac_mid
12451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012452 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012453sed 's/^/| /' conftest.$ac_ext >&5
12454
Martin v. Löwiseba40652007-08-30 20:10:57 +000012455 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457
12458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459done
12460case $ac_lo in
12461?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012462'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012463 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012464See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012465echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012466See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012467 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 else
12469 ac_cv_sizeof__Bool=0
12470 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012471esac
12472else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012473 cat >conftest.$ac_ext <<_ACEOF
12474/* confdefs.h. */
12475_ACEOF
12476cat confdefs.h >>conftest.$ac_ext
12477cat >>conftest.$ac_ext <<_ACEOF
12478/* end confdefs.h. */
12479$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012480 typedef _Bool ac__type_sizeof_;
12481static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12482static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483#include <stdio.h>
12484#include <stdlib.h>
12485int
12486main ()
12487{
12488
12489 FILE *f = fopen ("conftest.val", "w");
12490 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012491 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012492 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012493 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012497 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012498 }
12499 else
12500 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012501 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012502 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012503 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012505 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012506 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012507
12508 ;
12509 return 0;
12510}
12511_ACEOF
12512rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012513if { (ac_try="$ac_link"
12514case "(($ac_try" in
12515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12516 *) ac_try_echo=$ac_try;;
12517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012519 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012522 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012523 { (case "(($ac_try" in
12524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12525 *) ac_try_echo=$ac_try;;
12526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012528 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012531 (exit $ac_status); }; }; then
12532 ac_cv_sizeof__Bool=`cat conftest.val`
12533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012534 echo "$as_me: program exited with status $ac_status" >&5
12535echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012536sed 's/^/| /' conftest.$ac_ext >&5
12537
12538( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012540 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012541See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012542echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012544 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545 else
12546 ac_cv_sizeof__Bool=0
12547 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012549rm -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 +000012550fi
12551rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012552fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012553{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12554echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012555
12556
12557
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012558cat >>confdefs.h <<_ACEOF
12559#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12560_ACEOF
12561
12562
12563fi
12564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012565{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12566echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012567if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012568 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012569else
12570 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* confdefs.h. */
12572_ACEOF
12573cat confdefs.h >>conftest.$ac_ext
12574cat >>conftest.$ac_ext <<_ACEOF
12575/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012576#ifdef HAVE_STDINT_H
12577 #include <stdint.h>
12578 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012579
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012580typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584if ((ac__type_new_ *) 0)
12585 return 0;
12586if (sizeof (ac__type_new_))
12587 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
12592rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593if { (ac_try="$ac_compile"
12594case "(($ac_try" in
12595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12596 *) ac_try_echo=$ac_try;;
12597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012599 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012601 grep -v '^ *+' conftest.er1 >conftest.err
12602 rm -f conftest.er1
12603 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605 (exit $ac_status); } && {
12606 test -z "$ac_c_werror_flag" ||
12607 test ! -s conftest.err
12608 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012609 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012610else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012612sed 's/^/| /' conftest.$ac_ext >&5
12613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012614 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012616
12617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012618fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012619{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12620echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12621if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012622
12623cat >>confdefs.h <<_ACEOF
12624#define HAVE_UINTPTR_T 1
12625_ACEOF
12626
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012627{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12628echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12629if test "${ac_cv_type_uintptr_t+set}" = set; then
12630 echo $ECHO_N "(cached) $ECHO_C" >&6
12631else
12632 cat >conftest.$ac_ext <<_ACEOF
12633/* confdefs.h. */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h. */
12638$ac_includes_default
12639typedef uintptr_t ac__type_new_;
12640int
12641main ()
12642{
12643if ((ac__type_new_ *) 0)
12644 return 0;
12645if (sizeof (ac__type_new_))
12646 return 0;
12647 ;
12648 return 0;
12649}
12650_ACEOF
12651rm -f conftest.$ac_objext
12652if { (ac_try="$ac_compile"
12653case "(($ac_try" in
12654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12655 *) ac_try_echo=$ac_try;;
12656esac
12657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12658 (eval "$ac_compile") 2>conftest.er1
12659 ac_status=$?
12660 grep -v '^ *+' conftest.er1 >conftest.err
12661 rm -f conftest.er1
12662 cat conftest.err >&5
12663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12664 (exit $ac_status); } && {
12665 test -z "$ac_c_werror_flag" ||
12666 test ! -s conftest.err
12667 } && test -s conftest.$ac_objext; then
12668 ac_cv_type_uintptr_t=yes
12669else
12670 echo "$as_me: failed program was:" >&5
12671sed 's/^/| /' conftest.$ac_ext >&5
12672
12673 ac_cv_type_uintptr_t=no
12674fi
12675
12676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12677fi
12678{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12679echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12680
Martin v. Löwiseba40652007-08-30 20:10:57 +000012681# The cast to long int works around a bug in the HP C Compiler
12682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12684# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012685{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12686echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012687if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012688 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012689else
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 if test "$cross_compiling" = yes; then
12691 # Depending upon the size, compute the lo and hi bounds.
12692cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012693/* confdefs.h. */
12694_ACEOF
12695cat confdefs.h >>conftest.$ac_ext
12696cat >>conftest.$ac_ext <<_ACEOF
12697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012698$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012699 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012700int
12701main ()
12702{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012703static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012704test_array [0] = 0
12705
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711if { (ac_try="$ac_compile"
12712case "(($ac_try" in
12713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12714 *) ac_try_echo=$ac_try;;
12715esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012717 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012718 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012719 grep -v '^ *+' conftest.er1 >conftest.err
12720 rm -f conftest.er1
12721 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012723 (exit $ac_status); } && {
12724 test -z "$ac_c_werror_flag" ||
12725 test ! -s conftest.err
12726 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_lo=0 ac_mid=0
12728 while :; do
12729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* confdefs.h. */
12731_ACEOF
12732cat confdefs.h >>conftest.$ac_ext
12733cat >>conftest.$ac_ext <<_ACEOF
12734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012735$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012736 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012737int
12738main ()
12739{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012740static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012741test_array [0] = 0
12742
12743 ;
12744 return 0;
12745}
12746_ACEOF
12747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748if { (ac_try="$ac_compile"
12749case "(($ac_try" in
12750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12751 *) ac_try_echo=$ac_try;;
12752esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012756 grep -v '^ *+' conftest.er1 >conftest.err
12757 rm -f conftest.er1
12758 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 (exit $ac_status); } && {
12761 test -z "$ac_c_werror_flag" ||
12762 test ! -s conftest.err
12763 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ac_hi=$ac_mid; break
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 ac_lo=`expr $ac_mid + 1`
12770 if test $ac_lo -le $ac_mid; then
12771 ac_lo= ac_hi=
12772 break
12773 fi
12774 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012775fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776
12777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012778 done
12779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012781sed 's/^/| /' conftest.$ac_ext >&5
12782
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012784/* confdefs.h. */
12785_ACEOF
12786cat confdefs.h >>conftest.$ac_ext
12787cat >>conftest.$ac_ext <<_ACEOF
12788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012789$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012791int
12792main ()
12793{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012794static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012795test_array [0] = 0
12796
12797 ;
12798 return 0;
12799}
12800_ACEOF
12801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012802if { (ac_try="$ac_compile"
12803case "(($ac_try" in
12804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12805 *) ac_try_echo=$ac_try;;
12806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012810 grep -v '^ *+' conftest.er1 >conftest.err
12811 rm -f conftest.er1
12812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814 (exit $ac_status); } && {
12815 test -z "$ac_c_werror_flag" ||
12816 test ! -s conftest.err
12817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ac_hi=-1 ac_mid=-1
12819 while :; do
12820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012821/* confdefs.h. */
12822_ACEOF
12823cat confdefs.h >>conftest.$ac_ext
12824cat >>conftest.$ac_ext <<_ACEOF
12825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012826$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012827 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012828int
12829main ()
12830{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012831static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012832test_array [0] = 0
12833
12834 ;
12835 return 0;
12836}
12837_ACEOF
12838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012839if { (ac_try="$ac_compile"
12840case "(($ac_try" in
12841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12842 *) ac_try_echo=$ac_try;;
12843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012847 grep -v '^ *+' conftest.er1 >conftest.err
12848 rm -f conftest.er1
12849 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 (exit $ac_status); } && {
12852 test -z "$ac_c_werror_flag" ||
12853 test ! -s conftest.err
12854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 ac_lo=$ac_mid; break
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_hi=`expr '(' $ac_mid ')' - 1`
12861 if test $ac_mid -le $ac_hi; then
12862 ac_lo= ac_hi=
12863 break
12864 fi
12865 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867
12868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 done
12870else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012872sed 's/^/| /' conftest.$ac_ext >&5
12873
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876
12877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012879
12880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012881# Binary search between lo and hi bounds.
12882while test "x$ac_lo" != "x$ac_hi"; do
12883 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* confdefs.h. */
12886_ACEOF
12887cat confdefs.h >>conftest.$ac_ext
12888cat >>conftest.$ac_ext <<_ACEOF
12889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892int
12893main ()
12894{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012896test_array [0] = 0
12897
12898 ;
12899 return 0;
12900}
12901_ACEOF
12902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903if { (ac_try="$ac_compile"
12904case "(($ac_try" in
12905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12906 *) ac_try_echo=$ac_try;;
12907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012911 grep -v '^ *+' conftest.er1 >conftest.err
12912 rm -f conftest.er1
12913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012915 (exit $ac_status); } && {
12916 test -z "$ac_c_werror_flag" ||
12917 test ! -s conftest.err
12918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ac_hi=$ac_mid
12920else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012926
12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012928done
12929case $ac_lo in
12930?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012932 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012933See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012934echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012935See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012936 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937 else
12938 ac_cv_sizeof_uintptr_t=0
12939 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012940esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012941else
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* confdefs.h. */
12944_ACEOF
12945cat confdefs.h >>conftest.$ac_ext
12946cat >>conftest.$ac_ext <<_ACEOF
12947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012948$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012949 typedef uintptr_t ac__type_sizeof_;
12950static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12951static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012952#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012953#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012954int
12955main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012956{
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
12958 FILE *f = fopen ("conftest.val", "w");
12959 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012960 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012961 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012963 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012966 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 }
12968 else
12969 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012970 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012971 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012975 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
12977 ;
12978 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012979}
Martin v. Löwis11437992002-04-12 09:54:03 +000012980_ACEOF
12981rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012982if { (ac_try="$ac_link"
12983case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012992 { (case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012997 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 (exit $ac_status); }; }; then
13001 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013003 echo "$as_me: program exited with status $ac_status" >&5
13004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013005sed 's/^/| /' conftest.$ac_ext >&5
13006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013008if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013009 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013010See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013011echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013012See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013013 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013014 else
13015 ac_cv_sizeof_uintptr_t=0
13016 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013018rm -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 +000013019fi
13020rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013022{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13023echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013024
13025
13026
Martin v. Löwis11437992002-04-12 09:54:03 +000013027cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013028#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013029_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013030
Michael W. Hudson54241132001-12-07 15:38:26 +000013031
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013032fi
13033
Martin v. Löwisebe26702006-10-02 14:55:51 +000013034
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013035{ echo "$as_me:$LINENO: checking for off_t" >&5
13036echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13037if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013039else
Martin v. Löwis11437992002-04-12 09:54:03 +000013040 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013041/* confdefs.h. */
13042_ACEOF
13043cat confdefs.h >>conftest.$ac_ext
13044cat >>conftest.$ac_ext <<_ACEOF
13045/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013046
13047#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013048#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013049#endif
13050
13051
13052typedef off_t ac__type_new_;
13053int
13054main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013055{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013056if ((ac__type_new_ *) 0)
13057 return 0;
13058if (sizeof (ac__type_new_))
13059 return 0;
13060 ;
13061 return 0;
13062}
13063_ACEOF
13064rm -f conftest.$ac_objext
13065if { (ac_try="$ac_compile"
13066case "(($ac_try" in
13067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13068 *) ac_try_echo=$ac_try;;
13069esac
13070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13071 (eval "$ac_compile") 2>conftest.er1
13072 ac_status=$?
13073 grep -v '^ *+' conftest.er1 >conftest.err
13074 rm -f conftest.er1
13075 cat conftest.err >&5
13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077 (exit $ac_status); } && {
13078 test -z "$ac_c_werror_flag" ||
13079 test ! -s conftest.err
13080 } && test -s conftest.$ac_objext; then
13081 ac_cv_type_off_t=yes
13082else
13083 echo "$as_me: failed program was:" >&5
13084sed 's/^/| /' conftest.$ac_ext >&5
13085
13086 ac_cv_type_off_t=no
13087fi
13088
13089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13090fi
13091{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13092echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13093
13094# The cast to long int works around a bug in the HP C Compiler
13095# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13096# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13097# This bug is HP SR number 8606223364.
13098{ echo "$as_me:$LINENO: checking size of off_t" >&5
13099echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13100if test "${ac_cv_sizeof_off_t+set}" = set; then
13101 echo $ECHO_N "(cached) $ECHO_C" >&6
13102else
13103 if test "$cross_compiling" = yes; then
13104 # Depending upon the size, compute the lo and hi bounds.
13105cat >conftest.$ac_ext <<_ACEOF
13106/* confdefs.h. */
13107_ACEOF
13108cat confdefs.h >>conftest.$ac_ext
13109cat >>conftest.$ac_ext <<_ACEOF
13110/* end confdefs.h. */
13111
13112#ifdef HAVE_SYS_TYPES_H
13113#include <sys/types.h>
13114#endif
13115
13116
13117 typedef off_t ac__type_sizeof_;
13118int
13119main ()
13120{
13121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13122test_array [0] = 0
13123
13124 ;
13125 return 0;
13126}
13127_ACEOF
13128rm -f conftest.$ac_objext
13129if { (ac_try="$ac_compile"
13130case "(($ac_try" in
13131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13132 *) ac_try_echo=$ac_try;;
13133esac
13134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13135 (eval "$ac_compile") 2>conftest.er1
13136 ac_status=$?
13137 grep -v '^ *+' conftest.er1 >conftest.err
13138 rm -f conftest.er1
13139 cat conftest.err >&5
13140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13141 (exit $ac_status); } && {
13142 test -z "$ac_c_werror_flag" ||
13143 test ! -s conftest.err
13144 } && test -s conftest.$ac_objext; then
13145 ac_lo=0 ac_mid=0
13146 while :; do
13147 cat >conftest.$ac_ext <<_ACEOF
13148/* confdefs.h. */
13149_ACEOF
13150cat confdefs.h >>conftest.$ac_ext
13151cat >>conftest.$ac_ext <<_ACEOF
13152/* end confdefs.h. */
13153
13154#ifdef HAVE_SYS_TYPES_H
13155#include <sys/types.h>
13156#endif
13157
13158
13159 typedef off_t ac__type_sizeof_;
13160int
13161main ()
13162{
13163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13164test_array [0] = 0
13165
13166 ;
13167 return 0;
13168}
13169_ACEOF
13170rm -f conftest.$ac_objext
13171if { (ac_try="$ac_compile"
13172case "(($ac_try" in
13173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13174 *) ac_try_echo=$ac_try;;
13175esac
13176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13177 (eval "$ac_compile") 2>conftest.er1
13178 ac_status=$?
13179 grep -v '^ *+' conftest.er1 >conftest.err
13180 rm -f conftest.er1
13181 cat conftest.err >&5
13182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13183 (exit $ac_status); } && {
13184 test -z "$ac_c_werror_flag" ||
13185 test ! -s conftest.err
13186 } && test -s conftest.$ac_objext; then
13187 ac_hi=$ac_mid; break
13188else
13189 echo "$as_me: failed program was:" >&5
13190sed 's/^/| /' conftest.$ac_ext >&5
13191
13192 ac_lo=`expr $ac_mid + 1`
13193 if test $ac_lo -le $ac_mid; then
13194 ac_lo= ac_hi=
13195 break
13196 fi
13197 ac_mid=`expr 2 '*' $ac_mid + 1`
13198fi
13199
13200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201 done
13202else
13203 echo "$as_me: failed program was:" >&5
13204sed 's/^/| /' conftest.$ac_ext >&5
13205
13206 cat >conftest.$ac_ext <<_ACEOF
13207/* confdefs.h. */
13208_ACEOF
13209cat confdefs.h >>conftest.$ac_ext
13210cat >>conftest.$ac_ext <<_ACEOF
13211/* end confdefs.h. */
13212
13213#ifdef HAVE_SYS_TYPES_H
13214#include <sys/types.h>
13215#endif
13216
13217
13218 typedef off_t ac__type_sizeof_;
13219int
13220main ()
13221{
13222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13223test_array [0] = 0
13224
13225 ;
13226 return 0;
13227}
13228_ACEOF
13229rm -f conftest.$ac_objext
13230if { (ac_try="$ac_compile"
13231case "(($ac_try" in
13232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13233 *) ac_try_echo=$ac_try;;
13234esac
13235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13236 (eval "$ac_compile") 2>conftest.er1
13237 ac_status=$?
13238 grep -v '^ *+' conftest.er1 >conftest.err
13239 rm -f conftest.er1
13240 cat conftest.err >&5
13241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13242 (exit $ac_status); } && {
13243 test -z "$ac_c_werror_flag" ||
13244 test ! -s conftest.err
13245 } && test -s conftest.$ac_objext; then
13246 ac_hi=-1 ac_mid=-1
13247 while :; do
13248 cat >conftest.$ac_ext <<_ACEOF
13249/* confdefs.h. */
13250_ACEOF
13251cat confdefs.h >>conftest.$ac_ext
13252cat >>conftest.$ac_ext <<_ACEOF
13253/* end confdefs.h. */
13254
13255#ifdef HAVE_SYS_TYPES_H
13256#include <sys/types.h>
13257#endif
13258
13259
13260 typedef off_t ac__type_sizeof_;
13261int
13262main ()
13263{
13264static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13265test_array [0] = 0
13266
13267 ;
13268 return 0;
13269}
13270_ACEOF
13271rm -f conftest.$ac_objext
13272if { (ac_try="$ac_compile"
13273case "(($ac_try" in
13274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13275 *) ac_try_echo=$ac_try;;
13276esac
13277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13278 (eval "$ac_compile") 2>conftest.er1
13279 ac_status=$?
13280 grep -v '^ *+' conftest.er1 >conftest.err
13281 rm -f conftest.er1
13282 cat conftest.err >&5
13283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13284 (exit $ac_status); } && {
13285 test -z "$ac_c_werror_flag" ||
13286 test ! -s conftest.err
13287 } && test -s conftest.$ac_objext; then
13288 ac_lo=$ac_mid; break
13289else
13290 echo "$as_me: failed program was:" >&5
13291sed 's/^/| /' conftest.$ac_ext >&5
13292
13293 ac_hi=`expr '(' $ac_mid ')' - 1`
13294 if test $ac_mid -le $ac_hi; then
13295 ac_lo= ac_hi=
13296 break
13297 fi
13298 ac_mid=`expr 2 '*' $ac_mid`
13299fi
13300
13301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302 done
13303else
13304 echo "$as_me: failed program was:" >&5
13305sed 's/^/| /' conftest.$ac_ext >&5
13306
13307 ac_lo= ac_hi=
13308fi
13309
13310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13311fi
13312
13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13314# Binary search between lo and hi bounds.
13315while test "x$ac_lo" != "x$ac_hi"; do
13316 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13317 cat >conftest.$ac_ext <<_ACEOF
13318/* confdefs.h. */
13319_ACEOF
13320cat confdefs.h >>conftest.$ac_ext
13321cat >>conftest.$ac_ext <<_ACEOF
13322/* end confdefs.h. */
13323
13324#ifdef HAVE_SYS_TYPES_H
13325#include <sys/types.h>
13326#endif
13327
13328
13329 typedef off_t ac__type_sizeof_;
13330int
13331main ()
13332{
13333static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13334test_array [0] = 0
13335
13336 ;
13337 return 0;
13338}
13339_ACEOF
13340rm -f conftest.$ac_objext
13341if { (ac_try="$ac_compile"
13342case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
13346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13347 (eval "$ac_compile") 2>conftest.er1
13348 ac_status=$?
13349 grep -v '^ *+' conftest.er1 >conftest.err
13350 rm -f conftest.er1
13351 cat conftest.err >&5
13352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13353 (exit $ac_status); } && {
13354 test -z "$ac_c_werror_flag" ||
13355 test ! -s conftest.err
13356 } && test -s conftest.$ac_objext; then
13357 ac_hi=$ac_mid
13358else
13359 echo "$as_me: failed program was:" >&5
13360sed 's/^/| /' conftest.$ac_ext >&5
13361
13362 ac_lo=`expr '(' $ac_mid ')' + 1`
13363fi
13364
13365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13366done
13367case $ac_lo in
13368?*) ac_cv_sizeof_off_t=$ac_lo;;
13369'') if test "$ac_cv_type_off_t" = yes; then
13370 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13371See \`config.log' for more details." >&5
13372echo "$as_me: error: cannot compute sizeof (off_t)
13373See \`config.log' for more details." >&2;}
13374 { (exit 77); exit 77; }; }
13375 else
13376 ac_cv_sizeof_off_t=0
13377 fi ;;
13378esac
13379else
13380 cat >conftest.$ac_ext <<_ACEOF
13381/* confdefs.h. */
13382_ACEOF
13383cat confdefs.h >>conftest.$ac_ext
13384cat >>conftest.$ac_ext <<_ACEOF
13385/* end confdefs.h. */
13386
13387#ifdef HAVE_SYS_TYPES_H
13388#include <sys/types.h>
13389#endif
13390
13391
13392 typedef off_t ac__type_sizeof_;
13393static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13394static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13395#include <stdio.h>
13396#include <stdlib.h>
13397int
13398main ()
13399{
13400
13401 FILE *f = fopen ("conftest.val", "w");
13402 if (! f)
13403 return 1;
13404 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13405 {
13406 long int i = longval ();
13407 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13408 return 1;
13409 fprintf (f, "%ld\n", i);
13410 }
13411 else
13412 {
13413 unsigned long int i = ulongval ();
13414 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13415 return 1;
13416 fprintf (f, "%lu\n", i);
13417 }
13418 return ferror (f) || fclose (f) != 0;
13419
13420 ;
13421 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013422}
Martin v. Löwis11437992002-04-12 09:54:03 +000013423_ACEOF
13424rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425if { (ac_try="$ac_link"
13426case "(($ac_try" in
13427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13428 *) ac_try_echo=$ac_try;;
13429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013435 { (case "(($ac_try" in
13436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13437 *) ac_try_echo=$ac_try;;
13438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013440 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013441 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013444 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013445else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013446 echo "$as_me: program exited with status $ac_status" >&5
13447echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013448sed 's/^/| /' conftest.$ac_ext >&5
13449
Martin v. Löwis11437992002-04-12 09:54:03 +000013450( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013451if test "$ac_cv_type_off_t" = yes; then
13452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13453See \`config.log' for more details." >&5
13454echo "$as_me: error: cannot compute sizeof (off_t)
13455See \`config.log' for more details." >&2;}
13456 { (exit 77); exit 77; }; }
13457 else
13458 ac_cv_sizeof_off_t=0
13459 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461rm -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 +000013462fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013463rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013465{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13466echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013467
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013468
13469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013471#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013472_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013473
Michael W. Hudson54241132001-12-07 15:38:26 +000013474
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013476{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13477echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013478if test "$have_long_long" = yes -a \
13479 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13480 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482cat >>confdefs.h <<\_ACEOF
13483#define HAVE_LARGEFILE_SUPPORT 1
13484_ACEOF
13485
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013486 { echo "$as_me:$LINENO: result: yes" >&5
13487echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013489 { echo "$as_me:$LINENO: result: no" >&5
13490echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013491fi
13492
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013493{ echo "$as_me:$LINENO: checking for time_t" >&5
13494echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13495if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013496 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013497else
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013499/* confdefs.h. */
13500_ACEOF
13501cat confdefs.h >>conftest.$ac_ext
13502cat >>conftest.$ac_ext <<_ACEOF
13503/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013504
13505#ifdef HAVE_SYS_TYPES_H
13506#include <sys/types.h>
13507#endif
13508#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013509#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013510#endif
13511
13512
13513typedef time_t ac__type_new_;
13514int
13515main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013516{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013517if ((ac__type_new_ *) 0)
13518 return 0;
13519if (sizeof (ac__type_new_))
13520 return 0;
13521 ;
13522 return 0;
13523}
13524_ACEOF
13525rm -f conftest.$ac_objext
13526if { (ac_try="$ac_compile"
13527case "(($ac_try" in
13528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13529 *) ac_try_echo=$ac_try;;
13530esac
13531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13532 (eval "$ac_compile") 2>conftest.er1
13533 ac_status=$?
13534 grep -v '^ *+' conftest.er1 >conftest.err
13535 rm -f conftest.er1
13536 cat conftest.err >&5
13537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13538 (exit $ac_status); } && {
13539 test -z "$ac_c_werror_flag" ||
13540 test ! -s conftest.err
13541 } && test -s conftest.$ac_objext; then
13542 ac_cv_type_time_t=yes
13543else
13544 echo "$as_me: failed program was:" >&5
13545sed 's/^/| /' conftest.$ac_ext >&5
13546
13547 ac_cv_type_time_t=no
13548fi
13549
13550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551fi
13552{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13553echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13554
13555# The cast to long int works around a bug in the HP C Compiler
13556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13558# This bug is HP SR number 8606223364.
13559{ echo "$as_me:$LINENO: checking size of time_t" >&5
13560echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13561if test "${ac_cv_sizeof_time_t+set}" = set; then
13562 echo $ECHO_N "(cached) $ECHO_C" >&6
13563else
13564 if test "$cross_compiling" = yes; then
13565 # Depending upon the size, compute the lo and hi bounds.
13566cat >conftest.$ac_ext <<_ACEOF
13567/* confdefs.h. */
13568_ACEOF
13569cat confdefs.h >>conftest.$ac_ext
13570cat >>conftest.$ac_ext <<_ACEOF
13571/* end confdefs.h. */
13572
13573#ifdef HAVE_SYS_TYPES_H
13574#include <sys/types.h>
13575#endif
13576#ifdef HAVE_TIME_H
13577#include <time.h>
13578#endif
13579
13580
13581 typedef time_t ac__type_sizeof_;
13582int
13583main ()
13584{
13585static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13586test_array [0] = 0
13587
13588 ;
13589 return 0;
13590}
13591_ACEOF
13592rm -f conftest.$ac_objext
13593if { (ac_try="$ac_compile"
13594case "(($ac_try" in
13595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13596 *) ac_try_echo=$ac_try;;
13597esac
13598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13599 (eval "$ac_compile") 2>conftest.er1
13600 ac_status=$?
13601 grep -v '^ *+' conftest.er1 >conftest.err
13602 rm -f conftest.er1
13603 cat conftest.err >&5
13604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13605 (exit $ac_status); } && {
13606 test -z "$ac_c_werror_flag" ||
13607 test ! -s conftest.err
13608 } && test -s conftest.$ac_objext; then
13609 ac_lo=0 ac_mid=0
13610 while :; do
13611 cat >conftest.$ac_ext <<_ACEOF
13612/* confdefs.h. */
13613_ACEOF
13614cat confdefs.h >>conftest.$ac_ext
13615cat >>conftest.$ac_ext <<_ACEOF
13616/* end confdefs.h. */
13617
13618#ifdef HAVE_SYS_TYPES_H
13619#include <sys/types.h>
13620#endif
13621#ifdef HAVE_TIME_H
13622#include <time.h>
13623#endif
13624
13625
13626 typedef time_t ac__type_sizeof_;
13627int
13628main ()
13629{
13630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13631test_array [0] = 0
13632
13633 ;
13634 return 0;
13635}
13636_ACEOF
13637rm -f conftest.$ac_objext
13638if { (ac_try="$ac_compile"
13639case "(($ac_try" in
13640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13641 *) ac_try_echo=$ac_try;;
13642esac
13643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13644 (eval "$ac_compile") 2>conftest.er1
13645 ac_status=$?
13646 grep -v '^ *+' conftest.er1 >conftest.err
13647 rm -f conftest.er1
13648 cat conftest.err >&5
13649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650 (exit $ac_status); } && {
13651 test -z "$ac_c_werror_flag" ||
13652 test ! -s conftest.err
13653 } && test -s conftest.$ac_objext; then
13654 ac_hi=$ac_mid; break
13655else
13656 echo "$as_me: failed program was:" >&5
13657sed 's/^/| /' conftest.$ac_ext >&5
13658
13659 ac_lo=`expr $ac_mid + 1`
13660 if test $ac_lo -le $ac_mid; then
13661 ac_lo= ac_hi=
13662 break
13663 fi
13664 ac_mid=`expr 2 '*' $ac_mid + 1`
13665fi
13666
13667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13668 done
13669else
13670 echo "$as_me: failed program was:" >&5
13671sed 's/^/| /' conftest.$ac_ext >&5
13672
13673 cat >conftest.$ac_ext <<_ACEOF
13674/* confdefs.h. */
13675_ACEOF
13676cat confdefs.h >>conftest.$ac_ext
13677cat >>conftest.$ac_ext <<_ACEOF
13678/* end confdefs.h. */
13679
13680#ifdef HAVE_SYS_TYPES_H
13681#include <sys/types.h>
13682#endif
13683#ifdef HAVE_TIME_H
13684#include <time.h>
13685#endif
13686
13687
13688 typedef time_t ac__type_sizeof_;
13689int
13690main ()
13691{
13692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13693test_array [0] = 0
13694
13695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext
13700if { (ac_try="$ac_compile"
13701case "(($ac_try" in
13702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13703 *) ac_try_echo=$ac_try;;
13704esac
13705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13706 (eval "$ac_compile") 2>conftest.er1
13707 ac_status=$?
13708 grep -v '^ *+' conftest.er1 >conftest.err
13709 rm -f conftest.er1
13710 cat conftest.err >&5
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); } && {
13713 test -z "$ac_c_werror_flag" ||
13714 test ! -s conftest.err
13715 } && test -s conftest.$ac_objext; then
13716 ac_hi=-1 ac_mid=-1
13717 while :; do
13718 cat >conftest.$ac_ext <<_ACEOF
13719/* confdefs.h. */
13720_ACEOF
13721cat confdefs.h >>conftest.$ac_ext
13722cat >>conftest.$ac_ext <<_ACEOF
13723/* end confdefs.h. */
13724
13725#ifdef HAVE_SYS_TYPES_H
13726#include <sys/types.h>
13727#endif
13728#ifdef HAVE_TIME_H
13729#include <time.h>
13730#endif
13731
13732
13733 typedef time_t ac__type_sizeof_;
13734int
13735main ()
13736{
13737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13738test_array [0] = 0
13739
13740 ;
13741 return 0;
13742}
13743_ACEOF
13744rm -f conftest.$ac_objext
13745if { (ac_try="$ac_compile"
13746case "(($ac_try" in
13747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13748 *) ac_try_echo=$ac_try;;
13749esac
13750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13751 (eval "$ac_compile") 2>conftest.er1
13752 ac_status=$?
13753 grep -v '^ *+' conftest.er1 >conftest.err
13754 rm -f conftest.er1
13755 cat conftest.err >&5
13756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13757 (exit $ac_status); } && {
13758 test -z "$ac_c_werror_flag" ||
13759 test ! -s conftest.err
13760 } && test -s conftest.$ac_objext; then
13761 ac_lo=$ac_mid; break
13762else
13763 echo "$as_me: failed program was:" >&5
13764sed 's/^/| /' conftest.$ac_ext >&5
13765
13766 ac_hi=`expr '(' $ac_mid ')' - 1`
13767 if test $ac_mid -le $ac_hi; then
13768 ac_lo= ac_hi=
13769 break
13770 fi
13771 ac_mid=`expr 2 '*' $ac_mid`
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 done
13776else
13777 echo "$as_me: failed program was:" >&5
13778sed 's/^/| /' conftest.$ac_ext >&5
13779
13780 ac_lo= ac_hi=
13781fi
13782
13783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13784fi
13785
13786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13787# Binary search between lo and hi bounds.
13788while test "x$ac_lo" != "x$ac_hi"; do
13789 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13790 cat >conftest.$ac_ext <<_ACEOF
13791/* confdefs.h. */
13792_ACEOF
13793cat confdefs.h >>conftest.$ac_ext
13794cat >>conftest.$ac_ext <<_ACEOF
13795/* end confdefs.h. */
13796
13797#ifdef HAVE_SYS_TYPES_H
13798#include <sys/types.h>
13799#endif
13800#ifdef HAVE_TIME_H
13801#include <time.h>
13802#endif
13803
13804
13805 typedef time_t ac__type_sizeof_;
13806int
13807main ()
13808{
13809static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13810test_array [0] = 0
13811
13812 ;
13813 return 0;
13814}
13815_ACEOF
13816rm -f conftest.$ac_objext
13817if { (ac_try="$ac_compile"
13818case "(($ac_try" in
13819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13820 *) ac_try_echo=$ac_try;;
13821esac
13822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13823 (eval "$ac_compile") 2>conftest.er1
13824 ac_status=$?
13825 grep -v '^ *+' conftest.er1 >conftest.err
13826 rm -f conftest.er1
13827 cat conftest.err >&5
13828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829 (exit $ac_status); } && {
13830 test -z "$ac_c_werror_flag" ||
13831 test ! -s conftest.err
13832 } && test -s conftest.$ac_objext; then
13833 ac_hi=$ac_mid
13834else
13835 echo "$as_me: failed program was:" >&5
13836sed 's/^/| /' conftest.$ac_ext >&5
13837
13838 ac_lo=`expr '(' $ac_mid ')' + 1`
13839fi
13840
13841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842done
13843case $ac_lo in
13844?*) ac_cv_sizeof_time_t=$ac_lo;;
13845'') if test "$ac_cv_type_time_t" = yes; then
13846 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13847See \`config.log' for more details." >&5
13848echo "$as_me: error: cannot compute sizeof (time_t)
13849See \`config.log' for more details." >&2;}
13850 { (exit 77); exit 77; }; }
13851 else
13852 ac_cv_sizeof_time_t=0
13853 fi ;;
13854esac
13855else
13856 cat >conftest.$ac_ext <<_ACEOF
13857/* confdefs.h. */
13858_ACEOF
13859cat confdefs.h >>conftest.$ac_ext
13860cat >>conftest.$ac_ext <<_ACEOF
13861/* end confdefs.h. */
13862
13863#ifdef HAVE_SYS_TYPES_H
13864#include <sys/types.h>
13865#endif
13866#ifdef HAVE_TIME_H
13867#include <time.h>
13868#endif
13869
13870
13871 typedef time_t ac__type_sizeof_;
13872static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13873static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13874#include <stdio.h>
13875#include <stdlib.h>
13876int
13877main ()
13878{
13879
13880 FILE *f = fopen ("conftest.val", "w");
13881 if (! f)
13882 return 1;
13883 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13884 {
13885 long int i = longval ();
13886 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13887 return 1;
13888 fprintf (f, "%ld\n", i);
13889 }
13890 else
13891 {
13892 unsigned long int i = ulongval ();
13893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13894 return 1;
13895 fprintf (f, "%lu\n", i);
13896 }
13897 return ferror (f) || fclose (f) != 0;
13898
13899 ;
13900 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013901}
Martin v. Löwis11437992002-04-12 09:54:03 +000013902_ACEOF
13903rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013904if { (ac_try="$ac_link"
13905case "(($ac_try" in
13906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13907 *) ac_try_echo=$ac_try;;
13908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914 { (case "(($ac_try" in
13915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13916 *) ac_try_echo=$ac_try;;
13917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013923 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013924else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013925 echo "$as_me: program exited with status $ac_status" >&5
13926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013927sed 's/^/| /' conftest.$ac_ext >&5
13928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013930if test "$ac_cv_type_time_t" = yes; then
13931 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13932See \`config.log' for more details." >&5
13933echo "$as_me: error: cannot compute sizeof (time_t)
13934See \`config.log' for more details." >&2;}
13935 { (exit 77); exit 77; }; }
13936 else
13937 ac_cv_sizeof_time_t=0
13938 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013940rm -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 +000013941fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013942rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013944{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13945echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013947
13948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013950#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013951_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013952
Michael W. Hudson54241132001-12-07 15:38:26 +000013953
13954
Trent Mick635f6fb2000-08-23 21:33:05 +000013955# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013956ac_save_cc="$CC"
13957if test "$ac_cv_kpthread" = "yes"
13958then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013959elif test "$ac_cv_kthread" = "yes"
13960then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013961elif test "$ac_cv_pthread" = "yes"
13962then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013963fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013964{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13965echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013966have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* confdefs.h. */
13969_ACEOF
13970cat confdefs.h >>conftest.$ac_ext
13971cat >>conftest.$ac_ext <<_ACEOF
13972/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013973#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013974int
13975main ()
13976{
Guido van Rossum12580492000-09-24 16:47:19 +000013977pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ;
13979 return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013983if { (ac_try="$ac_compile"
13984case "(($ac_try" in
13985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13986 *) ac_try_echo=$ac_try;;
13987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013991 grep -v '^ *+' conftest.er1 >conftest.err
13992 rm -f conftest.er1
13993 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995 (exit $ac_status); } && {
13996 test -z "$ac_c_werror_flag" ||
13997 test ! -s conftest.err
13998 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013999 have_pthread_t=yes
14000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014002sed 's/^/| /' conftest.$ac_ext >&5
14003
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004
Trent Mick635f6fb2000-08-23 21:33:05 +000014005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006
14007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014008{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14009echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014010if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014011 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14012echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14013if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014014 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014015else
Martin v. Löwis11437992002-04-12 09:54:03 +000014016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014017/* confdefs.h. */
14018_ACEOF
14019cat confdefs.h >>conftest.$ac_ext
14020cat >>conftest.$ac_ext <<_ACEOF
14021/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014022
14023#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014024#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014025#endif
14026
14027
14028typedef pthread_t ac__type_new_;
14029int
14030main ()
14031{
14032if ((ac__type_new_ *) 0)
14033 return 0;
14034if (sizeof (ac__type_new_))
14035 return 0;
14036 ;
14037 return 0;
14038}
14039_ACEOF
14040rm -f conftest.$ac_objext
14041if { (ac_try="$ac_compile"
14042case "(($ac_try" in
14043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14044 *) ac_try_echo=$ac_try;;
14045esac
14046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14047 (eval "$ac_compile") 2>conftest.er1
14048 ac_status=$?
14049 grep -v '^ *+' conftest.er1 >conftest.err
14050 rm -f conftest.er1
14051 cat conftest.err >&5
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } && {
14054 test -z "$ac_c_werror_flag" ||
14055 test ! -s conftest.err
14056 } && test -s conftest.$ac_objext; then
14057 ac_cv_type_pthread_t=yes
14058else
14059 echo "$as_me: failed program was:" >&5
14060sed 's/^/| /' conftest.$ac_ext >&5
14061
14062 ac_cv_type_pthread_t=no
14063fi
14064
14065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14066fi
14067{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14068echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14069
14070# The cast to long int works around a bug in the HP C Compiler
14071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14073# This bug is HP SR number 8606223364.
14074{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14075echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14076if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14077 echo $ECHO_N "(cached) $ECHO_C" >&6
14078else
14079 if test "$cross_compiling" = yes; then
14080 # Depending upon the size, compute the lo and hi bounds.
14081cat >conftest.$ac_ext <<_ACEOF
14082/* confdefs.h. */
14083_ACEOF
14084cat confdefs.h >>conftest.$ac_ext
14085cat >>conftest.$ac_ext <<_ACEOF
14086/* end confdefs.h. */
14087
14088#ifdef HAVE_PTHREAD_H
14089#include <pthread.h>
14090#endif
14091
14092
14093 typedef pthread_t ac__type_sizeof_;
14094int
14095main ()
14096{
14097static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14098test_array [0] = 0
14099
14100 ;
14101 return 0;
14102}
14103_ACEOF
14104rm -f conftest.$ac_objext
14105if { (ac_try="$ac_compile"
14106case "(($ac_try" in
14107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14108 *) ac_try_echo=$ac_try;;
14109esac
14110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14111 (eval "$ac_compile") 2>conftest.er1
14112 ac_status=$?
14113 grep -v '^ *+' conftest.er1 >conftest.err
14114 rm -f conftest.er1
14115 cat conftest.err >&5
14116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14117 (exit $ac_status); } && {
14118 test -z "$ac_c_werror_flag" ||
14119 test ! -s conftest.err
14120 } && test -s conftest.$ac_objext; then
14121 ac_lo=0 ac_mid=0
14122 while :; do
14123 cat >conftest.$ac_ext <<_ACEOF
14124/* confdefs.h. */
14125_ACEOF
14126cat confdefs.h >>conftest.$ac_ext
14127cat >>conftest.$ac_ext <<_ACEOF
14128/* end confdefs.h. */
14129
14130#ifdef HAVE_PTHREAD_H
14131#include <pthread.h>
14132#endif
14133
14134
14135 typedef pthread_t ac__type_sizeof_;
14136int
14137main ()
14138{
14139static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14140test_array [0] = 0
14141
14142 ;
14143 return 0;
14144}
14145_ACEOF
14146rm -f conftest.$ac_objext
14147if { (ac_try="$ac_compile"
14148case "(($ac_try" in
14149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14150 *) ac_try_echo=$ac_try;;
14151esac
14152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14153 (eval "$ac_compile") 2>conftest.er1
14154 ac_status=$?
14155 grep -v '^ *+' conftest.er1 >conftest.err
14156 rm -f conftest.er1
14157 cat conftest.err >&5
14158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14159 (exit $ac_status); } && {
14160 test -z "$ac_c_werror_flag" ||
14161 test ! -s conftest.err
14162 } && test -s conftest.$ac_objext; then
14163 ac_hi=$ac_mid; break
14164else
14165 echo "$as_me: failed program was:" >&5
14166sed 's/^/| /' conftest.$ac_ext >&5
14167
14168 ac_lo=`expr $ac_mid + 1`
14169 if test $ac_lo -le $ac_mid; then
14170 ac_lo= ac_hi=
14171 break
14172 fi
14173 ac_mid=`expr 2 '*' $ac_mid + 1`
14174fi
14175
14176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14177 done
14178else
14179 echo "$as_me: failed program was:" >&5
14180sed 's/^/| /' conftest.$ac_ext >&5
14181
14182 cat >conftest.$ac_ext <<_ACEOF
14183/* confdefs.h. */
14184_ACEOF
14185cat confdefs.h >>conftest.$ac_ext
14186cat >>conftest.$ac_ext <<_ACEOF
14187/* end confdefs.h. */
14188
14189#ifdef HAVE_PTHREAD_H
14190#include <pthread.h>
14191#endif
14192
14193
14194 typedef pthread_t ac__type_sizeof_;
14195int
14196main ()
14197{
14198static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14199test_array [0] = 0
14200
14201 ;
14202 return 0;
14203}
14204_ACEOF
14205rm -f conftest.$ac_objext
14206if { (ac_try="$ac_compile"
14207case "(($ac_try" in
14208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14209 *) ac_try_echo=$ac_try;;
14210esac
14211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14212 (eval "$ac_compile") 2>conftest.er1
14213 ac_status=$?
14214 grep -v '^ *+' conftest.er1 >conftest.err
14215 rm -f conftest.er1
14216 cat conftest.err >&5
14217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); } && {
14219 test -z "$ac_c_werror_flag" ||
14220 test ! -s conftest.err
14221 } && test -s conftest.$ac_objext; then
14222 ac_hi=-1 ac_mid=-1
14223 while :; do
14224 cat >conftest.$ac_ext <<_ACEOF
14225/* confdefs.h. */
14226_ACEOF
14227cat confdefs.h >>conftest.$ac_ext
14228cat >>conftest.$ac_ext <<_ACEOF
14229/* end confdefs.h. */
14230
14231#ifdef HAVE_PTHREAD_H
14232#include <pthread.h>
14233#endif
14234
14235
14236 typedef pthread_t ac__type_sizeof_;
14237int
14238main ()
14239{
14240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14241test_array [0] = 0
14242
14243 ;
14244 return 0;
14245}
14246_ACEOF
14247rm -f conftest.$ac_objext
14248if { (ac_try="$ac_compile"
14249case "(($ac_try" in
14250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14251 *) ac_try_echo=$ac_try;;
14252esac
14253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14254 (eval "$ac_compile") 2>conftest.er1
14255 ac_status=$?
14256 grep -v '^ *+' conftest.er1 >conftest.err
14257 rm -f conftest.er1
14258 cat conftest.err >&5
14259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14260 (exit $ac_status); } && {
14261 test -z "$ac_c_werror_flag" ||
14262 test ! -s conftest.err
14263 } && test -s conftest.$ac_objext; then
14264 ac_lo=$ac_mid; break
14265else
14266 echo "$as_me: failed program was:" >&5
14267sed 's/^/| /' conftest.$ac_ext >&5
14268
14269 ac_hi=`expr '(' $ac_mid ')' - 1`
14270 if test $ac_mid -le $ac_hi; then
14271 ac_lo= ac_hi=
14272 break
14273 fi
14274 ac_mid=`expr 2 '*' $ac_mid`
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278 done
14279else
14280 echo "$as_me: failed program was:" >&5
14281sed 's/^/| /' conftest.$ac_ext >&5
14282
14283 ac_lo= ac_hi=
14284fi
14285
14286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14287fi
14288
14289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14290# Binary search between lo and hi bounds.
14291while test "x$ac_lo" != "x$ac_hi"; do
14292 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14293 cat >conftest.$ac_ext <<_ACEOF
14294/* confdefs.h. */
14295_ACEOF
14296cat confdefs.h >>conftest.$ac_ext
14297cat >>conftest.$ac_ext <<_ACEOF
14298/* end confdefs.h. */
14299
14300#ifdef HAVE_PTHREAD_H
14301#include <pthread.h>
14302#endif
14303
14304
14305 typedef pthread_t ac__type_sizeof_;
14306int
14307main ()
14308{
14309static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14310test_array [0] = 0
14311
14312 ;
14313 return 0;
14314}
14315_ACEOF
14316rm -f conftest.$ac_objext
14317if { (ac_try="$ac_compile"
14318case "(($ac_try" in
14319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14320 *) ac_try_echo=$ac_try;;
14321esac
14322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14323 (eval "$ac_compile") 2>conftest.er1
14324 ac_status=$?
14325 grep -v '^ *+' conftest.er1 >conftest.err
14326 rm -f conftest.er1
14327 cat conftest.err >&5
14328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14329 (exit $ac_status); } && {
14330 test -z "$ac_c_werror_flag" ||
14331 test ! -s conftest.err
14332 } && test -s conftest.$ac_objext; then
14333 ac_hi=$ac_mid
14334else
14335 echo "$as_me: failed program was:" >&5
14336sed 's/^/| /' conftest.$ac_ext >&5
14337
14338 ac_lo=`expr '(' $ac_mid ')' + 1`
14339fi
14340
14341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14342done
14343case $ac_lo in
14344?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14345'') if test "$ac_cv_type_pthread_t" = yes; then
14346 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14347See \`config.log' for more details." >&5
14348echo "$as_me: error: cannot compute sizeof (pthread_t)
14349See \`config.log' for more details." >&2;}
14350 { (exit 77); exit 77; }; }
14351 else
14352 ac_cv_sizeof_pthread_t=0
14353 fi ;;
14354esac
14355else
14356 cat >conftest.$ac_ext <<_ACEOF
14357/* confdefs.h. */
14358_ACEOF
14359cat confdefs.h >>conftest.$ac_ext
14360cat >>conftest.$ac_ext <<_ACEOF
14361/* end confdefs.h. */
14362
14363#ifdef HAVE_PTHREAD_H
14364#include <pthread.h>
14365#endif
14366
14367
14368 typedef pthread_t ac__type_sizeof_;
14369static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14370static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14371#include <stdio.h>
14372#include <stdlib.h>
14373int
14374main ()
14375{
14376
14377 FILE *f = fopen ("conftest.val", "w");
14378 if (! f)
14379 return 1;
14380 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14381 {
14382 long int i = longval ();
14383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14384 return 1;
14385 fprintf (f, "%ld\n", i);
14386 }
14387 else
14388 {
14389 unsigned long int i = ulongval ();
14390 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14391 return 1;
14392 fprintf (f, "%lu\n", i);
14393 }
14394 return ferror (f) || fclose (f) != 0;
14395
14396 ;
14397 return 0;
14398}
Martin v. Löwis11437992002-04-12 09:54:03 +000014399_ACEOF
14400rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401if { (ac_try="$ac_link"
14402case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411 { (case "(($ac_try" in
14412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14413 *) ac_try_echo=$ac_try;;
14414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014416 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014420 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014422 echo "$as_me: program exited with status $ac_status" >&5
14423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014424sed 's/^/| /' conftest.$ac_ext >&5
14425
Martin v. Löwis11437992002-04-12 09:54:03 +000014426( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014427if test "$ac_cv_type_pthread_t" = yes; then
14428 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14429See \`config.log' for more details." >&5
14430echo "$as_me: error: cannot compute sizeof (pthread_t)
14431See \`config.log' for more details." >&2;}
14432 { (exit 77); exit 77; }; }
14433 else
14434 ac_cv_sizeof_pthread_t=0
14435 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014437rm -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 +000014438fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014439rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014440fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014441{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014442echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014444
14445
Martin v. Löwis11437992002-04-12 09:54:03 +000014446cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014447#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014448_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014449
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014450
Trent Mick635f6fb2000-08-23 21:33:05 +000014451fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014452CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014454{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14455echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014457if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014458 enableval=$enable_toolbox_glue;
14459fi
Jack Jansene578a632001-08-15 01:27:14 +000014460
14461
14462if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014463then
Jack Jansene578a632001-08-15 01:27:14 +000014464 case $ac_sys_system/$ac_sys_release in
14465 Darwin/*)
14466 enable_toolbox_glue="yes";;
14467 *)
14468 enable_toolbox_glue="no";;
14469 esac
14470fi
14471case "$enable_toolbox_glue" in
14472yes)
Jack Jansene578a632001-08-15 01:27:14 +000014473 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014474 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
14476cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014477#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014479
14480 ;;
14481*)
Jack Jansene578a632001-08-15 01:27:14 +000014482 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014483 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014484 ;;
14485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014486{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14487echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014488
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014489
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014490
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014491case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014492 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014493 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14494 ;;
14495 Darwin/*)
14496 OTHER_LIBTOOL_OPT=""
14497 ;;
14498esac
14499
14500
Ronald Oussoren25967582009-09-06 10:00:26 +000014501ARCH_RUN_32BIT=""
14502
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014503case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014504 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014505 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14506 if test "${enable_universalsdk}"; then
14507 :
14508 else
Ronald Oussoren25967582009-09-06 10:00:26 +000014509 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014510 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014511 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014513 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014514 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14515 if test ${gcc_version} '<' 4.0
14516 then
14517 LIBTOOL_CRUFT="-lcc_dynamic"
14518 else
14519 LIBTOOL_CRUFT=""
14520 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014521 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014522 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014523else
14524 cat >conftest.$ac_ext <<_ACEOF
14525/* confdefs.h. */
14526_ACEOF
14527cat confdefs.h >>conftest.$ac_ext
14528cat >>conftest.$ac_ext <<_ACEOF
14529/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014530
Ronald Oussoren25967582009-09-06 10:00:26 +000014531 #include <unistd.h>
14532 int main(int argc, char*argv[])
14533 {
14534 if (sizeof(long) == 4) {
14535 return 0;
14536 } else {
14537 return 1;
14538 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014539 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014540
Ronald Oussoren25967582009-09-06 10:00:26 +000014541_ACEOF
14542rm -f conftest$ac_exeext
14543if { (ac_try="$ac_link"
14544case "(($ac_try" in
14545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14546 *) ac_try_echo=$ac_try;;
14547esac
14548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14549 (eval "$ac_link") 2>&5
14550 ac_status=$?
14551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14553 { (case "(($ac_try" in
14554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14555 *) ac_try_echo=$ac_try;;
14556esac
14557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14558 (eval "$ac_try") 2>&5
14559 ac_status=$?
14560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14561 (exit $ac_status); }; }; then
14562 ac_osx_32bit=yes
14563else
14564 echo "$as_me: program exited with status $ac_status" >&5
14565echo "$as_me: failed program was:" >&5
14566sed 's/^/| /' conftest.$ac_ext >&5
14567
14568( exit $ac_status )
14569ac_osx_32bit=no
14570fi
14571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14572fi
14573
14574
14575
14576 if test "${ac_osx_32bit}" = "yes"; then
14577 case `arch` in
14578 i386)
14579 MACOSX_DEFAULT_ARCH="i386"
14580 ;;
14581 ppc)
14582 MACOSX_DEFAULT_ARCH="ppc"
14583 ;;
14584 *)
14585 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14586echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14587 { (exit 1); exit 1; }; }
14588 ;;
14589 esac
14590 else
14591 case `arch` in
14592 i386)
14593 MACOSX_DEFAULT_ARCH="x86_64"
14594 ;;
14595 ppc)
14596 MACOSX_DEFAULT_ARCH="ppc64"
14597 ;;
14598 *)
14599 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14600echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14601 { (exit 1); exit 1; }; }
14602 ;;
14603 esac
14604
14605 #ARCH_RUN_32BIT="true"
14606 fi
14607
14608 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014609 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014610 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014611esac
14612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014613{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14614echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014615if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014616then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014617 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014619 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014620
Martin v. Löwis11437992002-04-12 09:54:03 +000014621cat >>confdefs.h <<\_ACEOF
14622#define WITH_NEXT_FRAMEWORK 1
14623_ACEOF
14624
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014625 { echo "$as_me:$LINENO: result: yes" >&5
14626echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014627 if test $enable_shared = "yes"
14628 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014629 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14630echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014631 { (exit 1); exit 1; }; }
14632 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014634 { echo "$as_me:$LINENO: result: no" >&5
14635echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014636fi
14637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014638{ echo "$as_me:$LINENO: checking for dyld" >&5
14639echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014640case $ac_sys_system/$ac_sys_release in
14641 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014642
Martin v. Löwis11437992002-04-12 09:54:03 +000014643cat >>confdefs.h <<\_ACEOF
14644#define WITH_DYLD 1
14645_ACEOF
14646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014647 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14648echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014649 ;;
14650 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014651 { echo "$as_me:$LINENO: result: no" >&5
14652echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014653 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014654esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014655
Guido van Rossum0a516c91994-09-12 10:58:40 +000014656# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657
Michael W. Hudson54241132001-12-07 15:38:26 +000014658
14659
14660
14661
Guido van Rossum0a516c91994-09-12 10:58:40 +000014662# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014663# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014664{ echo "$as_me:$LINENO: checking SO" >&5
14665echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014666if test -z "$SO"
14667then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014668 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014669 hp*|HP*)
14670 case `uname -m` in
14671 ia64) SO=.so;;
14672 *) SO=.sl;;
14673 esac
14674 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014675 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014676 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014677 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014678else
14679 # this might also be a termcap variable, see #610332
14680 echo
14681 echo '====================================================================='
14682 echo '+ +'
14683 echo '+ WARNING: You have set SO in your environment. +'
14684 echo '+ Do you really mean to change the extension for shared libraries? +'
14685 echo '+ Continuing in 10 seconds to let you to ponder. +'
14686 echo '+ +'
14687 echo '====================================================================='
14688 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014689fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014690{ echo "$as_me:$LINENO: result: $SO" >&5
14691echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014692
Ronald Oussoren79f90492009-01-02 10:44:46 +000014693
Neal Norwitz58e28882006-05-19 07:00:58 +000014694cat >>confdefs.h <<_ACEOF
14695#define SHLIB_EXT "$SO"
14696_ACEOF
14697
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014699# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014700# (Shared libraries in this instance are shared modules to be loaded into
14701# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014702{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14703echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014704if test -z "$LDSHARED"
14705then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014706 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014707 AIX*)
14708 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014709 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014710 ;;
14711 BeOS*)
14712 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014713 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014714 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014715 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014716 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014718 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014719 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014720 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014721 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014722 hp*|HP*)
14723 if test "$GCC" = "yes"
14724 then LDSHARED='$(CC) -shared'
14725 else LDSHARED='ld -b';
14726 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014727 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014728 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014729 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14730 if test "$enable_framework" ; then
14731 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014732 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14733 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014734 else
14735 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014736 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014737 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014738 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014739 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14740 if test "$enable_framework" ; then
14741 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014742 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14743 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014744 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014745 # No framework, use the Python app as bundle-loader
14746 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014747 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014748 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014749 Darwin/*)
14750 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14751 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014752
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014753 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014754 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014755 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014756 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014757 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014758 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14759 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014760 else
14761 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14762 if test "$enable_framework" ; then
14763 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014764 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14765 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014766 else
14767 # No framework, use the Python app as bundle-loader
14768 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14769 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14770 fi
14771 fi
14772 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014773 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014774 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014775 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014776 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014777 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014778 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014779 else
14780 LDSHARED="ld -Bshareable ${LDFLAGS}"
14781 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014782 OpenBSD*)
14783 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14784 then
14785 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14786 else
14787 case `uname -r` in
14788 [01].* | 2.[0-7] | 2.[0-7].*)
14789 LDSHARED="ld -Bshareable ${LDFLAGS}"
14790 ;;
14791 *)
14792 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14793 ;;
14794 esac
14795 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014796 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014797 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014798 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014799 then LDSHARED='$(CC) -shared'
14800 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014801 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014802 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014803 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014804 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014805 *) LDSHARED="ld";;
14806 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014807fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014808{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14809echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014810BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014811# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014812# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014813{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14814echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014815if test -z "$CCSHARED"
14816then
Guido van Rossum07397971997-04-29 21:49:50 +000014817 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014818 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014819 then CCSHARED="-fPIC";
14820 elif test `uname -p` = sparc;
14821 then CCSHARED="-xcode=pic32";
14822 else CCSHARED="-Kpic";
14823 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014824 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014825 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014826 else CCSHARED="+z";
14827 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014828 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014829 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014830 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014831 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014832 if test "$GCC" = "yes"
14833 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014834 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014835 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014836 SCO_SV*)
14837 if test "$GCC" = "yes"
14838 then CCSHARED="-fPIC"
14839 else CCSHARED="-Kpic -belf"
14840 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014841 IRIX*/6*) case $CC in
14842 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014843 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014844 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014845 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014846 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014847fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014848{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14849echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014850# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014851# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014852{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14853echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014854if test -z "$LINKFORSHARED"
14855then
Guido van Rossum07397971997-04-29 21:49:50 +000014856 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014857 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014858 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014859 LINKFORSHARED="-Wl,-E -Wl,+s";;
14860# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014861 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014862 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014863 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014865 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14866 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014867 # not used by the core itself but which needs to be in the core so
14868 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014869 # -prebind is no longer used, because it actually seems to give a
14870 # slowdown in stead of a speedup, maybe due to the large number of
14871 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014872
14873 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014874 if test "$enable_framework"
14875 then
Jack Jansenda49e192005-01-07 13:08:22 +000014876 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014877 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014878 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014879 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014880 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014881 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014882 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014883 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14884 then
14885 LINKFORSHARED="-Wl,--export-dynamic"
14886 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014887 SunOS/5*) case $CC in
14888 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014889 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014890 then
14891 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014892 fi;;
14893 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014894 CYGWIN*)
14895 if test $enable_shared = "no"
14896 then
14897 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14898 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014899 QNX*)
14900 # -Wl,-E causes the symbols to be added to the dynamic
14901 # symbol table so that they can be found when a module
14902 # is loaded. -N 2048K causes the stack size to be set
14903 # to 2048 kilobytes so that the stack doesn't overflow
14904 # when running test_compile.py.
14905 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014906 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014908{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14909echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014910
Michael W. Hudson54241132001-12-07 15:38:26 +000014911
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014913{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14914echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014915if test ! "$LIBRARY" = "$LDLIBRARY"
14916then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014917 case $ac_sys_system in
14918 CYGWIN*)
14919 # Cygwin needs CCSHARED when building extension DLLs
14920 # but not when building the interpreter DLL.
14921 CFLAGSFORSHARED='';;
14922 *)
14923 CFLAGSFORSHARED='$(CCSHARED)'
14924 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014925fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014926{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14927echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014928
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014929# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14930# library (with --enable-shared).
14931# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014932# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14933# if it is not required, since it creates a dependency of the shared library
14934# to LIBS. This, in turn, means that applications linking the shared libpython
14935# don't need to link LIBS explicitly. The default should be only changed
14936# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014937
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014938{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14939echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014940case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014941 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014942 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014944{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14945echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014946
14947
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014950{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14951echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014952if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014953 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954else
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014956LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014958/* confdefs.h. */
14959_ACEOF
14960cat confdefs.h >>conftest.$ac_ext
14961cat >>conftest.$ac_ext <<_ACEOF
14962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014963
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964/* Override any GCC internal prototype to avoid an error.
14965 Use char because int might match the return type of a GCC
14966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014967#ifdef __cplusplus
14968extern "C"
14969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014970char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014971int
14972main ()
14973{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 ;
14976 return 0;
14977}
14978_ACEOF
14979rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980if { (ac_try="$ac_link"
14981case "(($ac_try" in
14982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14983 *) ac_try_echo=$ac_try;;
14984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014986 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988 grep -v '^ *+' conftest.er1 >conftest.err
14989 rm -f conftest.er1
14990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992 (exit $ac_status); } && {
14993 test -z "$ac_c_werror_flag" ||
14994 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014995 } && test -s conftest$ac_exeext &&
14996 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014998else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015000sed 's/^/| /' conftest.$ac_ext >&5
15001
Martin v. Löwiseba40652007-08-30 20:10:57 +000015002 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015004
15005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015007LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015008fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015009{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15010echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15011if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015012 cat >>confdefs.h <<_ACEOF
15013#define HAVE_LIBDL 1
15014_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015015
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015016 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015018fi
15019 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015021{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15022echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015023if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015024 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015025else
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015027LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015028cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015029/* confdefs.h. */
15030_ACEOF
15031cat confdefs.h >>conftest.$ac_ext
15032cat >>conftest.$ac_ext <<_ACEOF
15033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035/* Override any GCC internal prototype to avoid an error.
15036 Use char because int might match the return type of a GCC
15037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015038#ifdef __cplusplus
15039extern "C"
15040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015041char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 ;
15047 return 0;
15048}
15049_ACEOF
15050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051if { (ac_try="$ac_link"
15052case "(($ac_try" in
15053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15054 *) ac_try_echo=$ac_try;;
15055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015059 grep -v '^ *+' conftest.er1 >conftest.err
15060 rm -f conftest.er1
15061 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063 (exit $ac_status); } && {
15064 test -z "$ac_c_werror_flag" ||
15065 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015066 } && test -s conftest$ac_exeext &&
15067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015071sed 's/^/| /' conftest.$ac_ext >&5
15072
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075
15076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015079fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015080{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15081echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15082if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015083 cat >>confdefs.h <<_ACEOF
15084#define HAVE_LIBDLD 1
15085_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015086
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015087 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015089fi
15090 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015091
Ronald Oussoren79f90492009-01-02 10:44:46 +000015092# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015093if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015094 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15095echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015096if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015097 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015098else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015099 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015101/* confdefs.h. */
15102_ACEOF
15103cat confdefs.h >>conftest.$ac_ext
15104cat >>conftest.$ac_ext <<_ACEOF
15105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015106
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107/* Override any GCC internal prototype to avoid an error.
15108 Use char because int might match the return type of a GCC
15109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015110#ifdef __cplusplus
15111extern "C"
15112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015113char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015114int
15115main ()
15116{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015117return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 ;
15119 return 0;
15120}
15121_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122for ac_lib in '' pthread rt posix4; do
15123 if test -z "$ac_lib"; then
15124 ac_res="none required"
15125 else
15126 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015127 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 fi
15129 rm -f conftest.$ac_objext conftest$ac_exeext
15130if { (ac_try="$ac_link"
15131case "(($ac_try" in
15132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15133 *) ac_try_echo=$ac_try;;
15134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015137 ac_status=$?
15138 grep -v '^ *+' conftest.er1 >conftest.err
15139 rm -f conftest.er1
15140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 (exit $ac_status); } && {
15143 test -z "$ac_c_werror_flag" ||
15144 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015145 } && test -s conftest$ac_exeext &&
15146 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015149 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015150sed 's/^/| /' conftest.$ac_ext >&5
15151
Martin v. Löwiseba40652007-08-30 20:10:57 +000015152
Brett Cannon19fab762007-06-02 03:02:29 +000015153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015154
15155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15156 conftest$ac_exeext
15157 if test "${ac_cv_search_sem_init+set}" = set; then
15158 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160done
15161if test "${ac_cv_search_sem_init+set}" = set; then
15162 :
15163else
15164 ac_cv_search_sem_init=no
15165fi
15166rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015167LIBS=$ac_func_search_save_LIBS
15168fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015169{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15170echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015171ac_res=$ac_cv_search_sem_init
15172if test "$ac_res" != no; then
15173 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015174
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015175fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015176 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015177 # posix4 on Solaris 2.6
15178 # pthread (first!) on Linux
15179fi
15180
Martin v. Löwis19d17342003-06-14 21:03:05 +000015181# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015182{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15183echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015184if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015185 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015186else
15187 ac_check_lib_save_LIBS=$LIBS
15188LIBS="-lintl $LIBS"
15189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015190/* confdefs.h. */
15191_ACEOF
15192cat confdefs.h >>conftest.$ac_ext
15193cat >>conftest.$ac_ext <<_ACEOF
15194/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015195
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196/* Override any GCC internal prototype to avoid an error.
15197 Use char because int might match the return type of a GCC
15198 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015199#ifdef __cplusplus
15200extern "C"
15201#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015202char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015203int
15204main ()
15205{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
15211rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212if { (ac_try="$ac_link"
15213case "(($ac_try" in
15214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15215 *) ac_try_echo=$ac_try;;
15216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015220 grep -v '^ *+' conftest.er1 >conftest.err
15221 rm -f conftest.er1
15222 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 (exit $ac_status); } && {
15225 test -z "$ac_c_werror_flag" ||
15226 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015227 } && test -s conftest$ac_exeext &&
15228 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015229 ac_cv_lib_intl_textdomain=yes
15230else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015232sed 's/^/| /' conftest.$ac_ext >&5
15233
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236
15237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015239LIBS=$ac_check_lib_save_LIBS
15240fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015241{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15242echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15243if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015244
15245cat >>confdefs.h <<\_ACEOF
15246#define WITH_LIBINTL 1
15247_ACEOF
15248
15249fi
15250
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015251
15252# checks for system dependent C++ extensions support
15253case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015254 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15255echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015256 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015257/* confdefs.h. */
15258_ACEOF
15259cat confdefs.h >>conftest.$ac_ext
15260cat >>conftest.$ac_ext <<_ACEOF
15261/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015262#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015263int
15264main ()
15265{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015266loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015267 ;
15268 return 0;
15269}
15270_ACEOF
15271rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015272if { (ac_try="$ac_link"
15273case "(($ac_try" in
15274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15275 *) ac_try_echo=$ac_try;;
15276esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015280 grep -v '^ *+' conftest.er1 >conftest.err
15281 rm -f conftest.er1
15282 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284 (exit $ac_status); } && {
15285 test -z "$ac_c_werror_flag" ||
15286 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015287 } && test -s conftest$ac_exeext &&
15288 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015289
Martin v. Löwis11437992002-04-12 09:54:03 +000015290cat >>confdefs.h <<\_ACEOF
15291#define AIX_GENUINE_CPLUSPLUS 1
15292_ACEOF
15293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015294 { echo "$as_me:$LINENO: result: yes" >&5
15295echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015298sed 's/^/| /' conftest.$ac_ext >&5
15299
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015300 { echo "$as_me:$LINENO: result: no" >&5
15301echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303
15304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015305 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015306 *) ;;
15307esac
15308
Guido van Rossum70c7f481998-03-26 18:44:10 +000015309# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015310# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015311{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15312echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015313if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015315else
Martin v. Löwis11437992002-04-12 09:54:03 +000015316 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015317LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015319/* confdefs.h. */
15320_ACEOF
15321cat confdefs.h >>conftest.$ac_ext
15322cat >>conftest.$ac_ext <<_ACEOF
15323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015324
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325/* Override any GCC internal prototype to avoid an error.
15326 Use char because int might match the return type of a GCC
15327 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015328#ifdef __cplusplus
15329extern "C"
15330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015331char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015332int
15333main ()
15334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ;
15337 return 0;
15338}
15339_ACEOF
15340rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341if { (ac_try="$ac_link"
15342case "(($ac_try" in
15343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15344 *) ac_try_echo=$ac_try;;
15345esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015349 grep -v '^ *+' conftest.er1 >conftest.err
15350 rm -f conftest.er1
15351 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353 (exit $ac_status); } && {
15354 test -z "$ac_c_werror_flag" ||
15355 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015356 } && test -s conftest$ac_exeext &&
15357 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015359else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015361sed 's/^/| /' conftest.$ac_ext >&5
15362
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365
15366rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015367 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015368LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015369fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015370{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15371echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15372if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015373 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015374fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015375 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015376{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15377echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015378if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015380else
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015382LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015383cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015384/* confdefs.h. */
15385_ACEOF
15386cat confdefs.h >>conftest.$ac_ext
15387cat >>conftest.$ac_ext <<_ACEOF
15388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015389
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390/* Override any GCC internal prototype to avoid an error.
15391 Use char because int might match the return type of a GCC
15392 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015393#ifdef __cplusplus
15394extern "C"
15395#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015396char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015397int
15398main ()
15399{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015400return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 ;
15402 return 0;
15403}
15404_ACEOF
15405rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015406if { (ac_try="$ac_link"
15407case "(($ac_try" in
15408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15409 *) ac_try_echo=$ac_try;;
15410esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015414 grep -v '^ *+' conftest.er1 >conftest.err
15415 rm -f conftest.er1
15416 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418 (exit $ac_status); } && {
15419 test -z "$ac_c_werror_flag" ||
15420 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015421 } && test -s conftest$ac_exeext &&
15422 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015424else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015426sed 's/^/| /' conftest.$ac_ext >&5
15427
Martin v. Löwiseba40652007-08-30 20:10:57 +000015428 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430
15431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015433LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015434fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015435{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15436echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15437if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015438 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015439fi
15440 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015441
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015442case "$ac_sys_system" in
15443BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015444{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15445echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015446if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015447 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015448else
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015450LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015452/* confdefs.h. */
15453_ACEOF
15454cat confdefs.h >>conftest.$ac_ext
15455cat >>conftest.$ac_ext <<_ACEOF
15456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015457
Martin v. Löwiseba40652007-08-30 20:10:57 +000015458/* Override any GCC internal prototype to avoid an error.
15459 Use char because int might match the return type of a GCC
15460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015461#ifdef __cplusplus
15462extern "C"
15463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015464char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015465int
15466main ()
15467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015468return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 ;
15470 return 0;
15471}
15472_ACEOF
15473rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015474if { (ac_try="$ac_link"
15475case "(($ac_try" in
15476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15477 *) ac_try_echo=$ac_try;;
15478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015480 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015482 grep -v '^ *+' conftest.er1 >conftest.err
15483 rm -f conftest.er1
15484 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015486 (exit $ac_status); } && {
15487 test -z "$ac_c_werror_flag" ||
15488 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015489 } && test -s conftest$ac_exeext &&
15490 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015494sed 's/^/| /' conftest.$ac_ext >&5
15495
Martin v. Löwiseba40652007-08-30 20:10:57 +000015496 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015498
15499rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015501LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015502fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015503{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15504echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15505if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015506 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015507fi
15508 # BeOS
15509;;
15510esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015511
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015512{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15513echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015514
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015516if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015517 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015518{ echo "$as_me:$LINENO: result: $withval" >&5
15519echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015520LIBS="$withval $LIBS"
15521
15522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015523 { echo "$as_me:$LINENO: result: no" >&5
15524echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525fi
15526
Guido van Rossum7f43da71994-08-01 12:15:30 +000015527
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015528# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015529{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15530echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015531
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015533if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 withval=$with_system_ffi;
15535fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015536
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015538{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15539echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015540
Benjamin Peterson867475c2009-04-29 20:36:25 +000015541# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015542{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15543echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015544
15545# Check whether --with-dbmliborder was given.
15546if test "${with_dbmliborder+set}" = set; then
15547 withval=$with_dbmliborder;
15548if test x$with_dbmliborder = xyes
15549then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015550{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15551echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015552 { (exit 1); exit 1; }; }
15553else
15554 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15555 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15556 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015557 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15558echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015559 { (exit 1); exit 1; }; }
15560 fi
15561 done
15562fi
15563fi
15564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015565{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15566echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015567
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015568# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015569
15570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015571{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15572echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
Martin v. Löwiseba40652007-08-30 20:10:57 +000015574# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015575if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576 withval=$with_signal_module;
15577fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015578
15579
15580if test -z "$with_signal_module"
15581then with_signal_module="yes"
15582fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015583{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15584echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015585
15586if test "${with_signal_module}" = "yes"; then
15587 USE_SIGNAL_MODULE=""
15588 SIGNAL_OBJS=""
15589else
15590 USE_SIGNAL_MODULE="#"
15591 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15592fi
15593
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015594# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015595
Barry Warsawc0d24d82000-06-29 16:12:00 +000015596USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015598{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15599echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Guido van Rossumec2f0731997-01-22 20:54:01 +000015601
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015603if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015605{ echo "$as_me:$LINENO: result: $withval" >&5
15606echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015607LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015608if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015609 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015610fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015612 { echo "$as_me:$LINENO: result: no" >&5
15613echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614fi
15615
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
15617# Templates for things AC_DEFINEd more than once.
15618# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015619
15620
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
15622
15623
15624
15625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015626{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15627echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
Martin v. Löwiseba40652007-08-30 20:10:57 +000015629# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015630if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015631 withval=$with_threads;
15632fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015633
15634
Barry Warsawc0d24d82000-06-29 16:12:00 +000015635# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
Martin v. Löwiseba40652007-08-30 20:10:57 +000015637# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015638if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015639 withval=$with_thread; with_threads=$with_thread
15640fi
15641
Barry Warsawc0d24d82000-06-29 16:12:00 +000015642
15643if test -z "$with_threads"
15644then with_threads="yes"
15645fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015646{ echo "$as_me:$LINENO: result: $with_threads" >&5
15647echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015648
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015649
Barry Warsawc0d24d82000-06-29 16:12:00 +000015650if test "$with_threads" = "no"
15651then
15652 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015653elif test "$ac_cv_pthread_is_default" = yes
15654then
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015656#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015657_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015658
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015659 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015661#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015662_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015663
15664 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015666elif test "$ac_cv_kpthread" = "yes"
15667then
15668 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015669 if test "$ac_cv_cxx_thread" = "yes"; then
15670 CXX="$CXX -Kpthread"
15671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015673#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015675
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015676 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015677 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015678elif test "$ac_cv_kthread" = "yes"
15679then
15680 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015681 if test "$ac_cv_cxx_thread" = "yes"; then
15682 CXX="$CXX -Kthread"
15683 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015684 cat >>confdefs.h <<\_ACEOF
15685#define WITH_THREAD 1
15686_ACEOF
15687
15688 posix_threads=yes
15689 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015690elif test "$ac_cv_pthread" = "yes"
15691then
15692 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015693 if test "$ac_cv_cxx_thread" = "yes"; then
15694 CXX="$CXX -pthread"
15695 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015696 cat >>confdefs.h <<\_ACEOF
15697#define WITH_THREAD 1
15698_ACEOF
15699
15700 posix_threads=yes
15701 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015702else
15703 if test ! -z "$with_threads" -a -d "$with_threads"
15704 then LDFLAGS="$LDFLAGS -L$with_threads"
15705 fi
15706 if test ! -z "$withval" -a -d "$withval"
15707 then LDFLAGS="$LDFLAGS -L$withval"
15708 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015709
15710 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015711 # define _POSIX_THREADS in unistd.h. Some apparently don't
15712 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015713 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15714echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015716/* confdefs.h. */
15717_ACEOF
15718cat confdefs.h >>conftest.$ac_ext
15719cat >>conftest.$ac_ext <<_ACEOF
15720/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015721
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015722#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015723#ifdef _POSIX_THREADS
15724yes
15725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015726
15727_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015729 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015730 unistd_defines_pthreads=yes
15731else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015732 unistd_defines_pthreads=no
15733fi
Ronald Oussoren25967582009-09-06 10:00:26 +000015734rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015736 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15737echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015738
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015740#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015741_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015742
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015744 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15745echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015746if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015747 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015748fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015749{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15750echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015751else
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015753{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15754echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015755cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015756/* confdefs.h. */
15757_ACEOF
15758cat confdefs.h >>conftest.$ac_ext
15759cat >>conftest.$ac_ext <<_ACEOF
15760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015761$ac_includes_default
15762#include <cthreads.h>
15763_ACEOF
15764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765if { (ac_try="$ac_compile"
15766case "(($ac_try" in
15767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15768 *) ac_try_echo=$ac_try;;
15769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015773 grep -v '^ *+' conftest.er1 >conftest.err
15774 rm -f conftest.er1
15775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777 (exit $ac_status); } && {
15778 test -z "$ac_c_werror_flag" ||
15779 test ! -s conftest.err
15780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ac_header_compiler=yes
15782else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015784sed 's/^/| /' conftest.$ac_ext >&5
15785
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015788
15789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015790{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15791echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
15793# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015794{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15795echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015796cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015797/* confdefs.h. */
15798_ACEOF
15799cat confdefs.h >>conftest.$ac_ext
15800cat >>conftest.$ac_ext <<_ACEOF
15801/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015802#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015803_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015804if { (ac_try="$ac_cpp conftest.$ac_ext"
15805case "(($ac_try" in
15806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15807 *) ac_try_echo=$ac_try;;
15808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015812 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015813 rm -f conftest.er1
15814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816 (exit $ac_status); } >/dev/null && {
15817 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15818 test ! -s conftest.err
15819 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 ac_header_preproc=yes
15821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015823sed 's/^/| /' conftest.$ac_ext >&5
15824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015829{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15830echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015831
15832# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015833case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15834 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015835 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15836echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15837 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15838echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015839 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015840 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015842 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15843echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15845echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15846 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15847echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15848 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15849echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15850 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15851echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15852 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15853echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015855## -------------------------------------- ##
15856## Report this to http://bugs.python.org/ ##
15857## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015858_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015860 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015861esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015862{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15863echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015864if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015866else
15867 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015868fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015869{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15870echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015871
15872fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015873if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015875#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015876_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015879#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015880_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015881
Martin v. Löwis11437992002-04-12 09:54:03 +000015882
15883cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015884#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015885_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015886
15887 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015888 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015889else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015890
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015892 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15893echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015894if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015896fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015897{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15898echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015899else
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015901{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15902echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015904/* confdefs.h. */
15905_ACEOF
15906cat confdefs.h >>conftest.$ac_ext
15907cat >>conftest.$ac_ext <<_ACEOF
15908/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015909$ac_includes_default
15910#include <mach/cthreads.h>
15911_ACEOF
15912rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913if { (ac_try="$ac_compile"
15914case "(($ac_try" in
15915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15916 *) ac_try_echo=$ac_try;;
15917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015921 grep -v '^ *+' conftest.er1 >conftest.err
15922 rm -f conftest.er1
15923 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925 (exit $ac_status); } && {
15926 test -z "$ac_c_werror_flag" ||
15927 test ! -s conftest.err
15928 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 ac_header_compiler=yes
15930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015932sed 's/^/| /' conftest.$ac_ext >&5
15933
Martin v. Löwiseba40652007-08-30 20:10:57 +000015934 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936
15937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015938{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15939echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
15941# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015942{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15943echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015945/* confdefs.h. */
15946_ACEOF
15947cat confdefs.h >>conftest.$ac_ext
15948cat >>conftest.$ac_ext <<_ACEOF
15949/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015950#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015951_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952if { (ac_try="$ac_cpp conftest.$ac_ext"
15953case "(($ac_try" in
15954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15955 *) ac_try_echo=$ac_try;;
15956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015958 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015960 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 rm -f conftest.er1
15962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015964 (exit $ac_status); } >/dev/null && {
15965 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15966 test ! -s conftest.err
15967 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015968 ac_header_preproc=yes
15969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015971sed 's/^/| /' conftest.$ac_ext >&5
15972
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015974fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015975
Martin v. Löwis11437992002-04-12 09:54:03 +000015976rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015977{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15978echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015979
15980# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015981case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15982 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15985 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15986echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015987 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015988 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015989 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015990 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15991echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15992 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15993echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15994 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15995echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15996 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15997echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15998 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15999echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16000 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16001echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016002 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016003## -------------------------------------- ##
16004## Report this to http://bugs.python.org/ ##
16005## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016006_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016007 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016008 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016010{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16011echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016012if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016013 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016014else
16015 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016016fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016017{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16018echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016019
16020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016021if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016024_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016027#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016028_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016029
Martin v. Löwis11437992002-04-12 09:54:03 +000016030
16031cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016032#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016033_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016034
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016035 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016036else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016037
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016038 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16039echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016040
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016042if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16044echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016045 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016046#define WITH_THREAD 1
16047_ACEOF
16048
16049
16050cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016051#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016052_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016053
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016054 LIBS="-lpth $LIBS"
16055 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016057 { echo "$as_me:$LINENO: result: no" >&5
16058echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016059
16060 # Just looking for pthread_create in libpthread is not enough:
16061 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16062 # So we really have to include pthread.h, and then link.
16063 _libs=$LIBS
16064 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016065 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16066echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016068/* confdefs.h. */
16069_ACEOF
16070cat confdefs.h >>conftest.$ac_ext
16071cat >>conftest.$ac_ext <<_ACEOF
16072/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016073#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016074
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016075void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016076int
16077main ()
16078{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016079
16080pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 ;
16082 return 0;
16083}
16084_ACEOF
16085rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016086if { (ac_try="$ac_link"
16087case "(($ac_try" in
16088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16089 *) ac_try_echo=$ac_try;;
16090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016092 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016094 grep -v '^ *+' conftest.er1 >conftest.err
16095 rm -f conftest.er1
16096 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016098 (exit $ac_status); } && {
16099 test -z "$ac_c_werror_flag" ||
16100 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016101 } && test -s conftest$ac_exeext &&
16102 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104 { echo "$as_me:$LINENO: result: yes" >&5
16105echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016106 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016107#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016108_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016109
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016110 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016111 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016114sed 's/^/| /' conftest.$ac_ext >&5
16115
Martin v. Löwis11437992002-04-12 09:54:03 +000016116
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016117 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016118 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16119echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016120if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016121 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016122else
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016124/* confdefs.h. */
16125_ACEOF
16126cat confdefs.h >>conftest.$ac_ext
16127cat >>conftest.$ac_ext <<_ACEOF
16128/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016129/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16130 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16131#define pthread_detach innocuous_pthread_detach
16132
Guido van Rossumad678af1998-10-02 14:42:15 +000016133/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016134 which can conflict with char pthread_detach (); below.
16135 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016136 <limits.h> exists even on freestanding compilers. */
16137
16138#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016139# include <limits.h>
16140#else
16141# include <assert.h>
16142#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016143
16144#undef pthread_detach
16145
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146/* Override any GCC internal prototype to avoid an error.
16147 Use char because int might match the return type of a GCC
16148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016149#ifdef __cplusplus
16150extern "C"
16151#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016152char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016153/* The GNU C library defines this for functions which it implements
16154 to always fail with ENOSYS. Some functions are actually named
16155 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016156#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016157choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016158#endif
16159
Skip Montanaro6dead952003-09-25 14:50:04 +000016160int
16161main ()
16162{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016163return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 ;
16165 return 0;
16166}
16167_ACEOF
16168rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016169if { (ac_try="$ac_link"
16170case "(($ac_try" in
16171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16172 *) ac_try_echo=$ac_try;;
16173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016177 grep -v '^ *+' conftest.er1 >conftest.err
16178 rm -f conftest.er1
16179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181 (exit $ac_status); } && {
16182 test -z "$ac_c_werror_flag" ||
16183 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184 } && test -s conftest$ac_exeext &&
16185 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016187else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016189sed 's/^/| /' conftest.$ac_ext >&5
16190
Martin v. Löwiseba40652007-08-30 20:10:57 +000016191 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193
16194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016196fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16198echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16199if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016201#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016202_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016203
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016204 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016205 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016206else
Guido van Rossumad678af1998-10-02 14:42:15 +000016207
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016208 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016209 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16210echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016211if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016213fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016214{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16215echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016216else
16217 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016218{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16219echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016221/* confdefs.h. */
16222_ACEOF
16223cat confdefs.h >>conftest.$ac_ext
16224cat >>conftest.$ac_ext <<_ACEOF
16225/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016226$ac_includes_default
16227#include <atheos/threads.h>
16228_ACEOF
16229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230if { (ac_try="$ac_compile"
16231case "(($ac_try" in
16232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16233 *) ac_try_echo=$ac_try;;
16234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016238 grep -v '^ *+' conftest.er1 >conftest.err
16239 rm -f conftest.er1
16240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 (exit $ac_status); } && {
16243 test -z "$ac_c_werror_flag" ||
16244 test ! -s conftest.err
16245 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016246 ac_header_compiler=yes
16247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016249sed 's/^/| /' conftest.$ac_ext >&5
16250
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016253
16254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016255{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16256echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016257
16258# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016259{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16260echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016262/* confdefs.h. */
16263_ACEOF
16264cat confdefs.h >>conftest.$ac_ext
16265cat >>conftest.$ac_ext <<_ACEOF
16266/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016267#include <atheos/threads.h>
16268_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269if { (ac_try="$ac_cpp conftest.$ac_ext"
16270case "(($ac_try" in
16271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16272 *) ac_try_echo=$ac_try;;
16273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016276 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016277 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016278 rm -f conftest.er1
16279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281 (exit $ac_status); } >/dev/null && {
16282 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16283 test ! -s conftest.err
16284 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016285 ac_header_preproc=yes
16286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016288sed 's/^/| /' conftest.$ac_ext >&5
16289
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016290 ac_header_preproc=no
16291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016292
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016293rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016294{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16295echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016296
16297# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016298case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16299 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016300 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16301echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16302 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16303echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016304 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016305 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016306 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016307 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16308echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16309 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16310echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16311 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16312echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16313 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16314echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16315 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16316echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16317 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16318echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016320## -------------------------------------- ##
16321## Report this to http://bugs.python.org/ ##
16322## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016323_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016324 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016325 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016327{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16328echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016329if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016331else
16332 ac_cv_header_atheos_threads_h=$ac_header_preproc
16333fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016334{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16335echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016336
16337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016338if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016339 cat >>confdefs.h <<\_ACEOF
16340#define WITH_THREAD 1
16341_ACEOF
16342
16343
16344cat >>confdefs.h <<\_ACEOF
16345#define ATHEOS_THREADS 1
16346_ACEOF
16347
16348 THREADOBJ="Python/thread.o"
16349else
16350
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016352 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16353echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016354if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016356fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016357{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16358echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016359else
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016361{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16362echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016364/* confdefs.h. */
16365_ACEOF
16366cat confdefs.h >>conftest.$ac_ext
16367cat >>conftest.$ac_ext <<_ACEOF
16368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016369$ac_includes_default
16370#include <kernel/OS.h>
16371_ACEOF
16372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373if { (ac_try="$ac_compile"
16374case "(($ac_try" in
16375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16376 *) ac_try_echo=$ac_try;;
16377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016381 grep -v '^ *+' conftest.er1 >conftest.err
16382 rm -f conftest.er1
16383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 (exit $ac_status); } && {
16386 test -z "$ac_c_werror_flag" ||
16387 test ! -s conftest.err
16388 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_header_compiler=yes
16390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016392sed 's/^/| /' conftest.$ac_ext >&5
16393
Martin v. Löwiseba40652007-08-30 20:10:57 +000016394 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396
16397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016398{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16399echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016400
16401# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016402{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16403echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016410#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016411_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412if { (ac_try="$ac_cpp conftest.$ac_ext"
16413case "(($ac_try" in
16414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16415 *) ac_try_echo=$ac_try;;
16416esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016418 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016419 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016420 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 rm -f conftest.er1
16422 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016424 (exit $ac_status); } >/dev/null && {
16425 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16426 test ! -s conftest.err
16427 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 ac_header_preproc=yes
16429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016437{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16438echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016439
Martin v. Löwis11437992002-04-12 09:54:03 +000016440# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16442 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016443 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16444echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16445 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16446echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016447 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016448 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016449 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016450 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16451echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16452 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16453echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16454 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16455echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16456 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16457echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16458 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16459echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16460 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16461echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016462 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016463## -------------------------------------- ##
16464## Report this to http://bugs.python.org/ ##
16465## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016466_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016467 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016468 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016470{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16471echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016472if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016473 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016474else
16475 ac_cv_header_kernel_OS_h=$ac_header_preproc
16476fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016477{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16478echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016479
16480fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016481if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 cat >>confdefs.h <<\_ACEOF
16483#define WITH_THREAD 1
16484_ACEOF
16485
16486
16487cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016488#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016489_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016490
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016491 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016492else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016493
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016494 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16495echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016496if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016498else
Martin v. Löwis11437992002-04-12 09:54:03 +000016499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016500LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016502/* confdefs.h. */
16503_ACEOF
16504cat confdefs.h >>conftest.$ac_ext
16505cat >>conftest.$ac_ext <<_ACEOF
16506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016507
Martin v. Löwiseba40652007-08-30 20:10:57 +000016508/* Override any GCC internal prototype to avoid an error.
16509 Use char because int might match the return type of a GCC
16510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016511#ifdef __cplusplus
16512extern "C"
16513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016514char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016515int
16516main ()
16517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ;
16520 return 0;
16521}
16522_ACEOF
16523rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016524if { (ac_try="$ac_link"
16525case "(($ac_try" in
16526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16527 *) ac_try_echo=$ac_try;;
16528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016532 grep -v '^ *+' conftest.er1 >conftest.err
16533 rm -f conftest.er1
16534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016536 (exit $ac_status); } && {
16537 test -z "$ac_c_werror_flag" ||
16538 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016539 } && test -s conftest$ac_exeext &&
16540 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016541 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016544sed 's/^/| /' conftest.$ac_ext >&5
16545
Martin v. Löwiseba40652007-08-30 20:10:57 +000016546 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016548
16549rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016551LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016552fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016553{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16554echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16555if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016556 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016557#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016558_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016560 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016561 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016562 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016563else
Greg Steinadf63d62000-07-05 10:38:09 +000016564
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16566echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016567if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016568 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016569else
Martin v. Löwis11437992002-04-12 09:54:03 +000016570 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016571LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016572cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016573/* confdefs.h. */
16574_ACEOF
16575cat confdefs.h >>conftest.$ac_ext
16576cat >>conftest.$ac_ext <<_ACEOF
16577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016578
Martin v. Löwiseba40652007-08-30 20:10:57 +000016579/* Override any GCC internal prototype to avoid an error.
16580 Use char because int might match the return type of a GCC
16581 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016582#ifdef __cplusplus
16583extern "C"
16584#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016585char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016586int
16587main ()
16588{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 ;
16591 return 0;
16592}
16593_ACEOF
16594rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016595if { (ac_try="$ac_link"
16596case "(($ac_try" in
16597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16598 *) ac_try_echo=$ac_try;;
16599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016601 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016603 grep -v '^ *+' conftest.er1 >conftest.err
16604 rm -f conftest.er1
16605 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607 (exit $ac_status); } && {
16608 test -z "$ac_c_werror_flag" ||
16609 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016610 } && test -s conftest$ac_exeext &&
16611 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016612 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016614 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016615sed 's/^/| /' conftest.$ac_ext >&5
16616
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016618fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016619
16620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016622LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016623fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016624{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16625echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16626if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016628#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016629_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016630
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016631 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016632 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016633 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016634else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016635
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016636 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16637echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016638if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016639 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016640else
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016642LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016644/* confdefs.h. */
16645_ACEOF
16646cat confdefs.h >>conftest.$ac_ext
16647cat >>conftest.$ac_ext <<_ACEOF
16648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016649
Martin v. Löwiseba40652007-08-30 20:10:57 +000016650/* Override any GCC internal prototype to avoid an error.
16651 Use char because int might match the return type of a GCC
16652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016653#ifdef __cplusplus
16654extern "C"
16655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016656char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016657int
16658main ()
16659{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016660return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 ;
16662 return 0;
16663}
16664_ACEOF
16665rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016666if { (ac_try="$ac_link"
16667case "(($ac_try" in
16668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16669 *) ac_try_echo=$ac_try;;
16670esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016674 grep -v '^ *+' conftest.er1 >conftest.err
16675 rm -f conftest.er1
16676 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016678 (exit $ac_status); } && {
16679 test -z "$ac_c_werror_flag" ||
16680 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016681 } && test -s conftest$ac_exeext &&
16682 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016683 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016684else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016686sed 's/^/| /' conftest.$ac_ext >&5
16687
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016690
16691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016693LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016694fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016695{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16696echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16697if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016700_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016701
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016702 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016703 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016704 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016705else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016706
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016707 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16708echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016709if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016711else
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016713LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016715/* confdefs.h. */
16716_ACEOF
16717cat confdefs.h >>conftest.$ac_ext
16718cat >>conftest.$ac_ext <<_ACEOF
16719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
Martin v. Löwiseba40652007-08-30 20:10:57 +000016721/* Override any GCC internal prototype to avoid an error.
16722 Use char because int might match the return type of a GCC
16723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016724#ifdef __cplusplus
16725extern "C"
16726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016727char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016728int
16729main ()
16730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 ;
16733 return 0;
16734}
16735_ACEOF
16736rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737if { (ac_try="$ac_link"
16738case "(($ac_try" in
16739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740 *) ac_try_echo=$ac_try;;
16741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016749 (exit $ac_status); } && {
16750 test -z "$ac_c_werror_flag" ||
16751 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016752 } && test -s conftest$ac_exeext &&
16753 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016754 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016757sed 's/^/| /' conftest.$ac_ext >&5
16758
Martin v. Löwiseba40652007-08-30 20:10:57 +000016759 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016761
16762rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016764LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016765fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016766{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16767echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16768if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016770#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016771_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016772
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016773 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016774 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016775 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016776else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016777
Martin v. Löwis130fb172001-07-19 11:00:41 +000016778 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016779fi
16780
Guido van Rossum627b2d71993-12-24 10:39:16 +000016781
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016782fi
16783
Guido van Rossum0be3e491997-05-22 20:33:33 +000016784fi
16785
Guido van Rossum49545951997-12-02 19:28:29 +000016786fi
16787
Guido van Rossumb93a8621998-05-07 13:27:32 +000016788fi
16789
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016790
Michael W. Hudson54241132001-12-07 15:38:26 +000016791fi
16792
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016793
16794fi
16795
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016797
16798rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800fi
16801
Martin v. Löwis11437992002-04-12 09:54:03 +000016802fi
16803
16804
16805fi
16806
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016807
Michael W. Hudson54241132001-12-07 15:38:26 +000016808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016809 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16810echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016811if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016812 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016813else
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016815LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016817/* confdefs.h. */
16818_ACEOF
16819cat confdefs.h >>conftest.$ac_ext
16820cat >>conftest.$ac_ext <<_ACEOF
16821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016822
Martin v. Löwiseba40652007-08-30 20:10:57 +000016823/* Override any GCC internal prototype to avoid an error.
16824 Use char because int might match the return type of a GCC
16825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016826#ifdef __cplusplus
16827extern "C"
16828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016829char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016830int
16831main ()
16832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016833return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 ;
16835 return 0;
16836}
16837_ACEOF
16838rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016839if { (ac_try="$ac_link"
16840case "(($ac_try" in
16841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16842 *) ac_try_echo=$ac_try;;
16843esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016845 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016847 grep -v '^ *+' conftest.er1 >conftest.err
16848 rm -f conftest.er1
16849 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851 (exit $ac_status); } && {
16852 test -z "$ac_c_werror_flag" ||
16853 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016854 } && test -s conftest$ac_exeext &&
16855 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016856 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016857else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016859sed 's/^/| /' conftest.$ac_ext >&5
16860
Martin v. Löwiseba40652007-08-30 20:10:57 +000016861 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863
16864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016866LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016868{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16869echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16870if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016872#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016873_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016874
Martin v. Löwis130fb172001-07-19 11:00:41 +000016875 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016876 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016877 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016878fi
16879
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016880
Neal Norwitza978ab02002-11-02 16:58:05 +000016881 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016882 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16883echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016884if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016886else
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016888LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016890/* confdefs.h. */
16891_ACEOF
16892cat confdefs.h >>conftest.$ac_ext
16893cat >>conftest.$ac_ext <<_ACEOF
16894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016895
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896/* Override any GCC internal prototype to avoid an error.
16897 Use char because int might match the return type of a GCC
16898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016899#ifdef __cplusplus
16900extern "C"
16901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016902char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016903int
16904main ()
16905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016906return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 ;
16908 return 0;
16909}
16910_ACEOF
16911rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016912if { (ac_try="$ac_link"
16913case "(($ac_try" in
16914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16915 *) ac_try_echo=$ac_try;;
16916esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016920 grep -v '^ *+' conftest.er1 >conftest.err
16921 rm -f conftest.er1
16922 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924 (exit $ac_status); } && {
16925 test -z "$ac_c_werror_flag" ||
16926 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016927 } && test -s conftest$ac_exeext &&
16928 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016932sed 's/^/| /' conftest.$ac_ext >&5
16933
Martin v. Löwiseba40652007-08-30 20:10:57 +000016934 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936
16937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016939LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016940fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016941{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16942echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16943if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016945#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016947
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016948 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016949 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016950 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016951fi
16952
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016953 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016954
Martin v. Löwis130fb172001-07-19 11:00:41 +000016955 if test "$USE_THREAD_MODULE" != "#"
16956 then
16957 # If the above checks didn't disable threads, (at least) OSF1
16958 # needs this '-threads' argument during linking.
16959 case $ac_sys_system in
16960 OSF1) LDLAST=-threads;;
16961 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016962 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016963fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016964
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016965if test "$posix_threads" = "yes"; then
16966 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016967
16968cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016969#define _POSIX_THREADS 1
16970_ACEOF
16971
16972 fi
16973
16974 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16975 case $ac_sys_system/$ac_sys_release in
16976 SunOS/5.6)
16977cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016978#define HAVE_PTHREAD_DESTRUCTOR 1
16979_ACEOF
16980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016981 ;;
16982 SunOS/5.8)
16983cat >>confdefs.h <<\_ACEOF
16984#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16985_ACEOF
16986
16987 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016988 AIX/5)
16989cat >>confdefs.h <<\_ACEOF
16990#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16991_ACEOF
16992
16993 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016994 esac
16995
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016996 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16997echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016998 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016999 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017000else
17001 if test "$cross_compiling" = yes; then
17002 ac_cv_pthread_system_supported=no
17003else
17004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017005/* confdefs.h. */
17006_ACEOF
17007cat confdefs.h >>conftest.$ac_ext
17008cat >>conftest.$ac_ext <<_ACEOF
17009/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017010#include <pthread.h>
17011 void *foo(void *parm) {
17012 return NULL;
17013 }
17014 main() {
17015 pthread_attr_t attr;
17016 pthread_t id;
17017 if (pthread_attr_init(&attr)) exit(-1);
17018 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17019 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17020 exit(0);
17021 }
17022_ACEOF
17023rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024if { (ac_try="$ac_link"
17025case "(($ac_try" in
17026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17027 *) ac_try_echo=$ac_try;;
17028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017034 { (case "(($ac_try" in
17035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17036 *) ac_try_echo=$ac_try;;
17037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017039 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017040 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017042 (exit $ac_status); }; }; then
17043 ac_cv_pthread_system_supported=yes
17044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017045 echo "$as_me: program exited with status $ac_status" >&5
17046echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017047sed 's/^/| /' conftest.$ac_ext >&5
17048
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017049( exit $ac_status )
17050ac_cv_pthread_system_supported=no
17051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017052rm -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 +000017053fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017054
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055
17056
Guido van Rossum627b2d71993-12-24 10:39:16 +000017057fi
17058
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017059 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17060echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017061 if test "$ac_cv_pthread_system_supported" = "yes"; then
17062
17063cat >>confdefs.h <<\_ACEOF
17064#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17065_ACEOF
17066
17067 fi
17068
17069for ac_func in pthread_sigmask
17070do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017071as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17072{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17073echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017074if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017076else
17077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017078/* confdefs.h. */
17079_ACEOF
17080cat confdefs.h >>conftest.$ac_ext
17081cat >>conftest.$ac_ext <<_ACEOF
17082/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017083/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17084 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17085#define $ac_func innocuous_$ac_func
17086
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017088 which can conflict with char $ac_func (); below.
17089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017090 <limits.h> exists even on freestanding compilers. */
17091
17092#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017093# include <limits.h>
17094#else
17095# include <assert.h>
17096#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017097
17098#undef $ac_func
17099
Martin v. Löwiseba40652007-08-30 20:10:57 +000017100/* Override any GCC internal prototype to avoid an error.
17101 Use char because int might match the return type of a GCC
17102 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103#ifdef __cplusplus
17104extern "C"
17105#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017106char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017107/* The GNU C library defines this for functions which it implements
17108 to always fail with ENOSYS. Some functions are actually named
17109 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017110#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017111choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017112#endif
17113
Skip Montanaro6dead952003-09-25 14:50:04 +000017114int
17115main ()
17116{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017118 ;
17119 return 0;
17120}
17121_ACEOF
17122rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017123if { (ac_try="$ac_link"
17124case "(($ac_try" in
17125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17126 *) ac_try_echo=$ac_try;;
17127esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017129 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017131 grep -v '^ *+' conftest.er1 >conftest.err
17132 rm -f conftest.er1
17133 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017135 (exit $ac_status); } && {
17136 test -z "$ac_c_werror_flag" ||
17137 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017138 } && test -s conftest$ac_exeext &&
17139 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017140 eval "$as_ac_var=yes"
17141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017143sed 's/^/| /' conftest.$ac_ext >&5
17144
Martin v. Löwiseba40652007-08-30 20:10:57 +000017145 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017147
17148rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017151ac_res=`eval echo '${'$as_ac_var'}'`
17152 { echo "$as_me:$LINENO: result: $ac_res" >&5
17153echo "${ECHO_T}$ac_res" >&6; }
17154if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017155 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017156#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017157_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017158 case $ac_sys_system in
17159 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017160
Jason Tishlerfac083d2003-07-22 15:20:49 +000017161cat >>confdefs.h <<\_ACEOF
17162#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17163_ACEOF
17164
17165 ;;
17166 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017167fi
17168done
17169
17170fi
17171
17172
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017173# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017174
17175
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017176{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17177echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017178# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017179if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017180 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017182 { echo "$as_me:$LINENO: result: no" >&5
17183echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017184 ipv6=no
17185 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017186 *) { echo "$as_me:$LINENO: result: yes" >&5
17187echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017188 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017189#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017190_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191
17192 ipv6=yes
17193 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017195else
Martin v. Löwis11437992002-04-12 09:54:03 +000017196
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017197 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017198 { echo "$as_me:$LINENO: result: no" >&5
17199echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017200 ipv6=no
17201
17202else
Martin v. Löwis11437992002-04-12 09:54:03 +000017203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017204/* confdefs.h. */
17205_ACEOF
17206cat confdefs.h >>conftest.$ac_ext
17207cat >>conftest.$ac_ext <<_ACEOF
17208/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017209 /* AF_INET6 available check */
17210#include <sys/types.h>
17211#include <sys/socket.h>
17212main()
17213{
17214 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17215 exit(1);
17216 else
17217 exit(0);
17218}
17219
Martin v. Löwis11437992002-04-12 09:54:03 +000017220_ACEOF
17221rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017222if { (ac_try="$ac_link"
17223case "(($ac_try" in
17224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17225 *) ac_try_echo=$ac_try;;
17226esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017232 { (case "(($ac_try" in
17233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17234 *) ac_try_echo=$ac_try;;
17235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017237 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017241 { echo "$as_me:$LINENO: result: yes" >&5
17242echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017243 ipv6=yes
17244else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017245 echo "$as_me: program exited with status $ac_status" >&5
17246echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017247sed 's/^/| /' conftest.$ac_ext >&5
17248
Martin v. Löwis11437992002-04-12 09:54:03 +000017249( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017250{ echo "$as_me:$LINENO: result: no" >&5
17251echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017252 ipv6=no
17253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017254rm -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 +000017255fi
17256
Martin v. Löwiseba40652007-08-30 20:10:57 +000017257
17258
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017259if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017260 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17261echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017263/* confdefs.h. */
17264_ACEOF
17265cat confdefs.h >>conftest.$ac_ext
17266cat >>conftest.$ac_ext <<_ACEOF
17267/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017268#include <sys/types.h>
17269#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017270int
17271main ()
17272{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017273struct sockaddr_in6 x;
17274x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017275 ;
17276 return 0;
17277}
17278_ACEOF
17279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280if { (ac_try="$ac_compile"
17281case "(($ac_try" in
17282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17283 *) ac_try_echo=$ac_try;;
17284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017288 grep -v '^ *+' conftest.er1 >conftest.err
17289 rm -f conftest.er1
17290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017292 (exit $ac_status); } && {
17293 test -z "$ac_c_werror_flag" ||
17294 test ! -s conftest.err
17295 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017296 { echo "$as_me:$LINENO: result: yes" >&5
17297echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017298 ipv6=yes
17299else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017301sed 's/^/| /' conftest.$ac_ext >&5
17302
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017303 { echo "$as_me:$LINENO: result: no" >&5
17304echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017305 ipv6=no
17306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017307
17308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017309fi
17310
17311if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017312 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017313#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017314_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017315
17316fi
17317
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318fi
17319
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017320
17321ipv6type=unknown
17322ipv6lib=none
17323ipv6trylibc=no
17324
17325if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017326 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17327echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017328 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17329 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017330 case $i in
17331 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017333/* confdefs.h. */
17334_ACEOF
17335cat confdefs.h >>conftest.$ac_ext
17336cat >>conftest.$ac_ext <<_ACEOF
17337/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017338
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017339#include <netinet/in.h>
17340#ifdef IPV6_INRIA_VERSION
17341yes
17342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017343_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017345 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017346 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017347fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017348rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017349
17350 ;;
17351 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017353/* confdefs.h. */
17354_ACEOF
17355cat confdefs.h >>conftest.$ac_ext
17356cat >>conftest.$ac_ext <<_ACEOF
17357/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017358
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017359#include <netinet/in.h>
17360#ifdef __KAME__
17361yes
17362#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017363_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017365 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017366 ipv6type=$i;
17367 ipv6lib=inet6
17368 ipv6libdir=/usr/local/v6/lib
17369 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017370fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017371rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017372
17373 ;;
17374 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017376/* confdefs.h. */
17377_ACEOF
17378cat confdefs.h >>conftest.$ac_ext
17379cat >>conftest.$ac_ext <<_ACEOF
17380/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017381
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017382#include <features.h>
17383#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17384yes
17385#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017386_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017388 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017389 ipv6type=$i;
17390 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017391fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017392rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017393
17394 ;;
17395 linux-inet6)
17396 if test -d /usr/inet6; then
17397 ipv6type=$i
17398 ipv6lib=inet6
17399 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017400 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017401 fi
17402 ;;
17403 solaris)
17404 if test -f /etc/netconfig; then
17405 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17406 ipv6type=$i
17407 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017408 fi
17409 fi
17410 ;;
17411 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017418
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017419#include <sys/param.h>
17420#ifdef _TOSHIBA_INET6
17421yes
17422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017423_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017425 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017426 ipv6type=$i;
17427 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017428 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017429fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017430rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017431
17432 ;;
17433 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017440
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017441#include </usr/local/v6/include/sys/v6config.h>
17442#ifdef __V6D__
17443yes
17444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017445_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017447 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017448 ipv6type=$i;
17449 ipv6lib=v6;
17450 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017451 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017452fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017453rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017454
17455 ;;
17456 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017458/* confdefs.h. */
17459_ACEOF
17460cat confdefs.h >>conftest.$ac_ext
17461cat >>conftest.$ac_ext <<_ACEOF
17462/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017463
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017464#include <sys/param.h>
17465#ifdef _ZETA_MINAMI_INET6
17466yes
17467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017468_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017470 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017471 ipv6type=$i;
17472 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017473 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017474fi
Ronald Oussoren25967582009-09-06 10:00:26 +000017475rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017476
17477 ;;
17478 esac
17479 if test "$ipv6type" != "unknown"; then
17480 break
17481 fi
17482 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017483 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17484echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017485fi
17486
17487if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17488 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17489 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17490 echo "using lib$ipv6lib"
17491 else
17492 if test $ipv6trylibc = "yes"; then
17493 echo "using libc"
17494 else
17495 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17496 echo "You need to fetch lib$ipv6lib.a from appropriate"
17497 echo 'ipv6 kit and compile beforehand.'
17498 exit 1
17499 fi
17500 fi
17501fi
17502
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017503{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17504echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017505cat >conftest.$ac_ext <<_ACEOF
17506/* confdefs.h. */
17507_ACEOF
17508cat confdefs.h >>conftest.$ac_ext
17509cat >>conftest.$ac_ext <<_ACEOF
17510/* end confdefs.h. */
17511#include <Carbon/Carbon.h>
17512int
17513main ()
17514{
17515FSIORefNum fRef = 0
17516 ;
17517 return 0;
17518}
17519_ACEOF
17520rm -f conftest.$ac_objext
17521if { (ac_try="$ac_compile"
17522case "(($ac_try" in
17523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17524 *) ac_try_echo=$ac_try;;
17525esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017527 (eval "$ac_compile") 2>conftest.er1
17528 ac_status=$?
17529 grep -v '^ *+' conftest.er1 >conftest.err
17530 rm -f conftest.er1
17531 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017533 (exit $ac_status); } && {
17534 test -z "$ac_c_werror_flag" ||
17535 test ! -s conftest.err
17536 } && test -s conftest.$ac_objext; then
17537
17538cat >>confdefs.h <<\_ACEOF
17539#define HAVE_OSX105_SDK 1
17540_ACEOF
17541
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017542 { echo "$as_me:$LINENO: result: yes" >&5
17543echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017544else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017545 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017546sed 's/^/| /' conftest.$ac_ext >&5
17547
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017548 { echo "$as_me:$LINENO: result: no" >&5
17549echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017550
17551fi
17552
17553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17554
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017555# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017556{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17557echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017558
Martin v. Löwiseba40652007-08-30 20:10:57 +000017559# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017560if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017561 withval=$with_doc_strings;
17562fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017563
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017564
17565if test -z "$with_doc_strings"
17566then with_doc_strings="yes"
17567fi
17568if test "$with_doc_strings" != "no"
17569then
17570
17571cat >>confdefs.h <<\_ACEOF
17572#define WITH_DOC_STRINGS 1
17573_ACEOF
17574
17575fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017576{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17577echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017578
Neil Schemenauera35c6882001-02-27 04:45:05 +000017579# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017580{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17581echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017582
Martin v. Löwiseba40652007-08-30 20:10:57 +000017583# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017584if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017585 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017586if test "$withval" != no
17587then
17588
17589cat >>confdefs.h <<\_ACEOF
17590#define WITH_TSC 1
17591_ACEOF
17592
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017593 { echo "$as_me:$LINENO: result: yes" >&5
17594echo "${ECHO_T}yes" >&6; }
17595else { echo "$as_me:$LINENO: result: no" >&5
17596echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017597fi
17598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017599 { echo "$as_me:$LINENO: result: no" >&5
17600echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601fi
17602
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017603
17604# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017605{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17606echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
Martin v. Löwiseba40652007-08-30 20:10:57 +000017608# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017609if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017610 withval=$with_pymalloc;
17611fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017612
Neil Schemenauera35c6882001-02-27 04:45:05 +000017613
Neil Schemenauer16c22972002-03-22 15:34:49 +000017614if test -z "$with_pymalloc"
17615then with_pymalloc="yes"
17616fi
17617if test "$with_pymalloc" != "no"
17618then
Martin v. Löwis11437992002-04-12 09:54:03 +000017619
17620cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017621#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017622_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017623
17624fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017625{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17626echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017627
Barry Warsawef82cd72000-06-30 16:21:01 +000017628# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017629{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17630echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017631
Martin v. Löwiseba40652007-08-30 20:10:57 +000017632# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017633if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017634 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017635if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017636then
17637
17638cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017639#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017640_ACEOF
17641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017642 { echo "$as_me:$LINENO: result: yes" >&5
17643echo "${ECHO_T}yes" >&6; }
17644else { echo "$as_me:$LINENO: result: no" >&5
17645echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017646fi
17647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017648 { echo "$as_me:$LINENO: result: no" >&5
17649echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017650fi
17651
Barry Warsawef82cd72000-06-30 16:21:01 +000017652
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017653# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017654
Guido van Rossum98935bf2001-09-05 19:13:16 +000017655DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017656
Guido van Rossume97ee181999-12-20 21:27:22 +000017657# the dlopen() function means we might want to use dynload_shlib.o. some
17658# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017659
Thomas Wouters3a584202000-08-05 23:28:51 +000017660for ac_func in dlopen
17661do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017662as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17663{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17664echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017665if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017667else
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017669/* confdefs.h. */
17670_ACEOF
17671cat confdefs.h >>conftest.$ac_ext
17672cat >>conftest.$ac_ext <<_ACEOF
17673/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017674/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17675 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17676#define $ac_func innocuous_$ac_func
17677
Guido van Rossume97ee181999-12-20 21:27:22 +000017678/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017679 which can conflict with char $ac_func (); below.
17680 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017681 <limits.h> exists even on freestanding compilers. */
17682
17683#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017684# include <limits.h>
17685#else
17686# include <assert.h>
17687#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017688
17689#undef $ac_func
17690
Martin v. Löwiseba40652007-08-30 20:10:57 +000017691/* Override any GCC internal prototype to avoid an error.
17692 Use char because int might match the return type of a GCC
17693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017694#ifdef __cplusplus
17695extern "C"
17696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017697char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017698/* The GNU C library defines this for functions which it implements
17699 to always fail with ENOSYS. Some functions are actually named
17700 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017701#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017702choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017703#endif
17704
Skip Montanaro6dead952003-09-25 14:50:04 +000017705int
17706main ()
17707{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017708return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017709 ;
17710 return 0;
17711}
17712_ACEOF
17713rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017714if { (ac_try="$ac_link"
17715case "(($ac_try" in
17716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17717 *) ac_try_echo=$ac_try;;
17718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017720 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017722 grep -v '^ *+' conftest.er1 >conftest.err
17723 rm -f conftest.er1
17724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017726 (exit $ac_status); } && {
17727 test -z "$ac_c_werror_flag" ||
17728 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017729 } && test -s conftest$ac_exeext &&
17730 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017734sed 's/^/| /' conftest.$ac_ext >&5
17735
Martin v. Löwiseba40652007-08-30 20:10:57 +000017736 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017738
17739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017740 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017741fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017742ac_res=`eval echo '${'$as_ac_var'}'`
17743 { echo "$as_me:$LINENO: result: $ac_res" >&5
17744echo "${ECHO_T}$ac_res" >&6; }
17745if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017746 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017748_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017749
Guido van Rossume97ee181999-12-20 21:27:22 +000017750fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017751done
Guido van Rossume97ee181999-12-20 21:27:22 +000017752
Michael W. Hudson54241132001-12-07 15:38:26 +000017753
Guido van Rossume97ee181999-12-20 21:27:22 +000017754# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17755# loading of modules.
17756
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017757{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17758echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017759if test -z "$DYNLOADFILE"
17760then
17761 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017762 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17763 if test "$ac_cv_func_dlopen" = yes
17764 then DYNLOADFILE="dynload_shlib.o"
17765 else DYNLOADFILE="dynload_aix.o"
17766 fi
17767 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017768 BeOS*) DYNLOADFILE="dynload_beos.o";;
17769 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017770 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17771 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017772 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017773 *)
17774 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17775 # out any dynamic loading
17776 if test "$ac_cv_func_dlopen" = yes
17777 then DYNLOADFILE="dynload_shlib.o"
17778 else DYNLOADFILE="dynload_stub.o"
17779 fi
17780 ;;
17781 esac
17782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017783{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17784echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017785if test "$DYNLOADFILE" != "dynload_stub.o"
17786then
Martin v. Löwis11437992002-04-12 09:54:03 +000017787
17788cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017789#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017790_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017791
17792fi
17793
Neil Schemenauer4e425612001-06-19 15:44:15 +000017794# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17795
Michael W. Hudson54241132001-12-07 15:38:26 +000017796
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017797{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17798echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017799if test -z "$MACHDEP_OBJS"
17800then
Jack Jansene578a632001-08-15 01:27:14 +000017801 MACHDEP_OBJS=$extra_machdep_objs
17802else
17803 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017804fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017805{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17806echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017807
Guido van Rossum627b2d71993-12-24 10:39:16 +000017808# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
Martin v. Löwisd6320502004-08-12 13:45:08 +000017880
Martin v. Löwisc3001752005-01-23 09:27:24 +000017881
17882
Neal Norwitz05a45592006-03-20 06:30:08 +000017883
17884
Martin v. Löwis382abef2007-02-19 10:55:19 +000017885
17886
Christian Heimes36281872007-11-30 21:11:28 +000017887
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017888
17889
Jesse Noller355b1262009-04-02 00:03:28 +000017890
17891
17892
17893
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017894for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17895 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017896 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017897 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017898 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017899 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017900 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017901 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17902 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017903 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017904 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017905 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017906 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017907do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017908as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17909{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17910echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017911if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017912 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017913else
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017915/* confdefs.h. */
17916_ACEOF
17917cat confdefs.h >>conftest.$ac_ext
17918cat >>conftest.$ac_ext <<_ACEOF
17919/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017920/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17921 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17922#define $ac_func innocuous_$ac_func
17923
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017924/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017925 which can conflict with char $ac_func (); below.
17926 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017927 <limits.h> exists even on freestanding compilers. */
17928
17929#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017930# include <limits.h>
17931#else
17932# include <assert.h>
17933#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017934
17935#undef $ac_func
17936
Martin v. Löwiseba40652007-08-30 20:10:57 +000017937/* Override any GCC internal prototype to avoid an error.
17938 Use char because int might match the return type of a GCC
17939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017940#ifdef __cplusplus
17941extern "C"
17942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017943char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017944/* The GNU C library defines this for functions which it implements
17945 to always fail with ENOSYS. Some functions are actually named
17946 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017947#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017948choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017949#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017950
Skip Montanaro6dead952003-09-25 14:50:04 +000017951int
17952main ()
17953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017954return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ;
17956 return 0;
17957}
17958_ACEOF
17959rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960if { (ac_try="$ac_link"
17961case "(($ac_try" in
17962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17963 *) ac_try_echo=$ac_try;;
17964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017968 grep -v '^ *+' conftest.er1 >conftest.err
17969 rm -f conftest.er1
17970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972 (exit $ac_status); } && {
17973 test -z "$ac_c_werror_flag" ||
17974 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017975 } && test -s conftest$ac_exeext &&
17976 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017977 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017978else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017980sed 's/^/| /' conftest.$ac_ext >&5
17981
Martin v. Löwiseba40652007-08-30 20:10:57 +000017982 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017984
17985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017986 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017987fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017988ac_res=`eval echo '${'$as_ac_var'}'`
17989 { echo "$as_me:$LINENO: result: $ac_res" >&5
17990echo "${ECHO_T}$ac_res" >&6; }
17991if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017992 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017993#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017994_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017996fi
17997done
17998
Michael W. Hudson54241132001-12-07 15:38:26 +000017999
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018000# For some functions, having a definition is not sufficient, since
18001# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018002{ echo "$as_me:$LINENO: checking for chroot" >&5
18003echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018010#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018011int
18012main ()
18013{
18014void *x=chroot
18015 ;
18016 return 0;
18017}
18018_ACEOF
18019rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020if { (ac_try="$ac_compile"
18021case "(($ac_try" in
18022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18023 *) ac_try_echo=$ac_try;;
18024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018028 grep -v '^ *+' conftest.er1 >conftest.err
18029 rm -f conftest.er1
18030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032 (exit $ac_status); } && {
18033 test -z "$ac_c_werror_flag" ||
18034 test ! -s conftest.err
18035 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018036
18037cat >>confdefs.h <<\_ACEOF
18038#define HAVE_CHROOT 1
18039_ACEOF
18040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018041 { echo "$as_me:$LINENO: result: yes" >&5
18042echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018045sed 's/^/| /' conftest.$ac_ext >&5
18046
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018047 { echo "$as_me:$LINENO: result: no" >&5
18048echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018049
18050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018051
18052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018053{ echo "$as_me:$LINENO: checking for link" >&5
18054echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018056/* confdefs.h. */
18057_ACEOF
18058cat confdefs.h >>conftest.$ac_ext
18059cat >>conftest.$ac_ext <<_ACEOF
18060/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018061#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018062int
18063main ()
18064{
18065void *x=link
18066 ;
18067 return 0;
18068}
18069_ACEOF
18070rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071if { (ac_try="$ac_compile"
18072case "(($ac_try" in
18073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18074 *) ac_try_echo=$ac_try;;
18075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018079 grep -v '^ *+' conftest.er1 >conftest.err
18080 rm -f conftest.er1
18081 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018083 (exit $ac_status); } && {
18084 test -z "$ac_c_werror_flag" ||
18085 test ! -s conftest.err
18086 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018087
18088cat >>confdefs.h <<\_ACEOF
18089#define HAVE_LINK 1
18090_ACEOF
18091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018092 { echo "$as_me:$LINENO: result: yes" >&5
18093echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018096sed 's/^/| /' conftest.$ac_ext >&5
18097
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018098 { echo "$as_me:$LINENO: result: no" >&5
18099echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018100
18101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018102
18103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018104{ echo "$as_me:$LINENO: checking for symlink" >&5
18105echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018107/* confdefs.h. */
18108_ACEOF
18109cat confdefs.h >>conftest.$ac_ext
18110cat >>conftest.$ac_ext <<_ACEOF
18111/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018112#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018113int
18114main ()
18115{
18116void *x=symlink
18117 ;
18118 return 0;
18119}
18120_ACEOF
18121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018122if { (ac_try="$ac_compile"
18123case "(($ac_try" in
18124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18125 *) ac_try_echo=$ac_try;;
18126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018130 grep -v '^ *+' conftest.er1 >conftest.err
18131 rm -f conftest.er1
18132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018134 (exit $ac_status); } && {
18135 test -z "$ac_c_werror_flag" ||
18136 test ! -s conftest.err
18137 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018138
18139cat >>confdefs.h <<\_ACEOF
18140#define HAVE_SYMLINK 1
18141_ACEOF
18142
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018143 { echo "$as_me:$LINENO: result: yes" >&5
18144echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018145else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018147sed 's/^/| /' conftest.$ac_ext >&5
18148
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018149 { echo "$as_me:$LINENO: result: no" >&5
18150echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018151
18152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018153
18154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018155{ echo "$as_me:$LINENO: checking for fchdir" >&5
18156echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018158/* confdefs.h. */
18159_ACEOF
18160cat confdefs.h >>conftest.$ac_ext
18161cat >>conftest.$ac_ext <<_ACEOF
18162/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018163#include <unistd.h>
18164int
18165main ()
18166{
18167void *x=fchdir
18168 ;
18169 return 0;
18170}
18171_ACEOF
18172rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018173if { (ac_try="$ac_compile"
18174case "(($ac_try" in
18175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18176 *) ac_try_echo=$ac_try;;
18177esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018181 grep -v '^ *+' conftest.er1 >conftest.err
18182 rm -f conftest.er1
18183 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018185 (exit $ac_status); } && {
18186 test -z "$ac_c_werror_flag" ||
18187 test ! -s conftest.err
18188 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018189
18190cat >>confdefs.h <<\_ACEOF
18191#define HAVE_FCHDIR 1
18192_ACEOF
18193
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018194 { echo "$as_me:$LINENO: result: yes" >&5
18195echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018196else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018198sed 's/^/| /' conftest.$ac_ext >&5
18199
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018200 { echo "$as_me:$LINENO: result: no" >&5
18201echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018202
18203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018204
18205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018206{ echo "$as_me:$LINENO: checking for fsync" >&5
18207echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018209/* confdefs.h. */
18210_ACEOF
18211cat confdefs.h >>conftest.$ac_ext
18212cat >>conftest.$ac_ext <<_ACEOF
18213/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018214#include <unistd.h>
18215int
18216main ()
18217{
18218void *x=fsync
18219 ;
18220 return 0;
18221}
18222_ACEOF
18223rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018224if { (ac_try="$ac_compile"
18225case "(($ac_try" in
18226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18227 *) ac_try_echo=$ac_try;;
18228esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018230 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018232 grep -v '^ *+' conftest.er1 >conftest.err
18233 rm -f conftest.er1
18234 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018236 (exit $ac_status); } && {
18237 test -z "$ac_c_werror_flag" ||
18238 test ! -s conftest.err
18239 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018240
18241cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018242#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018243_ACEOF
18244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018245 { echo "$as_me:$LINENO: result: yes" >&5
18246echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018247else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018249sed 's/^/| /' conftest.$ac_ext >&5
18250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018251 { echo "$as_me:$LINENO: result: no" >&5
18252echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018253
18254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018255
18256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018257{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18258echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018259cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018260/* confdefs.h. */
18261_ACEOF
18262cat confdefs.h >>conftest.$ac_ext
18263cat >>conftest.$ac_ext <<_ACEOF
18264/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018265#include <unistd.h>
18266int
18267main ()
18268{
18269void *x=fdatasync
18270 ;
18271 return 0;
18272}
18273_ACEOF
18274rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018275if { (ac_try="$ac_compile"
18276case "(($ac_try" in
18277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18278 *) ac_try_echo=$ac_try;;
18279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018281 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018283 grep -v '^ *+' conftest.er1 >conftest.err
18284 rm -f conftest.er1
18285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018287 (exit $ac_status); } && {
18288 test -z "$ac_c_werror_flag" ||
18289 test ! -s conftest.err
18290 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018291
18292cat >>confdefs.h <<\_ACEOF
18293#define HAVE_FDATASYNC 1
18294_ACEOF
18295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018296 { echo "$as_me:$LINENO: result: yes" >&5
18297echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018300sed 's/^/| /' conftest.$ac_ext >&5
18301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018302 { echo "$as_me:$LINENO: result: no" >&5
18303echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018304
18305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018306
18307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018308{ echo "$as_me:$LINENO: checking for epoll" >&5
18309echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018310cat >conftest.$ac_ext <<_ACEOF
18311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
18316#include <sys/epoll.h>
18317int
18318main ()
18319{
18320void *x=epoll_create
18321 ;
18322 return 0;
18323}
18324_ACEOF
18325rm -f conftest.$ac_objext
18326if { (ac_try="$ac_compile"
18327case "(($ac_try" in
18328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18329 *) ac_try_echo=$ac_try;;
18330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018332 (eval "$ac_compile") 2>conftest.er1
18333 ac_status=$?
18334 grep -v '^ *+' conftest.er1 >conftest.err
18335 rm -f conftest.er1
18336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018338 (exit $ac_status); } && {
18339 test -z "$ac_c_werror_flag" ||
18340 test ! -s conftest.err
18341 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018342
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018343cat >>confdefs.h <<\_ACEOF
18344#define HAVE_EPOLL 1
18345_ACEOF
18346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018347 { echo "$as_me:$LINENO: result: yes" >&5
18348echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018350 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018351sed 's/^/| /' conftest.$ac_ext >&5
18352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018353 { echo "$as_me:$LINENO: result: no" >&5
18354echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018355
18356fi
18357
18358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018359{ echo "$as_me:$LINENO: checking for kqueue" >&5
18360echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018361cat >conftest.$ac_ext <<_ACEOF
18362/* confdefs.h. */
18363_ACEOF
18364cat confdefs.h >>conftest.$ac_ext
18365cat >>conftest.$ac_ext <<_ACEOF
18366/* end confdefs.h. */
18367
18368#include <sys/types.h>
18369#include <sys/event.h>
18370
18371int
18372main ()
18373{
18374int x=kqueue()
18375 ;
18376 return 0;
18377}
18378_ACEOF
18379rm -f conftest.$ac_objext
18380if { (ac_try="$ac_compile"
18381case "(($ac_try" in
18382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18383 *) ac_try_echo=$ac_try;;
18384esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018386 (eval "$ac_compile") 2>conftest.er1
18387 ac_status=$?
18388 grep -v '^ *+' conftest.er1 >conftest.err
18389 rm -f conftest.er1
18390 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018392 (exit $ac_status); } && {
18393 test -z "$ac_c_werror_flag" ||
18394 test ! -s conftest.err
18395 } && test -s conftest.$ac_objext; then
18396
18397cat >>confdefs.h <<\_ACEOF
18398#define HAVE_KQUEUE 1
18399_ACEOF
18400
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018401 { echo "$as_me:$LINENO: result: yes" >&5
18402echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018404 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018405sed 's/^/| /' conftest.$ac_ext >&5
18406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018407 { echo "$as_me:$LINENO: result: no" >&5
18408echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018409
18410fi
18411
18412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018413# On some systems (eg. FreeBSD 5), we would find a definition of the
18414# functions ctermid_r, setgroups in the library, but no prototype
18415# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18416# address to avoid compiler warnings and potential miscompilations
18417# because of the missing prototypes.
18418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018419{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18420echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018422/* confdefs.h. */
18423_ACEOF
18424cat confdefs.h >>conftest.$ac_ext
18425cat >>conftest.$ac_ext <<_ACEOF
18426/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018427
18428#include "confdefs.h"
18429#include <stdio.h>
18430
Martin v. Löwisd5843682002-11-21 20:41:28 +000018431int
18432main ()
18433{
18434void* p = ctermid_r
18435 ;
18436 return 0;
18437}
18438_ACEOF
18439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440if { (ac_try="$ac_compile"
18441case "(($ac_try" in
18442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18443 *) ac_try_echo=$ac_try;;
18444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018448 grep -v '^ *+' conftest.er1 >conftest.err
18449 rm -f conftest.er1
18450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452 (exit $ac_status); } && {
18453 test -z "$ac_c_werror_flag" ||
18454 test ! -s conftest.err
18455 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018456
18457cat >>confdefs.h <<\_ACEOF
18458#define HAVE_CTERMID_R 1
18459_ACEOF
18460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018461 { echo "$as_me:$LINENO: result: yes" >&5
18462echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018465sed 's/^/| /' conftest.$ac_ext >&5
18466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018467 { echo "$as_me:$LINENO: result: no" >&5
18468echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018469
18470fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018471
Martin v. Löwiseba40652007-08-30 20:10:57 +000018472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18473
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018474{ echo "$as_me:$LINENO: checking for flock" >&5
18475echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018477/* confdefs.h. */
18478_ACEOF
18479cat confdefs.h >>conftest.$ac_ext
18480cat >>conftest.$ac_ext <<_ACEOF
18481/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018482
18483#include "confdefs.h"
18484#include <sys/file.h>
18485
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018486int
18487main ()
18488{
18489void* p = flock
18490 ;
18491 return 0;
18492}
18493_ACEOF
18494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495if { (ac_try="$ac_compile"
18496case "(($ac_try" in
18497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18498 *) ac_try_echo=$ac_try;;
18499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018503 grep -v '^ *+' conftest.er1 >conftest.err
18504 rm -f conftest.er1
18505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507 (exit $ac_status); } && {
18508 test -z "$ac_c_werror_flag" ||
18509 test ! -s conftest.err
18510 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018511
18512cat >>confdefs.h <<\_ACEOF
18513#define HAVE_FLOCK 1
18514_ACEOF
18515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018516 { echo "$as_me:$LINENO: result: yes" >&5
18517echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018518else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018520sed 's/^/| /' conftest.$ac_ext >&5
18521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018522 { echo "$as_me:$LINENO: result: no" >&5
18523echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018524
18525fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018526
Martin v. Löwiseba40652007-08-30 20:10:57 +000018527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18528
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018529{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18530echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018531cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018532/* confdefs.h. */
18533_ACEOF
18534cat confdefs.h >>conftest.$ac_ext
18535cat >>conftest.$ac_ext <<_ACEOF
18536/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018537
18538#include "confdefs.h"
18539#include <unistd.h>
18540
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018541int
18542main ()
18543{
18544void* p = getpagesize
18545 ;
18546 return 0;
18547}
18548_ACEOF
18549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018550if { (ac_try="$ac_compile"
18551case "(($ac_try" in
18552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18553 *) ac_try_echo=$ac_try;;
18554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018558 grep -v '^ *+' conftest.er1 >conftest.err
18559 rm -f conftest.er1
18560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562 (exit $ac_status); } && {
18563 test -z "$ac_c_werror_flag" ||
18564 test ! -s conftest.err
18565 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018566
18567cat >>confdefs.h <<\_ACEOF
18568#define HAVE_GETPAGESIZE 1
18569_ACEOF
18570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018571 { echo "$as_me:$LINENO: result: yes" >&5
18572echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018573else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018575sed 's/^/| /' conftest.$ac_ext >&5
18576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577 { echo "$as_me:$LINENO: result: no" >&5
18578echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018579
18580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018581
18582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018583
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018584for ac_prog in true
18585do
18586 # Extract the first word of "$ac_prog", so it can be a program name with args.
18587set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018588{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18589echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018590if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018592else
18593 if test -n "$TRUE"; then
18594 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18595else
18596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599 IFS=$as_save_IFS
18600 test -z "$as_dir" && as_dir=.
18601 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018602 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 +000018603 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018604 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018605 break 2
18606 fi
18607done
18608done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018609IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018610
18611fi
18612fi
18613TRUE=$ac_cv_prog_TRUE
18614if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018615 { echo "$as_me:$LINENO: result: $TRUE" >&5
18616echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018618 { echo "$as_me:$LINENO: result: no" >&5
18619echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018620fi
18621
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018623 test -n "$TRUE" && break
18624done
18625test -n "$TRUE" || TRUE="/bin/true"
18626
18627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018628{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18629echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018630if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018632else
18633 ac_check_lib_save_LIBS=$LIBS
18634LIBS="-lc $LIBS"
18635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018636/* confdefs.h. */
18637_ACEOF
18638cat confdefs.h >>conftest.$ac_ext
18639cat >>conftest.$ac_ext <<_ACEOF
18640/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018641
Martin v. Löwiseba40652007-08-30 20:10:57 +000018642/* Override any GCC internal prototype to avoid an error.
18643 Use char because int might match the return type of a GCC
18644 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018645#ifdef __cplusplus
18646extern "C"
18647#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018648char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018649int
18650main ()
18651{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018652return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018653 ;
18654 return 0;
18655}
18656_ACEOF
18657rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658if { (ac_try="$ac_link"
18659case "(($ac_try" in
18660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18661 *) ac_try_echo=$ac_try;;
18662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018664 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018666 grep -v '^ *+' conftest.er1 >conftest.err
18667 rm -f conftest.er1
18668 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018670 (exit $ac_status); } && {
18671 test -z "$ac_c_werror_flag" ||
18672 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018673 } && test -s conftest$ac_exeext &&
18674 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018675 ac_cv_lib_c_inet_aton=yes
18676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018678sed 's/^/| /' conftest.$ac_ext >&5
18679
Martin v. Löwiseba40652007-08-30 20:10:57 +000018680 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018682
18683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018685LIBS=$ac_check_lib_save_LIBS
18686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018687{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18688echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18689if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018690 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018691else
18692
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18694echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018695if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018696 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018697else
18698 ac_check_lib_save_LIBS=$LIBS
18699LIBS="-lresolv $LIBS"
18700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018701/* confdefs.h. */
18702_ACEOF
18703cat confdefs.h >>conftest.$ac_ext
18704cat >>conftest.$ac_ext <<_ACEOF
18705/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018706
Martin v. Löwiseba40652007-08-30 20:10:57 +000018707/* Override any GCC internal prototype to avoid an error.
18708 Use char because int might match the return type of a GCC
18709 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018710#ifdef __cplusplus
18711extern "C"
18712#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018713char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018714int
18715main ()
18716{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018717return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018718 ;
18719 return 0;
18720}
18721_ACEOF
18722rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018723if { (ac_try="$ac_link"
18724case "(($ac_try" in
18725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18726 *) ac_try_echo=$ac_try;;
18727esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 grep -v '^ *+' conftest.er1 >conftest.err
18732 rm -f conftest.er1
18733 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018735 (exit $ac_status); } && {
18736 test -z "$ac_c_werror_flag" ||
18737 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018738 } && test -s conftest$ac_exeext &&
18739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018740 ac_cv_lib_resolv_inet_aton=yes
18741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018743sed 's/^/| /' conftest.$ac_ext >&5
18744
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747
18748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018750LIBS=$ac_check_lib_save_LIBS
18751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018752{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18753echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18754if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018755 cat >>confdefs.h <<_ACEOF
18756#define HAVE_LIBRESOLV 1
18757_ACEOF
18758
18759 LIBS="-lresolv $LIBS"
18760
18761fi
18762
18763
18764fi
18765
18766
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018767# On Tru64, chflags seems to be present, but calling it will
18768# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018769{ echo "$as_me:$LINENO: checking for chflags" >&5
18770echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018771if test "${ac_cv_have_chflags+set}" = set; then
18772 echo $ECHO_N "(cached) $ECHO_C" >&6
18773else
18774 if test "$cross_compiling" = yes; then
18775 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018776else
18777 cat >conftest.$ac_ext <<_ACEOF
18778/* confdefs.h. */
18779_ACEOF
18780cat confdefs.h >>conftest.$ac_ext
18781cat >>conftest.$ac_ext <<_ACEOF
18782/* end confdefs.h. */
18783
18784#include <sys/stat.h>
18785#include <unistd.h>
18786int main(int argc, char*argv[])
18787{
18788 if(chflags(argv[0], 0) != 0)
18789 return 1;
18790 return 0;
18791}
18792
18793_ACEOF
18794rm -f conftest$ac_exeext
18795if { (ac_try="$ac_link"
18796case "(($ac_try" in
18797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18798 *) ac_try_echo=$ac_try;;
18799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018801 (eval "$ac_link") 2>&5
18802 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18805 { (case "(($ac_try" in
18806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18807 *) ac_try_echo=$ac_try;;
18808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018810 (eval "$ac_try") 2>&5
18811 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018813 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018814 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018815else
18816 echo "$as_me: program exited with status $ac_status" >&5
18817echo "$as_me: failed program was:" >&5
18818sed 's/^/| /' conftest.$ac_ext >&5
18819
18820( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018821ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018822fi
18823rm -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 +000018824fi
18825
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018826
18827
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018828fi
18829
18830{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18831echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18832if test $ac_cv_have_chflags = yes
18833then
18834
18835cat >>confdefs.h <<\_ACEOF
18836#define HAVE_CHFLAGS 1
18837_ACEOF
18838
18839fi
18840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018841{ echo "$as_me:$LINENO: checking for lchflags" >&5
18842echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018843if test "${ac_cv_have_lchflags+set}" = set; then
18844 echo $ECHO_N "(cached) $ECHO_C" >&6
18845else
18846 if test "$cross_compiling" = yes; then
18847 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018848else
18849 cat >conftest.$ac_ext <<_ACEOF
18850/* confdefs.h. */
18851_ACEOF
18852cat confdefs.h >>conftest.$ac_ext
18853cat >>conftest.$ac_ext <<_ACEOF
18854/* end confdefs.h. */
18855
18856#include <sys/stat.h>
18857#include <unistd.h>
18858int main(int argc, char*argv[])
18859{
18860 if(lchflags(argv[0], 0) != 0)
18861 return 1;
18862 return 0;
18863}
18864
18865_ACEOF
18866rm -f conftest$ac_exeext
18867if { (ac_try="$ac_link"
18868case "(($ac_try" in
18869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18870 *) ac_try_echo=$ac_try;;
18871esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018873 (eval "$ac_link") 2>&5
18874 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018876 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18877 { (case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018882 (eval "$ac_try") 2>&5
18883 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018885 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018886 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018887else
18888 echo "$as_me: program exited with status $ac_status" >&5
18889echo "$as_me: failed program was:" >&5
18890sed 's/^/| /' conftest.$ac_ext >&5
18891
18892( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018893ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018894fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18896fi
18897
18898
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018899
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018900fi
18901
18902{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18903echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18904if test $ac_cv_have_lchflags = yes
18905then
18906
18907cat >>confdefs.h <<\_ACEOF
18908#define HAVE_LCHFLAGS 1
18909_ACEOF
18910
18911fi
18912
Ronald Oussorenf8752642006-07-06 10:13:35 +000018913case $ac_sys_system/$ac_sys_release in
18914Darwin/*)
18915 _CUR_CFLAGS="${CFLAGS}"
18916 _CUR_LDFLAGS="${LDFLAGS}"
18917 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18918 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18919 ;;
18920esac
18921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018922{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18923echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018924if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018925 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018926else
18927 ac_check_lib_save_LIBS=$LIBS
18928LIBS="-lz $LIBS"
18929cat >conftest.$ac_ext <<_ACEOF
18930/* confdefs.h. */
18931_ACEOF
18932cat confdefs.h >>conftest.$ac_ext
18933cat >>conftest.$ac_ext <<_ACEOF
18934/* end confdefs.h. */
18935
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936/* Override any GCC internal prototype to avoid an error.
18937 Use char because int might match the return type of a GCC
18938 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018939#ifdef __cplusplus
18940extern "C"
18941#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018942char inflateCopy ();
18943int
18944main ()
18945{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018946return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018947 ;
18948 return 0;
18949}
18950_ACEOF
18951rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952if { (ac_try="$ac_link"
18953case "(($ac_try" in
18954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18955 *) ac_try_echo=$ac_try;;
18956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018958 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018959 ac_status=$?
18960 grep -v '^ *+' conftest.er1 >conftest.err
18961 rm -f conftest.er1
18962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964 (exit $ac_status); } && {
18965 test -z "$ac_c_werror_flag" ||
18966 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018967 } && test -s conftest$ac_exeext &&
18968 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018969 ac_cv_lib_z_inflateCopy=yes
18970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018971 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018972sed 's/^/| /' conftest.$ac_ext >&5
18973
Martin v. Löwiseba40652007-08-30 20:10:57 +000018974 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018976
18977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018978 conftest$ac_exeext conftest.$ac_ext
18979LIBS=$ac_check_lib_save_LIBS
18980fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018981{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18982echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18983if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018984
18985cat >>confdefs.h <<\_ACEOF
18986#define HAVE_ZLIB_COPY 1
18987_ACEOF
18988
18989fi
18990
18991
Ronald Oussorenf8752642006-07-06 10:13:35 +000018992case $ac_sys_system/$ac_sys_release in
18993Darwin/*)
18994 CFLAGS="${_CUR_CFLAGS}"
18995 LDFLAGS="${_CUR_LDFLAGS}"
18996 ;;
18997esac
18998
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19000echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019007
19008#include "confdefs.h"
19009#include <netdb.h>
19010
Martin v. Löwise9416172003-05-03 10:12:45 +000019011int
19012main ()
19013{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019014void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019015 ;
19016 return 0;
19017}
19018_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019020if { (ac_try="$ac_link"
19021case "(($ac_try" in
19022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19023 *) ac_try_echo=$ac_try;;
19024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019028 grep -v '^ *+' conftest.er1 >conftest.err
19029 rm -f conftest.er1
19030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019032 (exit $ac_status); } && {
19033 test -z "$ac_c_werror_flag" ||
19034 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019035 } && test -s conftest$ac_exeext &&
19036 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019037
19038cat >>confdefs.h <<\_ACEOF
19039#define HAVE_HSTRERROR 1
19040_ACEOF
19041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019042 { echo "$as_me:$LINENO: result: yes" >&5
19043echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019046sed 's/^/| /' conftest.$ac_ext >&5
19047
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019048 { echo "$as_me:$LINENO: result: no" >&5
19049echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019050
19051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019052
19053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019055
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019056{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19057echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019059/* confdefs.h. */
19060_ACEOF
19061cat confdefs.h >>conftest.$ac_ext
19062cat >>conftest.$ac_ext <<_ACEOF
19063/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019064
19065#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019066#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019067#include <sys/socket.h>
19068#include <netinet/in.h>
19069#include <arpa/inet.h>
19070
Martin v. Löwise9416172003-05-03 10:12:45 +000019071int
19072main ()
19073{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019074void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019075 ;
19076 return 0;
19077}
19078_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019079rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019080if { (ac_try="$ac_link"
19081case "(($ac_try" in
19082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19083 *) ac_try_echo=$ac_try;;
19084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019088 grep -v '^ *+' conftest.er1 >conftest.err
19089 rm -f conftest.er1
19090 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019092 (exit $ac_status); } && {
19093 test -z "$ac_c_werror_flag" ||
19094 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019095 } && test -s conftest$ac_exeext &&
19096 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019097
19098cat >>confdefs.h <<\_ACEOF
19099#define HAVE_INET_ATON 1
19100_ACEOF
19101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019102 { echo "$as_me:$LINENO: result: yes" >&5
19103echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019106sed 's/^/| /' conftest.$ac_ext >&5
19107
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019108 { echo "$as_me:$LINENO: result: no" >&5
19109echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019110
19111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112
19113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019115
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019116{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19117echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019119/* confdefs.h. */
19120_ACEOF
19121cat confdefs.h >>conftest.$ac_ext
19122cat >>conftest.$ac_ext <<_ACEOF
19123/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019124
19125#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019126#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019127#include <sys/socket.h>
19128#include <netinet/in.h>
19129#include <arpa/inet.h>
19130
Martin v. Löwise9416172003-05-03 10:12:45 +000019131int
19132main ()
19133{
19134void* p = inet_pton
19135 ;
19136 return 0;
19137}
19138_ACEOF
19139rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019140if { (ac_try="$ac_compile"
19141case "(($ac_try" in
19142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19143 *) ac_try_echo=$ac_try;;
19144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019148 grep -v '^ *+' conftest.er1 >conftest.err
19149 rm -f conftest.er1
19150 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152 (exit $ac_status); } && {
19153 test -z "$ac_c_werror_flag" ||
19154 test ! -s conftest.err
19155 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019156
19157cat >>confdefs.h <<\_ACEOF
19158#define HAVE_INET_PTON 1
19159_ACEOF
19160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019161 { echo "$as_me:$LINENO: result: yes" >&5
19162echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019165sed 's/^/| /' conftest.$ac_ext >&5
19166
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019167 { echo "$as_me:$LINENO: result: no" >&5
19168echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019169
19170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019171
19172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019173
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019174# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019175{ echo "$as_me:$LINENO: checking for setgroups" >&5
19176echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019178/* confdefs.h. */
19179_ACEOF
19180cat confdefs.h >>conftest.$ac_ext
19181cat >>conftest.$ac_ext <<_ACEOF
19182/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019183
19184#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019185#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019186#ifdef HAVE_GRP_H
19187#include <grp.h>
19188#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019189
Martin v. Löwisd5843682002-11-21 20:41:28 +000019190int
19191main ()
19192{
19193void* p = setgroups
19194 ;
19195 return 0;
19196}
19197_ACEOF
19198rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019199if { (ac_try="$ac_compile"
19200case "(($ac_try" in
19201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19202 *) ac_try_echo=$ac_try;;
19203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019205 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019207 grep -v '^ *+' conftest.er1 >conftest.err
19208 rm -f conftest.er1
19209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019211 (exit $ac_status); } && {
19212 test -z "$ac_c_werror_flag" ||
19213 test ! -s conftest.err
19214 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019215
19216cat >>confdefs.h <<\_ACEOF
19217#define HAVE_SETGROUPS 1
19218_ACEOF
19219
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019220 { echo "$as_me:$LINENO: result: yes" >&5
19221echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019222else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019224sed 's/^/| /' conftest.$ac_ext >&5
19225
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019226 { echo "$as_me:$LINENO: result: no" >&5
19227echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019228
19229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019230
19231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019233# check for openpty and forkpty
19234
Martin v. Löwis11437992002-04-12 09:54:03 +000019235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019236for ac_func in openpty
19237do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019238as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19239{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19240echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019241if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019243else
Martin v. Löwis11437992002-04-12 09:54:03 +000019244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019245/* confdefs.h. */
19246_ACEOF
19247cat confdefs.h >>conftest.$ac_ext
19248cat >>conftest.$ac_ext <<_ACEOF
19249/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019250/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19251 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19252#define $ac_func innocuous_$ac_func
19253
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019254/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019255 which can conflict with char $ac_func (); below.
19256 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019257 <limits.h> exists even on freestanding compilers. */
19258
19259#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019260# include <limits.h>
19261#else
19262# include <assert.h>
19263#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019264
19265#undef $ac_func
19266
Martin v. Löwiseba40652007-08-30 20:10:57 +000019267/* Override any GCC internal prototype to avoid an error.
19268 Use char because int might match the return type of a GCC
19269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019270#ifdef __cplusplus
19271extern "C"
19272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019273char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019274/* The GNU C library defines this for functions which it implements
19275 to always fail with ENOSYS. Some functions are actually named
19276 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019277#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019278choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019279#endif
19280
Skip Montanaro6dead952003-09-25 14:50:04 +000019281int
19282main ()
19283{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019284return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 ;
19286 return 0;
19287}
19288_ACEOF
19289rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019290if { (ac_try="$ac_link"
19291case "(($ac_try" in
19292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19293 *) ac_try_echo=$ac_try;;
19294esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019296 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019298 grep -v '^ *+' conftest.er1 >conftest.err
19299 rm -f conftest.er1
19300 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019302 (exit $ac_status); } && {
19303 test -z "$ac_c_werror_flag" ||
19304 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019305 } && test -s conftest$ac_exeext &&
19306 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019307 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019308else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019310sed 's/^/| /' conftest.$ac_ext >&5
19311
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019313fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019314
19315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019316 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019317fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019318ac_res=`eval echo '${'$as_ac_var'}'`
19319 { echo "$as_me:$LINENO: result: $ac_res" >&5
19320echo "${ECHO_T}$ac_res" >&6; }
19321if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019322 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019323#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019325
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019326else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019327 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19328echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019329if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019330 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019331else
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019333LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019334cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019335/* confdefs.h. */
19336_ACEOF
19337cat confdefs.h >>conftest.$ac_ext
19338cat >>conftest.$ac_ext <<_ACEOF
19339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019340
Martin v. Löwiseba40652007-08-30 20:10:57 +000019341/* Override any GCC internal prototype to avoid an error.
19342 Use char because int might match the return type of a GCC
19343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019344#ifdef __cplusplus
19345extern "C"
19346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019347char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019348int
19349main ()
19350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019351return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019352 ;
19353 return 0;
19354}
19355_ACEOF
19356rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019357if { (ac_try="$ac_link"
19358case "(($ac_try" in
19359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19360 *) ac_try_echo=$ac_try;;
19361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019365 grep -v '^ *+' conftest.er1 >conftest.err
19366 rm -f conftest.er1
19367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019369 (exit $ac_status); } && {
19370 test -z "$ac_c_werror_flag" ||
19371 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019372 } && test -s conftest$ac_exeext &&
19373 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019375else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019377sed 's/^/| /' conftest.$ac_ext >&5
19378
Martin v. Löwiseba40652007-08-30 20:10:57 +000019379 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019381
19382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019383 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019384LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019385fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019386{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19387echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19388if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019390#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019391_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019392 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019394 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19395echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019396if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019397 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019398else
19399 ac_check_lib_save_LIBS=$LIBS
19400LIBS="-lbsd $LIBS"
19401cat >conftest.$ac_ext <<_ACEOF
19402/* confdefs.h. */
19403_ACEOF
19404cat confdefs.h >>conftest.$ac_ext
19405cat >>conftest.$ac_ext <<_ACEOF
19406/* end confdefs.h. */
19407
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408/* Override any GCC internal prototype to avoid an error.
19409 Use char because int might match the return type of a GCC
19410 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019411#ifdef __cplusplus
19412extern "C"
19413#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019414char openpty ();
19415int
19416main ()
19417{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019419 ;
19420 return 0;
19421}
19422_ACEOF
19423rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019424if { (ac_try="$ac_link"
19425case "(($ac_try" in
19426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19427 *) ac_try_echo=$ac_try;;
19428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019430 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019431 ac_status=$?
19432 grep -v '^ *+' conftest.er1 >conftest.err
19433 rm -f conftest.er1
19434 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019436 (exit $ac_status); } && {
19437 test -z "$ac_c_werror_flag" ||
19438 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019439 } && test -s conftest$ac_exeext &&
19440 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019441 ac_cv_lib_bsd_openpty=yes
19442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019443 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019444sed 's/^/| /' conftest.$ac_ext >&5
19445
Martin v. Löwiseba40652007-08-30 20:10:57 +000019446 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019448
19449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019450 conftest$ac_exeext conftest.$ac_ext
19451LIBS=$ac_check_lib_save_LIBS
19452fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019453{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19454echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19455if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019456 cat >>confdefs.h <<\_ACEOF
19457#define HAVE_OPENPTY 1
19458_ACEOF
19459 LIBS="$LIBS -lbsd"
19460fi
19461
19462
19463fi
19464
Fred Drake8cef4cf2000-06-28 16:40:38 +000019465
19466fi
19467done
19468
Martin v. Löwis11437992002-04-12 09:54:03 +000019469
Fred Drake8cef4cf2000-06-28 16:40:38 +000019470for ac_func in forkpty
19471do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019472as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19473{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19474echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019475if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019476 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019477else
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019479/* confdefs.h. */
19480_ACEOF
19481cat confdefs.h >>conftest.$ac_ext
19482cat >>conftest.$ac_ext <<_ACEOF
19483/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019484/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19485 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19486#define $ac_func innocuous_$ac_func
19487
Fred Drake8cef4cf2000-06-28 16:40:38 +000019488/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019489 which can conflict with char $ac_func (); below.
19490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019491 <limits.h> exists even on freestanding compilers. */
19492
19493#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019494# include <limits.h>
19495#else
19496# include <assert.h>
19497#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019498
19499#undef $ac_func
19500
Martin v. Löwiseba40652007-08-30 20:10:57 +000019501/* Override any GCC internal prototype to avoid an error.
19502 Use char because int might match the return type of a GCC
19503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019504#ifdef __cplusplus
19505extern "C"
19506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019507char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019508/* The GNU C library defines this for functions which it implements
19509 to always fail with ENOSYS. Some functions are actually named
19510 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019511#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019512choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019513#endif
19514
Skip Montanaro6dead952003-09-25 14:50:04 +000019515int
19516main ()
19517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019518return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 ;
19520 return 0;
19521}
19522_ACEOF
19523rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524if { (ac_try="$ac_link"
19525case "(($ac_try" in
19526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19527 *) ac_try_echo=$ac_try;;
19528esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019532 grep -v '^ *+' conftest.er1 >conftest.err
19533 rm -f conftest.er1
19534 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019536 (exit $ac_status); } && {
19537 test -z "$ac_c_werror_flag" ||
19538 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019539 } && test -s conftest$ac_exeext &&
19540 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019541 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019544sed 's/^/| /' conftest.$ac_ext >&5
19545
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019548
19549rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019550 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019551fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019552ac_res=`eval echo '${'$as_ac_var'}'`
19553 { echo "$as_me:$LINENO: result: $ac_res" >&5
19554echo "${ECHO_T}$ac_res" >&6; }
19555if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019557#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019558_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019559
Fred Drake8cef4cf2000-06-28 16:40:38 +000019560else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019561 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19562echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019563if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019564 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019565else
Martin v. Löwis11437992002-04-12 09:54:03 +000019566 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019567LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019569/* confdefs.h. */
19570_ACEOF
19571cat confdefs.h >>conftest.$ac_ext
19572cat >>conftest.$ac_ext <<_ACEOF
19573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019574
Martin v. Löwiseba40652007-08-30 20:10:57 +000019575/* Override any GCC internal prototype to avoid an error.
19576 Use char because int might match the return type of a GCC
19577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019578#ifdef __cplusplus
19579extern "C"
19580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019581char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019582int
19583main ()
19584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019585return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019586 ;
19587 return 0;
19588}
19589_ACEOF
19590rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019591if { (ac_try="$ac_link"
19592case "(($ac_try" in
19593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19594 *) ac_try_echo=$ac_try;;
19595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019597 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019599 grep -v '^ *+' conftest.er1 >conftest.err
19600 rm -f conftest.er1
19601 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019603 (exit $ac_status); } && {
19604 test -z "$ac_c_werror_flag" ||
19605 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019606 } && test -s conftest$ac_exeext &&
19607 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019608 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019611sed 's/^/| /' conftest.$ac_ext >&5
19612
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019615
19616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019618LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019619fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019620{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19621echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19622if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019623 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019624#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019625_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019626 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019627else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019628 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19629echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019630if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019632else
19633 ac_check_lib_save_LIBS=$LIBS
19634LIBS="-lbsd $LIBS"
19635cat >conftest.$ac_ext <<_ACEOF
19636/* confdefs.h. */
19637_ACEOF
19638cat confdefs.h >>conftest.$ac_ext
19639cat >>conftest.$ac_ext <<_ACEOF
19640/* end confdefs.h. */
19641
Martin v. Löwiseba40652007-08-30 20:10:57 +000019642/* Override any GCC internal prototype to avoid an error.
19643 Use char because int might match the return type of a GCC
19644 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019645#ifdef __cplusplus
19646extern "C"
19647#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019648char forkpty ();
19649int
19650main ()
19651{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019652return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019653 ;
19654 return 0;
19655}
19656_ACEOF
19657rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019658if { (ac_try="$ac_link"
19659case "(($ac_try" in
19660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19661 *) ac_try_echo=$ac_try;;
19662esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019665 ac_status=$?
19666 grep -v '^ *+' conftest.er1 >conftest.err
19667 rm -f conftest.er1
19668 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670 (exit $ac_status); } && {
19671 test -z "$ac_c_werror_flag" ||
19672 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019673 } && test -s conftest$ac_exeext &&
19674 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019675 ac_cv_lib_bsd_forkpty=yes
19676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019677 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019678sed 's/^/| /' conftest.$ac_ext >&5
19679
Martin v. Löwiseba40652007-08-30 20:10:57 +000019680 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019682
19683rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019684 conftest$ac_exeext conftest.$ac_ext
19685LIBS=$ac_check_lib_save_LIBS
19686fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019687{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19688echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19689if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019690 cat >>confdefs.h <<\_ACEOF
19691#define HAVE_FORKPTY 1
19692_ACEOF
19693 LIBS="$LIBS -lbsd"
19694fi
19695
19696
19697fi
19698
Fred Drake8cef4cf2000-06-28 16:40:38 +000019699
19700fi
19701done
19702
Jack Jansendd19cf82001-12-06 22:36:17 +000019703
Brett Cannonaa5778d2008-03-18 04:09:00 +000019704# Stuff for expat.
19705
19706for ac_func in memmove
19707do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019708as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19709{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19710echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019711if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019712 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019713else
19714 cat >conftest.$ac_ext <<_ACEOF
19715/* confdefs.h. */
19716_ACEOF
19717cat confdefs.h >>conftest.$ac_ext
19718cat >>conftest.$ac_ext <<_ACEOF
19719/* end confdefs.h. */
19720/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19721 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19722#define $ac_func innocuous_$ac_func
19723
19724/* System header to define __stub macros and hopefully few prototypes,
19725 which can conflict with char $ac_func (); below.
19726 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19727 <limits.h> exists even on freestanding compilers. */
19728
19729#ifdef __STDC__
19730# include <limits.h>
19731#else
19732# include <assert.h>
19733#endif
19734
19735#undef $ac_func
19736
19737/* Override any GCC internal prototype to avoid an error.
19738 Use char because int might match the return type of a GCC
19739 builtin and then its argument prototype would still apply. */
19740#ifdef __cplusplus
19741extern "C"
19742#endif
19743char $ac_func ();
19744/* The GNU C library defines this for functions which it implements
19745 to always fail with ENOSYS. Some functions are actually named
19746 something starting with __ and the normal name is an alias. */
19747#if defined __stub_$ac_func || defined __stub___$ac_func
19748choke me
19749#endif
19750
19751int
19752main ()
19753{
19754return $ac_func ();
19755 ;
19756 return 0;
19757}
19758_ACEOF
19759rm -f conftest.$ac_objext conftest$ac_exeext
19760if { (ac_try="$ac_link"
19761case "(($ac_try" in
19762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19763 *) ac_try_echo=$ac_try;;
19764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019766 (eval "$ac_link") 2>conftest.er1
19767 ac_status=$?
19768 grep -v '^ *+' conftest.er1 >conftest.err
19769 rm -f conftest.er1
19770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019772 (exit $ac_status); } && {
19773 test -z "$ac_c_werror_flag" ||
19774 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019775 } && test -s conftest$ac_exeext &&
19776 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019777 eval "$as_ac_var=yes"
19778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019779 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019780sed 's/^/| /' conftest.$ac_ext >&5
19781
19782 eval "$as_ac_var=no"
19783fi
19784
19785rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19786 conftest$ac_exeext conftest.$ac_ext
19787fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019788ac_res=`eval echo '${'$as_ac_var'}'`
19789 { echo "$as_me:$LINENO: result: $ac_res" >&5
19790echo "${ECHO_T}$ac_res" >&6; }
19791if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019792 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019793#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019794_ACEOF
19795
19796fi
19797done
19798
19799
Michael W. Hudson54241132001-12-07 15:38:26 +000019800# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019801
19802
19803
19804
19805
19806
Fred Drake8cef4cf2000-06-28 16:40:38 +000019807for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19808do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019809as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19810{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19811echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019812if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019813 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019814else
Martin v. Löwis11437992002-04-12 09:54:03 +000019815 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019816/* confdefs.h. */
19817_ACEOF
19818cat confdefs.h >>conftest.$ac_ext
19819cat >>conftest.$ac_ext <<_ACEOF
19820/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19822 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19823#define $ac_func innocuous_$ac_func
19824
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019825/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019826 which can conflict with char $ac_func (); below.
19827 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019828 <limits.h> exists even on freestanding compilers. */
19829
19830#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019831# include <limits.h>
19832#else
19833# include <assert.h>
19834#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019835
19836#undef $ac_func
19837
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838/* Override any GCC internal prototype to avoid an error.
19839 Use char because int might match the return type of a GCC
19840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019841#ifdef __cplusplus
19842extern "C"
19843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019844char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019845/* The GNU C library defines this for functions which it implements
19846 to always fail with ENOSYS. Some functions are actually named
19847 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019849choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019850#endif
19851
Skip Montanaro6dead952003-09-25 14:50:04 +000019852int
19853main ()
19854{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019855return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019856 ;
19857 return 0;
19858}
19859_ACEOF
19860rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019861if { (ac_try="$ac_link"
19862case "(($ac_try" in
19863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19864 *) ac_try_echo=$ac_try;;
19865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019867 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019869 grep -v '^ *+' conftest.er1 >conftest.err
19870 rm -f conftest.er1
19871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019873 (exit $ac_status); } && {
19874 test -z "$ac_c_werror_flag" ||
19875 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019876 } && test -s conftest$ac_exeext &&
19877 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019878 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019879else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019881sed 's/^/| /' conftest.$ac_ext >&5
19882
Martin v. Löwiseba40652007-08-30 20:10:57 +000019883 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885
19886rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019887 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019889ac_res=`eval echo '${'$as_ac_var'}'`
19890 { echo "$as_me:$LINENO: result: $ac_res" >&5
19891echo "${ECHO_T}$ac_res" >&6; }
19892if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019893 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019894#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019895_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019897fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019898done
19899
Michael W. Hudson54241132001-12-07 15:38:26 +000019900
Martin v. Löwis11437992002-04-12 09:54:03 +000019901
19902
19903
Brett Cannonaa5778d2008-03-18 04:09:00 +000019904for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019905do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019906as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19907{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19908echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019909if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019911else
Martin v. Löwis11437992002-04-12 09:54:03 +000019912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019918/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19919 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19920#define $ac_func innocuous_$ac_func
19921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019922/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019923 which can conflict with char $ac_func (); below.
19924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019925 <limits.h> exists even on freestanding compilers. */
19926
19927#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019928# include <limits.h>
19929#else
19930# include <assert.h>
19931#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019932
19933#undef $ac_func
19934
Martin v. Löwiseba40652007-08-30 20:10:57 +000019935/* Override any GCC internal prototype to avoid an error.
19936 Use char because int might match the return type of a GCC
19937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019938#ifdef __cplusplus
19939extern "C"
19940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019941char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019942/* The GNU C library defines this for functions which it implements
19943 to always fail with ENOSYS. Some functions are actually named
19944 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019946choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019947#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019948
Skip Montanaro6dead952003-09-25 14:50:04 +000019949int
19950main ()
19951{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019952return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019953 ;
19954 return 0;
19955}
19956_ACEOF
19957rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019958if { (ac_try="$ac_link"
19959case "(($ac_try" in
19960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19961 *) ac_try_echo=$ac_try;;
19962esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019964 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019966 grep -v '^ *+' conftest.er1 >conftest.err
19967 rm -f conftest.er1
19968 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970 (exit $ac_status); } && {
19971 test -z "$ac_c_werror_flag" ||
19972 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019973 } && test -s conftest$ac_exeext &&
19974 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019976else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019978sed 's/^/| /' conftest.$ac_ext >&5
19979
Martin v. Löwiseba40652007-08-30 20:10:57 +000019980 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982
19983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019985fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019986ac_res=`eval echo '${'$as_ac_var'}'`
19987 { echo "$as_me:$LINENO: result: $ac_res" >&5
19988echo "${ECHO_T}$ac_res" >&6; }
19989if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019990 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019991#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019992_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019993
Martin v. Löwis1142de32002-03-29 16:28:31 +000019994else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019995 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019996 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019997 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19998 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019999esac
20000
Martin v. Löwis1142de32002-03-29 16:28:31 +000020001fi
20002done
20003
20004
Martin v. Löwis11437992002-04-12 09:54:03 +000020005
Martin v. Löwis1142de32002-03-29 16:28:31 +000020006for ac_func in getpgrp
20007do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020008as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20009{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20010echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020011if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020013else
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020015/* confdefs.h. */
20016_ACEOF
20017cat confdefs.h >>conftest.$ac_ext
20018cat >>conftest.$ac_ext <<_ACEOF
20019/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020020/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20021 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20022#define $ac_func innocuous_$ac_func
20023
Martin v. Löwis1142de32002-03-29 16:28:31 +000020024/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020025 which can conflict with char $ac_func (); below.
20026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020027 <limits.h> exists even on freestanding compilers. */
20028
20029#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020030# include <limits.h>
20031#else
20032# include <assert.h>
20033#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020034
20035#undef $ac_func
20036
Martin v. Löwiseba40652007-08-30 20:10:57 +000020037/* Override any GCC internal prototype to avoid an error.
20038 Use char because int might match the return type of a GCC
20039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020040#ifdef __cplusplus
20041extern "C"
20042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020043char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020044/* The GNU C library defines this for functions which it implements
20045 to always fail with ENOSYS. Some functions are actually named
20046 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020048choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020049#endif
20050
Skip Montanaro6dead952003-09-25 14:50:04 +000020051int
20052main ()
20053{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020054return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 ;
20056 return 0;
20057}
20058_ACEOF
20059rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020060if { (ac_try="$ac_link"
20061case "(($ac_try" in
20062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20063 *) ac_try_echo=$ac_try;;
20064esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020068 grep -v '^ *+' conftest.er1 >conftest.err
20069 rm -f conftest.er1
20070 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072 (exit $ac_status); } && {
20073 test -z "$ac_c_werror_flag" ||
20074 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020075 } && test -s conftest$ac_exeext &&
20076 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020080sed 's/^/| /' conftest.$ac_ext >&5
20081
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084
20085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020086 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020087fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020088ac_res=`eval echo '${'$as_ac_var'}'`
20089 { echo "$as_me:$LINENO: result: $ac_res" >&5
20090echo "${ECHO_T}$ac_res" >&6; }
20091if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020093#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020094_ACEOF
20095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020096/* confdefs.h. */
20097_ACEOF
20098cat confdefs.h >>conftest.$ac_ext
20099cat >>conftest.$ac_ext <<_ACEOF
20100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020101#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020102int
20103main ()
20104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020105getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020106 ;
20107 return 0;
20108}
20109_ACEOF
20110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020111if { (ac_try="$ac_compile"
20112case "(($ac_try" in
20113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20114 *) ac_try_echo=$ac_try;;
20115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020119 grep -v '^ *+' conftest.er1 >conftest.err
20120 rm -f conftest.er1
20121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020123 (exit $ac_status); } && {
20124 test -z "$ac_c_werror_flag" ||
20125 test ! -s conftest.err
20126 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020127
20128cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020129#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020130_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020131
Martin v. Löwis11437992002-04-12 09:54:03 +000020132
Guido van Rossumf78abae1997-01-21 22:02:36 +000020133else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020135sed 's/^/| /' conftest.$ac_ext >&5
20136
Martin v. Löwiseba40652007-08-30 20:10:57 +000020137
Guido van Rossum627b2d71993-12-24 10:39:16 +000020138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139
20140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020141
Guido van Rossum627b2d71993-12-24 10:39:16 +000020142fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020143done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020144
Jack Jansen150753c2003-03-29 22:07:47 +000020145
20146for ac_func in setpgrp
20147do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020148as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20149{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20150echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020153else
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020155/* confdefs.h. */
20156_ACEOF
20157cat confdefs.h >>conftest.$ac_ext
20158cat >>conftest.$ac_ext <<_ACEOF
20159/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020160/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20161 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20162#define $ac_func innocuous_$ac_func
20163
Jack Jansen150753c2003-03-29 22:07:47 +000020164/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020165 which can conflict with char $ac_func (); below.
20166 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020167 <limits.h> exists even on freestanding compilers. */
20168
20169#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020170# include <limits.h>
20171#else
20172# include <assert.h>
20173#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020174
20175#undef $ac_func
20176
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177/* Override any GCC internal prototype to avoid an error.
20178 Use char because int might match the return type of a GCC
20179 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020180#ifdef __cplusplus
20181extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020182#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020183char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020184/* The GNU C library defines this for functions which it implements
20185 to always fail with ENOSYS. Some functions are actually named
20186 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020187#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020188choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020189#endif
20190
Skip Montanaro6dead952003-09-25 14:50:04 +000020191int
20192main ()
20193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020195 ;
20196 return 0;
20197}
20198_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020199rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020200if { (ac_try="$ac_link"
20201case "(($ac_try" in
20202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20203 *) ac_try_echo=$ac_try;;
20204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020208 grep -v '^ *+' conftest.er1 >conftest.err
20209 rm -f conftest.er1
20210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212 (exit $ac_status); } && {
20213 test -z "$ac_c_werror_flag" ||
20214 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020215 } && test -s conftest$ac_exeext &&
20216 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020217 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020220sed 's/^/| /' conftest.$ac_ext >&5
20221
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224
20225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020226 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020228ac_res=`eval echo '${'$as_ac_var'}'`
20229 { echo "$as_me:$LINENO: result: $ac_res" >&5
20230echo "${ECHO_T}$ac_res" >&6; }
20231if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020232 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020233#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020234_ACEOF
20235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020236/* confdefs.h. */
20237_ACEOF
20238cat confdefs.h >>conftest.$ac_ext
20239cat >>conftest.$ac_ext <<_ACEOF
20240/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020241#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020242int
20243main ()
20244{
20245setpgrp(0,0);
20246 ;
20247 return 0;
20248}
20249_ACEOF
20250rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020251if { (ac_try="$ac_compile"
20252case "(($ac_try" in
20253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20254 *) ac_try_echo=$ac_try;;
20255esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020257 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020259 grep -v '^ *+' conftest.er1 >conftest.err
20260 rm -f conftest.er1
20261 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020263 (exit $ac_status); } && {
20264 test -z "$ac_c_werror_flag" ||
20265 test ! -s conftest.err
20266 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020267
20268cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020269#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020270_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020271
Jack Jansen150753c2003-03-29 22:07:47 +000020272
20273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020275sed 's/^/| /' conftest.$ac_ext >&5
20276
Martin v. Löwiseba40652007-08-30 20:10:57 +000020277
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279
20280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020281
20282fi
20283done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020284
Martin v. Löwis11437992002-04-12 09:54:03 +000020285
Thomas Wouters3a584202000-08-05 23:28:51 +000020286for ac_func in gettimeofday
20287do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020288as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20289{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20290echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020293else
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020295/* confdefs.h. */
20296_ACEOF
20297cat confdefs.h >>conftest.$ac_ext
20298cat >>conftest.$ac_ext <<_ACEOF
20299/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020300/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20302#define $ac_func innocuous_$ac_func
20303
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020304/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020305 which can conflict with char $ac_func (); below.
20306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020307 <limits.h> exists even on freestanding compilers. */
20308
20309#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020310# include <limits.h>
20311#else
20312# include <assert.h>
20313#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020314
20315#undef $ac_func
20316
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317/* Override any GCC internal prototype to avoid an error.
20318 Use char because int might match the return type of a GCC
20319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020320#ifdef __cplusplus
20321extern "C"
20322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020323char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020324/* The GNU C library defines this for functions which it implements
20325 to always fail with ENOSYS. Some functions are actually named
20326 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020327#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020328choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020329#endif
20330
Skip Montanaro6dead952003-09-25 14:50:04 +000020331int
20332main ()
20333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020335 ;
20336 return 0;
20337}
20338_ACEOF
20339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020340if { (ac_try="$ac_link"
20341case "(($ac_try" in
20342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20343 *) ac_try_echo=$ac_try;;
20344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020348 grep -v '^ *+' conftest.er1 >conftest.err
20349 rm -f conftest.er1
20350 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352 (exit $ac_status); } && {
20353 test -z "$ac_c_werror_flag" ||
20354 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020355 } && test -s conftest$ac_exeext &&
20356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020360sed 's/^/| /' conftest.$ac_ext >&5
20361
Martin v. Löwiseba40652007-08-30 20:10:57 +000020362 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020364
20365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020366 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020367fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020368ac_res=`eval echo '${'$as_ac_var'}'`
20369 { echo "$as_me:$LINENO: result: $ac_res" >&5
20370echo "${ECHO_T}$ac_res" >&6; }
20371if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020373#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020374_ACEOF
20375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020376/* confdefs.h. */
20377_ACEOF
20378cat confdefs.h >>conftest.$ac_ext
20379cat >>conftest.$ac_ext <<_ACEOF
20380/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020381#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020382int
20383main ()
20384{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020385gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 ;
20387 return 0;
20388}
20389_ACEOF
20390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020391if { (ac_try="$ac_compile"
20392case "(($ac_try" in
20393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20394 *) ac_try_echo=$ac_try;;
20395esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020399 grep -v '^ *+' conftest.er1 >conftest.err
20400 rm -f conftest.er1
20401 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020403 (exit $ac_status); } && {
20404 test -z "$ac_c_werror_flag" ||
20405 test ! -s conftest.err
20406 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020407 :
20408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020410sed 's/^/| /' conftest.$ac_ext >&5
20411
Martin v. Löwis11437992002-04-12 09:54:03 +000020412
20413cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020414#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020415_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417
Guido van Rossum627b2d71993-12-24 10:39:16 +000020418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419
20420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020421
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020422fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020423done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020424
Michael W. Hudson54241132001-12-07 15:38:26 +000020425
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020426{ echo "$as_me:$LINENO: checking for major" >&5
20427echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020429/* confdefs.h. */
20430_ACEOF
20431cat confdefs.h >>conftest.$ac_ext
20432cat >>conftest.$ac_ext <<_ACEOF
20433/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020434
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020435#if defined(MAJOR_IN_MKDEV)
20436#include <sys/mkdev.h>
20437#elif defined(MAJOR_IN_SYSMACROS)
20438#include <sys/sysmacros.h>
20439#else
20440#include <sys/types.h>
20441#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020442
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020443int
20444main ()
20445{
20446
20447 makedev(major(0),minor(0));
20448
20449 ;
20450 return 0;
20451}
20452_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020453rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020454if { (ac_try="$ac_link"
20455case "(($ac_try" in
20456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20457 *) ac_try_echo=$ac_try;;
20458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020460 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020462 grep -v '^ *+' conftest.er1 >conftest.err
20463 rm -f conftest.er1
20464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466 (exit $ac_status); } && {
20467 test -z "$ac_c_werror_flag" ||
20468 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020469 } && test -s conftest$ac_exeext &&
20470 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020471
20472
20473cat >>confdefs.h <<\_ACEOF
20474#define HAVE_DEVICE_MACROS 1
20475_ACEOF
20476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020477 { echo "$as_me:$LINENO: result: yes" >&5
20478echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020479
20480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020482sed 's/^/| /' conftest.$ac_ext >&5
20483
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020485 { echo "$as_me:$LINENO: result: no" >&5
20486echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020487
20488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020489
20490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020491 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020492
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020493# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020494# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020495{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20496echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020497cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020498/* confdefs.h. */
20499_ACEOF
20500cat confdefs.h >>conftest.$ac_ext
20501cat >>conftest.$ac_ext <<_ACEOF
20502/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020503
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020504#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020505#include <sys/socket.h>
20506#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020507#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020508
Martin v. Löwis11437992002-04-12 09:54:03 +000020509int
20510main ()
20511{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020512getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020513 ;
20514 return 0;
20515}
20516_ACEOF
20517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518if { (ac_try="$ac_link"
20519case "(($ac_try" in
20520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20521 *) ac_try_echo=$ac_try;;
20522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020526 grep -v '^ *+' conftest.er1 >conftest.err
20527 rm -f conftest.er1
20528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530 (exit $ac_status); } && {
20531 test -z "$ac_c_werror_flag" ||
20532 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020533 } && test -s conftest$ac_exeext &&
20534 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020535 have_getaddrinfo=yes
20536else
20537 echo "$as_me: failed program was:" >&5
20538sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020539
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020540 have_getaddrinfo=no
20541fi
20542
20543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20544 conftest$ac_exeext conftest.$ac_ext
20545{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20546echo "${ECHO_T}$have_getaddrinfo" >&6; }
20547if test $have_getaddrinfo = yes
20548then
20549 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020550echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020551 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20552 echo $ECHO_N "(cached) $ECHO_C" >&6
20553else
20554 if test "$cross_compiling" = yes; then
20555 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020556else
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020558/* confdefs.h. */
20559_ACEOF
20560cat confdefs.h >>conftest.$ac_ext
20561cat >>conftest.$ac_ext <<_ACEOF
20562/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020563
20564#include <sys/types.h>
20565#include <netdb.h>
20566#include <string.h>
20567#include <sys/socket.h>
20568#include <netinet/in.h>
20569
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020570int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020571{
20572 int passive, gaierr, inet4 = 0, inet6 = 0;
20573 struct addrinfo hints, *ai, *aitop;
20574 char straddr[INET6_ADDRSTRLEN], strport[16];
20575
20576 for (passive = 0; passive <= 1; passive++) {
20577 memset(&hints, 0, sizeof(hints));
20578 hints.ai_family = AF_UNSPEC;
20579 hints.ai_flags = passive ? AI_PASSIVE : 0;
20580 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020581 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020582 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20583 (void)gai_strerror(gaierr);
20584 goto bad;
20585 }
20586 for (ai = aitop; ai; ai = ai->ai_next) {
20587 if (ai->ai_addr == NULL ||
20588 ai->ai_addrlen == 0 ||
20589 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20590 straddr, sizeof(straddr), strport, sizeof(strport),
20591 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20592 goto bad;
20593 }
20594 switch (ai->ai_family) {
20595 case AF_INET:
20596 if (strcmp(strport, "54321") != 0) {
20597 goto bad;
20598 }
20599 if (passive) {
20600 if (strcmp(straddr, "0.0.0.0") != 0) {
20601 goto bad;
20602 }
20603 } else {
20604 if (strcmp(straddr, "127.0.0.1") != 0) {
20605 goto bad;
20606 }
20607 }
20608 inet4++;
20609 break;
20610 case AF_INET6:
20611 if (strcmp(strport, "54321") != 0) {
20612 goto bad;
20613 }
20614 if (passive) {
20615 if (strcmp(straddr, "::") != 0) {
20616 goto bad;
20617 }
20618 } else {
20619 if (strcmp(straddr, "::1") != 0) {
20620 goto bad;
20621 }
20622 }
20623 inet6++;
20624 break;
20625 case AF_UNSPEC:
20626 goto bad;
20627 break;
20628 default:
20629 /* another family support? */
20630 break;
20631 }
20632 }
20633 }
20634
20635 if (!(inet4 == 0 || inet4 == 2))
20636 goto bad;
20637 if (!(inet6 == 0 || inet6 == 2))
20638 goto bad;
20639
20640 if (aitop)
20641 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020642 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020643
20644 bad:
20645 if (aitop)
20646 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020647 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020648}
20649
Martin v. Löwis11437992002-04-12 09:54:03 +000020650_ACEOF
20651rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652if { (ac_try="$ac_link"
20653case "(($ac_try" in
20654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20655 *) ac_try_echo=$ac_try;;
20656esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020658 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020659 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020662 { (case "(($ac_try" in
20663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20664 *) ac_try_echo=$ac_try;;
20665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020667 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020671 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020673 echo "$as_me: program exited with status $ac_status" >&5
20674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020675sed 's/^/| /' conftest.$ac_ext >&5
20676
Martin v. Löwis11437992002-04-12 09:54:03 +000020677( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020678ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680rm -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 +000020681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682
20683
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020684fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020685
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020688if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20689then
20690 if test $ipv6 = yes
20691 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020692 echo 'Fatal: You must get working getaddrinfo() function.'
20693 echo ' or you can specify "--disable-ipv6"'.
20694 exit 1
20695 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020696else
Martin v. Löwis11437992002-04-12 09:54:03 +000020697
20698cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020699#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020700_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020701
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020702fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020703
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020704for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020705do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20707{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020710 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020711else
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020713/* confdefs.h. */
20714_ACEOF
20715cat confdefs.h >>conftest.$ac_ext
20716cat >>conftest.$ac_ext <<_ACEOF
20717/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020718/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20720#define $ac_func innocuous_$ac_func
20721
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020722/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020723 which can conflict with char $ac_func (); below.
20724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020725 <limits.h> exists even on freestanding compilers. */
20726
20727#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020728# include <limits.h>
20729#else
20730# include <assert.h>
20731#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020732
20733#undef $ac_func
20734
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735/* Override any GCC internal prototype to avoid an error.
20736 Use char because int might match the return type of a GCC
20737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020738#ifdef __cplusplus
20739extern "C"
20740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020741char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020742/* The GNU C library defines this for functions which it implements
20743 to always fail with ENOSYS. Some functions are actually named
20744 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020747#endif
20748
Skip Montanaro6dead952003-09-25 14:50:04 +000020749int
20750main ()
20751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020752return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ;
20754 return 0;
20755}
20756_ACEOF
20757rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758if { (ac_try="$ac_link"
20759case "(($ac_try" in
20760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20761 *) ac_try_echo=$ac_try;;
20762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020764 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020766 grep -v '^ *+' conftest.er1 >conftest.err
20767 rm -f conftest.er1
20768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 (exit $ac_status); } && {
20771 test -z "$ac_c_werror_flag" ||
20772 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020773 } && test -s conftest$ac_exeext &&
20774 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020778sed 's/^/| /' conftest.$ac_ext >&5
20779
Martin v. Löwiseba40652007-08-30 20:10:57 +000020780 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782
20783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020784 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020786ac_res=`eval echo '${'$as_ac_var'}'`
20787 { echo "$as_me:$LINENO: result: $ac_res" >&5
20788echo "${ECHO_T}$ac_res" >&6; }
20789if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020790 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020791#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020792_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020793
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020794fi
20795done
20796
Michael W. Hudson54241132001-12-07 15:38:26 +000020797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020798# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020799{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20800echo $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 +000020801if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020803else
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020805/* confdefs.h. */
20806_ACEOF
20807cat confdefs.h >>conftest.$ac_ext
20808cat >>conftest.$ac_ext <<_ACEOF
20809/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810#include <sys/types.h>
20811#include <sys/time.h>
20812#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020813
Martin v. Löwis11437992002-04-12 09:54:03 +000020814int
20815main ()
20816{
20817if ((struct tm *) 0)
20818return 0;
20819 ;
20820 return 0;
20821}
20822_ACEOF
20823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020824if { (ac_try="$ac_compile"
20825case "(($ac_try" in
20826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20827 *) ac_try_echo=$ac_try;;
20828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020832 grep -v '^ *+' conftest.er1 >conftest.err
20833 rm -f conftest.er1
20834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020836 (exit $ac_status); } && {
20837 test -z "$ac_c_werror_flag" ||
20838 test ! -s conftest.err
20839 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020840 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020843sed 's/^/| /' conftest.$ac_ext >&5
20844
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020847
20848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020850{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20851echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020852if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020853
20854cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020855#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020856_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020857
20858fi
20859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020860{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20861echo $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 +000020862if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020863 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020864else
Martin v. Löwis11437992002-04-12 09:54:03 +000020865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020866/* confdefs.h. */
20867_ACEOF
20868cat confdefs.h >>conftest.$ac_ext
20869cat >>conftest.$ac_ext <<_ACEOF
20870/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020871#include <sys/types.h>
20872#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020873
Martin v. Löwis11437992002-04-12 09:54:03 +000020874int
20875main ()
20876{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877struct tm tm;
20878 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020879 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 ;
20881 return 0;
20882}
20883_ACEOF
20884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885if { (ac_try="$ac_compile"
20886case "(($ac_try" in
20887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20888 *) ac_try_echo=$ac_try;;
20889esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020893 grep -v '^ *+' conftest.er1 >conftest.err
20894 rm -f conftest.er1
20895 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897 (exit $ac_status); } && {
20898 test -z "$ac_c_werror_flag" ||
20899 test ! -s conftest.err
20900 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020901 ac_cv_struct_tm=time.h
20902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020904sed 's/^/| /' conftest.$ac_ext >&5
20905
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020908
20909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020910fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020911{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20912echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020913if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020914
20915cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020916#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020917_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020918
20919fi
20920
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020921{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20922echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020923if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925else
Martin v. Löwis11437992002-04-12 09:54:03 +000020926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020927/* confdefs.h. */
20928_ACEOF
20929cat confdefs.h >>conftest.$ac_ext
20930cat >>conftest.$ac_ext <<_ACEOF
20931/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020932#include <sys/types.h>
20933#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020934
20935
Martin v. Löwis11437992002-04-12 09:54:03 +000020936int
20937main ()
20938{
20939static struct tm ac_aggr;
20940if (ac_aggr.tm_zone)
20941return 0;
20942 ;
20943 return 0;
20944}
20945_ACEOF
20946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020947if { (ac_try="$ac_compile"
20948case "(($ac_try" in
20949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20950 *) ac_try_echo=$ac_try;;
20951esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020955 grep -v '^ *+' conftest.er1 >conftest.err
20956 rm -f conftest.er1
20957 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020959 (exit $ac_status); } && {
20960 test -z "$ac_c_werror_flag" ||
20961 test ! -s conftest.err
20962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020963 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020964else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020966sed 's/^/| /' conftest.$ac_ext >&5
20967
Martin v. Löwiseba40652007-08-30 20:10:57 +000020968 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020969/* confdefs.h. */
20970_ACEOF
20971cat confdefs.h >>conftest.$ac_ext
20972cat >>conftest.$ac_ext <<_ACEOF
20973/* end confdefs.h. */
20974#include <sys/types.h>
20975#include <$ac_cv_struct_tm>
20976
20977
20978int
20979main ()
20980{
20981static struct tm ac_aggr;
20982if (sizeof ac_aggr.tm_zone)
20983return 0;
20984 ;
20985 return 0;
20986}
20987_ACEOF
20988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020989if { (ac_try="$ac_compile"
20990case "(($ac_try" in
20991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20992 *) ac_try_echo=$ac_try;;
20993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020995 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020997 grep -v '^ *+' conftest.er1 >conftest.err
20998 rm -f conftest.er1
20999 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021001 (exit $ac_status); } && {
21002 test -z "$ac_c_werror_flag" ||
21003 test ! -s conftest.err
21004 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021005 ac_cv_member_struct_tm_tm_zone=yes
21006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021008sed 's/^/| /' conftest.$ac_ext >&5
21009
Martin v. Löwiseba40652007-08-30 20:10:57 +000021010 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012
21013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015
21016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021017fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021018{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21019echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21020if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021021
21022cat >>confdefs.h <<_ACEOF
21023#define HAVE_STRUCT_TM_TM_ZONE 1
21024_ACEOF
21025
21026
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021027fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021028
Martin v. Löwis11437992002-04-12 09:54:03 +000021029if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21030
21031cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021032#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021033_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021034
21035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021036 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21037echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021038if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021040else
21041 cat >conftest.$ac_ext <<_ACEOF
21042/* confdefs.h. */
21043_ACEOF
21044cat confdefs.h >>conftest.$ac_ext
21045cat >>conftest.$ac_ext <<_ACEOF
21046/* end confdefs.h. */
21047#include <time.h>
21048
21049int
21050main ()
21051{
21052#ifndef tzname
21053 (void) tzname;
21054#endif
21055
21056 ;
21057 return 0;
21058}
21059_ACEOF
21060rm -f conftest.$ac_objext
21061if { (ac_try="$ac_compile"
21062case "(($ac_try" in
21063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21064 *) ac_try_echo=$ac_try;;
21065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067 (eval "$ac_compile") 2>conftest.er1
21068 ac_status=$?
21069 grep -v '^ *+' conftest.er1 >conftest.err
21070 rm -f conftest.er1
21071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073 (exit $ac_status); } && {
21074 test -z "$ac_c_werror_flag" ||
21075 test ! -s conftest.err
21076 } && test -s conftest.$ac_objext; then
21077 ac_cv_have_decl_tzname=yes
21078else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021079 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021080sed 's/^/| /' conftest.$ac_ext >&5
21081
21082 ac_cv_have_decl_tzname=no
21083fi
21084
21085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21086fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021087{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21088echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21089if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021090
21091cat >>confdefs.h <<_ACEOF
21092#define HAVE_DECL_TZNAME 1
21093_ACEOF
21094
21095
21096else
21097 cat >>confdefs.h <<_ACEOF
21098#define HAVE_DECL_TZNAME 0
21099_ACEOF
21100
21101
21102fi
21103
21104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021105 { echo "$as_me:$LINENO: checking for tzname" >&5
21106echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021107if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021108 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021109else
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021116#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021117#if !HAVE_DECL_TZNAME
21118extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021120
Martin v. Löwis11437992002-04-12 09:54:03 +000021121int
21122main ()
21123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021125 ;
21126 return 0;
21127}
21128_ACEOF
21129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130if { (ac_try="$ac_link"
21131case "(($ac_try" in
21132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21133 *) ac_try_echo=$ac_try;;
21134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021138 grep -v '^ *+' conftest.er1 >conftest.err
21139 rm -f conftest.er1
21140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142 (exit $ac_status); } && {
21143 test -z "$ac_c_werror_flag" ||
21144 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021145 } && test -s conftest$ac_exeext &&
21146 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021147 ac_cv_var_tzname=yes
21148else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021150sed 's/^/| /' conftest.$ac_ext >&5
21151
Martin v. Löwiseba40652007-08-30 20:10:57 +000021152 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021154
21155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021156 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021157fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021158{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21159echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021160 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021161
21162cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021163#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021164_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021165
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021166 fi
21167fi
21168
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021169{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21170echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021171if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021172 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021173else
21174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021175/* confdefs.h. */
21176_ACEOF
21177cat confdefs.h >>conftest.$ac_ext
21178cat >>conftest.$ac_ext <<_ACEOF
21179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021180$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021181int
21182main ()
21183{
21184static struct stat ac_aggr;
21185if (ac_aggr.st_rdev)
21186return 0;
21187 ;
21188 return 0;
21189}
21190_ACEOF
21191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192if { (ac_try="$ac_compile"
21193case "(($ac_try" in
21194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21195 *) ac_try_echo=$ac_try;;
21196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021200 grep -v '^ *+' conftest.er1 >conftest.err
21201 rm -f conftest.er1
21202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204 (exit $ac_status); } && {
21205 test -z "$ac_c_werror_flag" ||
21206 test ! -s conftest.err
21207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021208 ac_cv_member_struct_stat_st_rdev=yes
21209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021211sed 's/^/| /' conftest.$ac_ext >&5
21212
Martin v. Löwiseba40652007-08-30 20:10:57 +000021213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021214/* confdefs.h. */
21215_ACEOF
21216cat confdefs.h >>conftest.$ac_ext
21217cat >>conftest.$ac_ext <<_ACEOF
21218/* end confdefs.h. */
21219$ac_includes_default
21220int
21221main ()
21222{
21223static struct stat ac_aggr;
21224if (sizeof ac_aggr.st_rdev)
21225return 0;
21226 ;
21227 return 0;
21228}
21229_ACEOF
21230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021231if { (ac_try="$ac_compile"
21232case "(($ac_try" in
21233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21234 *) ac_try_echo=$ac_try;;
21235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021237 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021239 grep -v '^ *+' conftest.er1 >conftest.err
21240 rm -f conftest.er1
21241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243 (exit $ac_status); } && {
21244 test -z "$ac_c_werror_flag" ||
21245 test ! -s conftest.err
21246 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021247 ac_cv_member_struct_stat_st_rdev=yes
21248else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021250sed 's/^/| /' conftest.$ac_ext >&5
21251
Martin v. Löwiseba40652007-08-30 20:10:57 +000021252 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021254
21255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021257
21258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021259fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021260{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21261echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21262if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021263
21264cat >>confdefs.h <<_ACEOF
21265#define HAVE_STRUCT_STAT_ST_RDEV 1
21266_ACEOF
21267
21268
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021269fi
21270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021271{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21272echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021273if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021275else
Martin v. Löwis11437992002-04-12 09:54:03 +000021276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021277/* confdefs.h. */
21278_ACEOF
21279cat confdefs.h >>conftest.$ac_ext
21280cat >>conftest.$ac_ext <<_ACEOF
21281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021282$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021283int
21284main ()
21285{
21286static struct stat ac_aggr;
21287if (ac_aggr.st_blksize)
21288return 0;
21289 ;
21290 return 0;
21291}
21292_ACEOF
21293rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021294if { (ac_try="$ac_compile"
21295case "(($ac_try" in
21296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21297 *) ac_try_echo=$ac_try;;
21298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021302 grep -v '^ *+' conftest.er1 >conftest.err
21303 rm -f conftest.er1
21304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 (exit $ac_status); } && {
21307 test -z "$ac_c_werror_flag" ||
21308 test ! -s conftest.err
21309 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021310 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021313sed 's/^/| /' conftest.$ac_ext >&5
21314
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021316/* confdefs.h. */
21317_ACEOF
21318cat confdefs.h >>conftest.$ac_ext
21319cat >>conftest.$ac_ext <<_ACEOF
21320/* end confdefs.h. */
21321$ac_includes_default
21322int
21323main ()
21324{
21325static struct stat ac_aggr;
21326if (sizeof ac_aggr.st_blksize)
21327return 0;
21328 ;
21329 return 0;
21330}
21331_ACEOF
21332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333if { (ac_try="$ac_compile"
21334case "(($ac_try" in
21335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21336 *) ac_try_echo=$ac_try;;
21337esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021341 grep -v '^ *+' conftest.er1 >conftest.err
21342 rm -f conftest.er1
21343 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345 (exit $ac_status); } && {
21346 test -z "$ac_c_werror_flag" ||
21347 test ! -s conftest.err
21348 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021349 ac_cv_member_struct_stat_st_blksize=yes
21350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021352sed 's/^/| /' conftest.$ac_ext >&5
21353
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021356
21357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021359
21360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021361fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021362{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21363echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21364if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021365
Martin v. Löwis11437992002-04-12 09:54:03 +000021366cat >>confdefs.h <<_ACEOF
21367#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21368_ACEOF
21369
21370
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021371fi
21372
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021373{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21374echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021375if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021376 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021377else
21378 cat >conftest.$ac_ext <<_ACEOF
21379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
21384$ac_includes_default
21385int
21386main ()
21387{
21388static struct stat ac_aggr;
21389if (ac_aggr.st_flags)
21390return 0;
21391 ;
21392 return 0;
21393}
21394_ACEOF
21395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021396if { (ac_try="$ac_compile"
21397case "(($ac_try" in
21398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21399 *) ac_try_echo=$ac_try;;
21400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021403 ac_status=$?
21404 grep -v '^ *+' conftest.er1 >conftest.err
21405 rm -f conftest.er1
21406 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021408 (exit $ac_status); } && {
21409 test -z "$ac_c_werror_flag" ||
21410 test ! -s conftest.err
21411 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021412 ac_cv_member_struct_stat_st_flags=yes
21413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021415sed 's/^/| /' conftest.$ac_ext >&5
21416
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021418/* confdefs.h. */
21419_ACEOF
21420cat confdefs.h >>conftest.$ac_ext
21421cat >>conftest.$ac_ext <<_ACEOF
21422/* end confdefs.h. */
21423$ac_includes_default
21424int
21425main ()
21426{
21427static struct stat ac_aggr;
21428if (sizeof ac_aggr.st_flags)
21429return 0;
21430 ;
21431 return 0;
21432}
21433_ACEOF
21434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021435if { (ac_try="$ac_compile"
21436case "(($ac_try" in
21437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21438 *) ac_try_echo=$ac_try;;
21439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021442 ac_status=$?
21443 grep -v '^ *+' conftest.er1 >conftest.err
21444 rm -f conftest.er1
21445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447 (exit $ac_status); } && {
21448 test -z "$ac_c_werror_flag" ||
21449 test ! -s conftest.err
21450 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021451 ac_cv_member_struct_stat_st_flags=yes
21452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021453 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021454sed 's/^/| /' conftest.$ac_ext >&5
21455
Martin v. Löwiseba40652007-08-30 20:10:57 +000021456 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021458
21459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461
21462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021463fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021464{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21465echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21466if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021467
21468cat >>confdefs.h <<_ACEOF
21469#define HAVE_STRUCT_STAT_ST_FLAGS 1
21470_ACEOF
21471
21472
21473fi
21474
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021475{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21476echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021477if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021478 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021479else
21480 cat >conftest.$ac_ext <<_ACEOF
21481/* confdefs.h. */
21482_ACEOF
21483cat confdefs.h >>conftest.$ac_ext
21484cat >>conftest.$ac_ext <<_ACEOF
21485/* end confdefs.h. */
21486$ac_includes_default
21487int
21488main ()
21489{
21490static struct stat ac_aggr;
21491if (ac_aggr.st_gen)
21492return 0;
21493 ;
21494 return 0;
21495}
21496_ACEOF
21497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021498if { (ac_try="$ac_compile"
21499case "(($ac_try" in
21500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21501 *) ac_try_echo=$ac_try;;
21502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021505 ac_status=$?
21506 grep -v '^ *+' conftest.er1 >conftest.err
21507 rm -f conftest.er1
21508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 (exit $ac_status); } && {
21511 test -z "$ac_c_werror_flag" ||
21512 test ! -s conftest.err
21513 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021514 ac_cv_member_struct_stat_st_gen=yes
21515else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021517sed 's/^/| /' conftest.$ac_ext >&5
21518
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021520/* confdefs.h. */
21521_ACEOF
21522cat confdefs.h >>conftest.$ac_ext
21523cat >>conftest.$ac_ext <<_ACEOF
21524/* end confdefs.h. */
21525$ac_includes_default
21526int
21527main ()
21528{
21529static struct stat ac_aggr;
21530if (sizeof ac_aggr.st_gen)
21531return 0;
21532 ;
21533 return 0;
21534}
21535_ACEOF
21536rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021537if { (ac_try="$ac_compile"
21538case "(($ac_try" in
21539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21540 *) ac_try_echo=$ac_try;;
21541esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021544 ac_status=$?
21545 grep -v '^ *+' conftest.er1 >conftest.err
21546 rm -f conftest.er1
21547 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549 (exit $ac_status); } && {
21550 test -z "$ac_c_werror_flag" ||
21551 test ! -s conftest.err
21552 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021553 ac_cv_member_struct_stat_st_gen=yes
21554else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021555 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021556sed 's/^/| /' conftest.$ac_ext >&5
21557
Martin v. Löwiseba40652007-08-30 20:10:57 +000021558 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021559fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560
21561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021563
21564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021565fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021566{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21567echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21568if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021569
21570cat >>confdefs.h <<_ACEOF
21571#define HAVE_STRUCT_STAT_ST_GEN 1
21572_ACEOF
21573
21574
21575fi
21576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021577{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21578echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021579if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021581else
21582 cat >conftest.$ac_ext <<_ACEOF
21583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
21588$ac_includes_default
21589int
21590main ()
21591{
21592static struct stat ac_aggr;
21593if (ac_aggr.st_birthtime)
21594return 0;
21595 ;
21596 return 0;
21597}
21598_ACEOF
21599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600if { (ac_try="$ac_compile"
21601case "(($ac_try" in
21602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21603 *) ac_try_echo=$ac_try;;
21604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021607 ac_status=$?
21608 grep -v '^ *+' conftest.er1 >conftest.err
21609 rm -f conftest.er1
21610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 (exit $ac_status); } && {
21613 test -z "$ac_c_werror_flag" ||
21614 test ! -s conftest.err
21615 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021616 ac_cv_member_struct_stat_st_birthtime=yes
21617else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021618 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021619sed 's/^/| /' conftest.$ac_ext >&5
21620
Martin v. Löwiseba40652007-08-30 20:10:57 +000021621 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021622/* confdefs.h. */
21623_ACEOF
21624cat confdefs.h >>conftest.$ac_ext
21625cat >>conftest.$ac_ext <<_ACEOF
21626/* end confdefs.h. */
21627$ac_includes_default
21628int
21629main ()
21630{
21631static struct stat ac_aggr;
21632if (sizeof ac_aggr.st_birthtime)
21633return 0;
21634 ;
21635 return 0;
21636}
21637_ACEOF
21638rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021639if { (ac_try="$ac_compile"
21640case "(($ac_try" in
21641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21642 *) ac_try_echo=$ac_try;;
21643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021646 ac_status=$?
21647 grep -v '^ *+' conftest.er1 >conftest.err
21648 rm -f conftest.er1
21649 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021651 (exit $ac_status); } && {
21652 test -z "$ac_c_werror_flag" ||
21653 test ! -s conftest.err
21654 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021655 ac_cv_member_struct_stat_st_birthtime=yes
21656else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021657 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021658sed 's/^/| /' conftest.$ac_ext >&5
21659
Martin v. Löwiseba40652007-08-30 20:10:57 +000021660 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021662
21663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021665
21666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021667fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021668{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21669echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21670if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021671
21672cat >>confdefs.h <<_ACEOF
21673#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21674_ACEOF
21675
21676
21677fi
21678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021679{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21680echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021681if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021683else
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021685/* confdefs.h. */
21686_ACEOF
21687cat confdefs.h >>conftest.$ac_ext
21688cat >>conftest.$ac_ext <<_ACEOF
21689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021691int
21692main ()
21693{
21694static struct stat ac_aggr;
21695if (ac_aggr.st_blocks)
21696return 0;
21697 ;
21698 return 0;
21699}
21700_ACEOF
21701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021702if { (ac_try="$ac_compile"
21703case "(($ac_try" in
21704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705 *) ac_try_echo=$ac_try;;
21706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021710 grep -v '^ *+' conftest.er1 >conftest.err
21711 rm -f conftest.er1
21712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021714 (exit $ac_status); } && {
21715 test -z "$ac_c_werror_flag" ||
21716 test ! -s conftest.err
21717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021718 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021721sed 's/^/| /' conftest.$ac_ext >&5
21722
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021724/* confdefs.h. */
21725_ACEOF
21726cat confdefs.h >>conftest.$ac_ext
21727cat >>conftest.$ac_ext <<_ACEOF
21728/* end confdefs.h. */
21729$ac_includes_default
21730int
21731main ()
21732{
21733static struct stat ac_aggr;
21734if (sizeof ac_aggr.st_blocks)
21735return 0;
21736 ;
21737 return 0;
21738}
21739_ACEOF
21740rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021741if { (ac_try="$ac_compile"
21742case "(($ac_try" in
21743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21744 *) ac_try_echo=$ac_try;;
21745esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021747 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021748 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021749 grep -v '^ *+' conftest.er1 >conftest.err
21750 rm -f conftest.er1
21751 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021753 (exit $ac_status); } && {
21754 test -z "$ac_c_werror_flag" ||
21755 test ! -s conftest.err
21756 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021757 ac_cv_member_struct_stat_st_blocks=yes
21758else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021760sed 's/^/| /' conftest.$ac_ext >&5
21761
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021764
21765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021767
21768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021769fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021770{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21771echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21772if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021773
Martin v. Löwis11437992002-04-12 09:54:03 +000021774cat >>confdefs.h <<_ACEOF
21775#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21776_ACEOF
21777
21778
21779cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021780#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021781_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021782
21783else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021784 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021785 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021786 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21787 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021788esac
21789
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021790fi
21791
Michael W. Hudson54241132001-12-07 15:38:26 +000021792
Martin v. Löwis11437992002-04-12 09:54:03 +000021793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021794{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21795echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021796if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021798else
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021800/* confdefs.h. */
21801_ACEOF
21802cat confdefs.h >>conftest.$ac_ext
21803cat >>conftest.$ac_ext <<_ACEOF
21804/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021805#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021806int
21807main ()
21808{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021809return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021810 ;
21811 return 0;
21812}
21813_ACEOF
21814rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021815if { (ac_try="$ac_compile"
21816case "(($ac_try" in
21817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21818 *) ac_try_echo=$ac_try;;
21819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021823 grep -v '^ *+' conftest.er1 >conftest.err
21824 rm -f conftest.er1
21825 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021827 (exit $ac_status); } && {
21828 test -z "$ac_c_werror_flag" ||
21829 test ! -s conftest.err
21830 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021831 ac_cv_header_time_altzone=yes
21832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021834sed 's/^/| /' conftest.$ac_ext >&5
21835
Martin v. Löwiseba40652007-08-30 20:10:57 +000021836 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021837fi
21838
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21840fi
21841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021842{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21843echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021844if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021845
21846cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021847#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021848_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021849
21850fi
21851
Guido van Rossumda88dad1995-01-26 00:46:29 +000021852was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021853{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21854echo $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 +000021855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021856/* confdefs.h. */
21857_ACEOF
21858cat confdefs.h >>conftest.$ac_ext
21859cat >>conftest.$ac_ext <<_ACEOF
21860/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021861
21862#include <sys/types.h>
21863#include <sys/select.h>
21864#include <sys/time.h>
21865
Martin v. Löwis11437992002-04-12 09:54:03 +000021866int
21867main ()
21868{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021869;
Martin v. Löwis11437992002-04-12 09:54:03 +000021870 ;
21871 return 0;
21872}
21873_ACEOF
21874rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021875if { (ac_try="$ac_compile"
21876case "(($ac_try" in
21877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21878 *) ac_try_echo=$ac_try;;
21879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021883 grep -v '^ *+' conftest.er1 >conftest.err
21884 rm -f conftest.er1
21885 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021887 (exit $ac_status); } && {
21888 test -z "$ac_c_werror_flag" ||
21889 test ! -s conftest.err
21890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021891
21892
21893cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021894#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021895_ACEOF
21896
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021897 was_it_defined=yes
21898
Guido van Rossumf78abae1997-01-21 22:02:36 +000021899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021901sed 's/^/| /' conftest.$ac_ext >&5
21902
Brett Cannon19fab762007-06-02 03:02:29 +000021903
Martin v. Löwiseba40652007-08-30 20:10:57 +000021904fi
21905
21906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021907{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21908echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021910{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21911echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021912if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021914else
Martin v. Löwis11437992002-04-12 09:54:03 +000021915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021916/* confdefs.h. */
21917_ACEOF
21918cat confdefs.h >>conftest.$ac_ext
21919cat >>conftest.$ac_ext <<_ACEOF
21920/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021921
21922# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021923int
21924main ()
21925{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021926struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021927 ;
21928 return 0;
21929}
21930_ACEOF
21931rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021932if { (ac_try="$ac_compile"
21933case "(($ac_try" in
21934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21935 *) ac_try_echo=$ac_try;;
21936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021940 grep -v '^ *+' conftest.er1 >conftest.err
21941 rm -f conftest.er1
21942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021944 (exit $ac_status); } && {
21945 test -z "$ac_c_werror_flag" ||
21946 test ! -s conftest.err
21947 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021948 ac_cv_struct_addrinfo=yes
21949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021951sed 's/^/| /' conftest.$ac_ext >&5
21952
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021954fi
21955
Martin v. Löwiseba40652007-08-30 20:10:57 +000021956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21957fi
21958
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021959{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21960echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021961if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021962
21963cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021964#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021965_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021966
21967fi
21968
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021969{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21970echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021971if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021973else
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021975/* confdefs.h. */
21976_ACEOF
21977cat confdefs.h >>conftest.$ac_ext
21978cat >>conftest.$ac_ext <<_ACEOF
21979/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021980
21981# include <sys/types.h>
21982# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021983int
21984main ()
21985{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021986struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021987 ;
21988 return 0;
21989}
21990_ACEOF
21991rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992if { (ac_try="$ac_compile"
21993case "(($ac_try" in
21994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21995 *) ac_try_echo=$ac_try;;
21996esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022000 grep -v '^ *+' conftest.er1 >conftest.err
22001 rm -f conftest.er1
22002 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022004 (exit $ac_status); } && {
22005 test -z "$ac_c_werror_flag" ||
22006 test ! -s conftest.err
22007 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022008 ac_cv_struct_sockaddr_storage=yes
22009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022011sed 's/^/| /' conftest.$ac_ext >&5
22012
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022014fi
22015
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22017fi
22018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022019{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22020echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022021if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022022
22023cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022024#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022025_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022026
22027fi
22028
Guido van Rossum627b2d71993-12-24 10:39:16 +000022029# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022030
Michael W. Hudson54241132001-12-07 15:38:26 +000022031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022032{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22033echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022034if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022036else
Martin v. Löwis11437992002-04-12 09:54:03 +000022037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022043$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022044int
22045main ()
22046{
22047static int test_array [1 - 2 * !(((char) -1) < 0)];
22048test_array [0] = 0
22049
22050 ;
22051 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022052}
Martin v. Löwis11437992002-04-12 09:54:03 +000022053_ACEOF
22054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022055if { (ac_try="$ac_compile"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022061 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022063 grep -v '^ *+' conftest.er1 >conftest.err
22064 rm -f conftest.er1
22065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022067 (exit $ac_status); } && {
22068 test -z "$ac_c_werror_flag" ||
22069 test ! -s conftest.err
22070 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022071 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022073 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022074sed 's/^/| /' conftest.$ac_ext >&5
22075
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022077fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022078
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022080fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022081{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22082echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022083if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022084 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022085#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022086_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022087
22088fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022090{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22091echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022092if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022093 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022094else
22095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022096/* confdefs.h. */
22097_ACEOF
22098cat confdefs.h >>conftest.$ac_ext
22099cat >>conftest.$ac_ext <<_ACEOF
22100/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022101
Martin v. Löwis11437992002-04-12 09:54:03 +000022102int
22103main ()
22104{
22105/* FIXME: Include the comments suggested by Paul. */
22106#ifndef __cplusplus
22107 /* Ultrix mips cc rejects this. */
22108 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022109 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022110 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022111 char const *const *pcpcc;
22112 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022113 /* NEC SVR4.0.2 mips cc rejects this. */
22114 struct point {int x, y;};
22115 static struct point const zero = {0,0};
22116 /* AIX XL C 1.02.0.0 rejects this.
22117 It does not let you subtract one const X* pointer from another in
22118 an arm of an if-expression whose if-part is not a constant
22119 expression */
22120 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022121 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022122 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123 ++pcpcc;
22124 ppc = (char**) pcpcc;
22125 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022126 { /* SCO 3.2v4 cc rejects this. */
22127 char *t;
22128 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022129
Martin v. Löwis11437992002-04-12 09:54:03 +000022130 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 }
22133 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22134 int x[] = {25, 17};
22135 const int *foo = &x[0];
22136 ++foo;
22137 }
22138 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22139 typedef const int *iptr;
22140 iptr p = 0;
22141 ++p;
22142 }
22143 { /* AIX XL C 1.02.0.0 rejects this saying
22144 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22145 struct s { int j; const int *ap[3]; };
22146 struct s *b; b->j = 5;
22147 }
22148 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22149 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022150 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022153#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022154
Martin v. Löwis11437992002-04-12 09:54:03 +000022155 ;
22156 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022157}
Martin v. Löwis11437992002-04-12 09:54:03 +000022158_ACEOF
22159rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022160if { (ac_try="$ac_compile"
22161case "(($ac_try" in
22162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22163 *) ac_try_echo=$ac_try;;
22164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022168 grep -v '^ *+' conftest.er1 >conftest.err
22169 rm -f conftest.er1
22170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172 (exit $ac_status); } && {
22173 test -z "$ac_c_werror_flag" ||
22174 test ! -s conftest.err
22175 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022176 ac_cv_c_const=yes
22177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022179sed 's/^/| /' conftest.$ac_ext >&5
22180
Martin v. Löwiseba40652007-08-30 20:10:57 +000022181 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183
22184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022185fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022186{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22187echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022188if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022189
22190cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022191#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022192_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022193
22194fi
22195
Michael W. Hudson54241132001-12-07 15:38:26 +000022196
Guido van Rossumda88dad1995-01-26 00:46:29 +000022197works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022198{ echo "$as_me:$LINENO: checking for working volatile" >&5
22199echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022200cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022201/* confdefs.h. */
22202_ACEOF
22203cat confdefs.h >>conftest.$ac_ext
22204cat >>conftest.$ac_ext <<_ACEOF
22205/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022206
Martin v. Löwis11437992002-04-12 09:54:03 +000022207int
22208main ()
22209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022210volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 ;
22212 return 0;
22213}
22214_ACEOF
22215rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216if { (ac_try="$ac_compile"
22217case "(($ac_try" in
22218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22219 *) ac_try_echo=$ac_try;;
22220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022224 grep -v '^ *+' conftest.er1 >conftest.err
22225 rm -f conftest.er1
22226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022228 (exit $ac_status); } && {
22229 test -z "$ac_c_werror_flag" ||
22230 test ! -s conftest.err
22231 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022232 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022235sed 's/^/| /' conftest.$ac_ext >&5
22236
Martin v. Löwis11437992002-04-12 09:54:03 +000022237
22238cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022240_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022241
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022242
Guido van Rossum627b2d71993-12-24 10:39:16 +000022243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244
22245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022246{ echo "$as_me:$LINENO: result: $works" >&5
22247echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022248
Guido van Rossumda88dad1995-01-26 00:46:29 +000022249works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022250{ echo "$as_me:$LINENO: checking for working signed char" >&5
22251echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022253/* confdefs.h. */
22254_ACEOF
22255cat confdefs.h >>conftest.$ac_ext
22256cat >>conftest.$ac_ext <<_ACEOF
22257/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022258
Martin v. Löwis11437992002-04-12 09:54:03 +000022259int
22260main ()
22261{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022262signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022263 ;
22264 return 0;
22265}
22266_ACEOF
22267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022268if { (ac_try="$ac_compile"
22269case "(($ac_try" in
22270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22271 *) ac_try_echo=$ac_try;;
22272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022276 grep -v '^ *+' conftest.er1 >conftest.err
22277 rm -f conftest.er1
22278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280 (exit $ac_status); } && {
22281 test -z "$ac_c_werror_flag" ||
22282 test ! -s conftest.err
22283 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022284 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022287sed 's/^/| /' conftest.$ac_ext >&5
22288
Martin v. Löwis11437992002-04-12 09:54:03 +000022289
22290cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022291#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022292_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022293
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022294
Guido van Rossum7f43da71994-08-01 12:15:30 +000022295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022296
22297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022298{ echo "$as_me:$LINENO: result: $works" >&5
22299echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022300
Guido van Rossumda88dad1995-01-26 00:46:29 +000022301have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022302{ echo "$as_me:$LINENO: checking for prototypes" >&5
22303echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022305/* confdefs.h. */
22306_ACEOF
22307cat confdefs.h >>conftest.$ac_ext
22308cat >>conftest.$ac_ext <<_ACEOF
22309/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022310int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022311int
22312main ()
22313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022314return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022315 ;
22316 return 0;
22317}
22318_ACEOF
22319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022320if { (ac_try="$ac_compile"
22321case "(($ac_try" in
22322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22323 *) ac_try_echo=$ac_try;;
22324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022328 grep -v '^ *+' conftest.er1 >conftest.err
22329 rm -f conftest.er1
22330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022332 (exit $ac_status); } && {
22333 test -z "$ac_c_werror_flag" ||
22334 test ! -s conftest.err
22335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022336
22337
22338cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022339#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022340_ACEOF
22341
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022342 have_prototypes=yes
22343
Guido van Rossumf78abae1997-01-21 22:02:36 +000022344else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022346sed 's/^/| /' conftest.$ac_ext >&5
22347
Martin v. Löwiseba40652007-08-30 20:10:57 +000022348
Guido van Rossum7f43da71994-08-01 12:15:30 +000022349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022350
22351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022352{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22353echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022354
Guido van Rossumda88dad1995-01-26 00:46:29 +000022355works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022356{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22357echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022359/* confdefs.h. */
22360_ACEOF
22361cat confdefs.h >>conftest.$ac_ext
22362cat >>conftest.$ac_ext <<_ACEOF
22363/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022364
22365#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022366int foo(int x, ...) {
22367 va_list va;
22368 va_start(va, x);
22369 va_arg(va, int);
22370 va_arg(va, char *);
22371 va_arg(va, double);
22372 return 0;
22373}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022374
Martin v. Löwis11437992002-04-12 09:54:03 +000022375int
22376main ()
22377{
Guido van Rossum90eea071996-08-30 20:58:57 +000022378return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 ;
22380 return 0;
22381}
22382_ACEOF
22383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384if { (ac_try="$ac_compile"
22385case "(($ac_try" in
22386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22387 *) ac_try_echo=$ac_try;;
22388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022392 grep -v '^ *+' conftest.er1 >conftest.err
22393 rm -f conftest.er1
22394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396 (exit $ac_status); } && {
22397 test -z "$ac_c_werror_flag" ||
22398 test ! -s conftest.err
22399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022400
22401
22402cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022403#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022404_ACEOF
22405
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022406 works=yes
22407
Guido van Rossumf78abae1997-01-21 22:02:36 +000022408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022410sed 's/^/| /' conftest.$ac_ext >&5
22411
Martin v. Löwiseba40652007-08-30 20:10:57 +000022412
Guido van Rossum627b2d71993-12-24 10:39:16 +000022413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414
22415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022416{ echo "$as_me:$LINENO: result: $works" >&5
22417echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022418
Martin v. Löwisd6320502004-08-12 13:45:08 +000022419# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022420{ echo "$as_me:$LINENO: checking for socketpair" >&5
22421echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022422cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022423/* confdefs.h. */
22424_ACEOF
22425cat confdefs.h >>conftest.$ac_ext
22426cat >>conftest.$ac_ext <<_ACEOF
22427/* end confdefs.h. */
22428
22429#include <sys/types.h>
22430#include <sys/socket.h>
22431
22432int
22433main ()
22434{
22435void *x=socketpair
22436 ;
22437 return 0;
22438}
22439_ACEOF
22440rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022441if { (ac_try="$ac_compile"
22442case "(($ac_try" in
22443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22444 *) ac_try_echo=$ac_try;;
22445esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022449 grep -v '^ *+' conftest.er1 >conftest.err
22450 rm -f conftest.er1
22451 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022453 (exit $ac_status); } && {
22454 test -z "$ac_c_werror_flag" ||
22455 test ! -s conftest.err
22456 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022457
22458cat >>confdefs.h <<\_ACEOF
22459#define HAVE_SOCKETPAIR 1
22460_ACEOF
22461
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022462 { echo "$as_me:$LINENO: result: yes" >&5
22463echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022464else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022465 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022466sed 's/^/| /' conftest.$ac_ext >&5
22467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022468 { echo "$as_me:$LINENO: result: no" >&5
22469echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022470
22471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022472
22473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022474
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022475# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022476{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22477echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022478cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022479/* confdefs.h. */
22480_ACEOF
22481cat confdefs.h >>conftest.$ac_ext
22482cat >>conftest.$ac_ext <<_ACEOF
22483/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022484#include <sys/types.h>
22485#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022486int
22487main ()
22488{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022489struct sockaddr x;
22490x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022491 ;
22492 return 0;
22493}
22494_ACEOF
22495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022496if { (ac_try="$ac_compile"
22497case "(($ac_try" in
22498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22499 *) ac_try_echo=$ac_try;;
22500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022504 grep -v '^ *+' conftest.er1 >conftest.err
22505 rm -f conftest.er1
22506 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508 (exit $ac_status); } && {
22509 test -z "$ac_c_werror_flag" ||
22510 test ! -s conftest.err
22511 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022512 { echo "$as_me:$LINENO: result: yes" >&5
22513echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022514
22515cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022516#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022517_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022518
22519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022521sed 's/^/| /' conftest.$ac_ext >&5
22522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022523 { echo "$as_me:$LINENO: result: no" >&5
22524echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022526
22527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022528
Guido van Rossumda88dad1995-01-26 00:46:29 +000022529va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022530{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22531echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022533/* confdefs.h. */
22534_ACEOF
22535cat confdefs.h >>conftest.$ac_ext
22536cat >>conftest.$ac_ext <<_ACEOF
22537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022538
22539#ifdef HAVE_STDARG_PROTOTYPES
22540#include <stdarg.h>
22541#else
22542#include <varargs.h>
22543#endif
22544
Martin v. Löwis11437992002-04-12 09:54:03 +000022545int
22546main ()
22547{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022548va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022549 ;
22550 return 0;
22551}
22552_ACEOF
22553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022554if { (ac_try="$ac_compile"
22555case "(($ac_try" in
22556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22557 *) ac_try_echo=$ac_try;;
22558esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022562 grep -v '^ *+' conftest.er1 >conftest.err
22563 rm -f conftest.er1
22564 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022566 (exit $ac_status); } && {
22567 test -z "$ac_c_werror_flag" ||
22568 test ! -s conftest.err
22569 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022570 :
22571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022573sed 's/^/| /' conftest.$ac_ext >&5
22574
Martin v. Löwis11437992002-04-12 09:54:03 +000022575
22576
22577cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022578#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022579_ACEOF
22580
Guido van Rossumda88dad1995-01-26 00:46:29 +000022581 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584
22585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022586{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22587echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022589# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022590
22591
22592
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022593{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22594echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022595if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022596 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022597else
Martin v. Löwis11437992002-04-12 09:54:03 +000022598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022599/* confdefs.h. */
22600_ACEOF
22601cat confdefs.h >>conftest.$ac_ext
22602cat >>conftest.$ac_ext <<_ACEOF
22603/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022604/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22605 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22606#define gethostbyname_r innocuous_gethostbyname_r
22607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022608/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022609 which can conflict with char gethostbyname_r (); below.
22610 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022611 <limits.h> exists even on freestanding compilers. */
22612
22613#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022614# include <limits.h>
22615#else
22616# include <assert.h>
22617#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022618
22619#undef gethostbyname_r
22620
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621/* Override any GCC internal prototype to avoid an error.
22622 Use char because int might match the return type of a GCC
22623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022624#ifdef __cplusplus
22625extern "C"
22626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022627char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022628/* The GNU C library defines this for functions which it implements
22629 to always fail with ENOSYS. Some functions are actually named
22630 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022631#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022632choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022633#endif
22634
Skip Montanaro6dead952003-09-25 14:50:04 +000022635int
22636main ()
22637{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022638return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022639 ;
22640 return 0;
22641}
22642_ACEOF
22643rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022644if { (ac_try="$ac_link"
22645case "(($ac_try" in
22646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22647 *) ac_try_echo=$ac_try;;
22648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022652 grep -v '^ *+' conftest.er1 >conftest.err
22653 rm -f conftest.er1
22654 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022656 (exit $ac_status); } && {
22657 test -z "$ac_c_werror_flag" ||
22658 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022659 } && test -s conftest$ac_exeext &&
22660 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022664sed 's/^/| /' conftest.$ac_ext >&5
22665
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668
22669rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022670 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022671fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022672{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22673echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22674if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022675
Martin v. Löwis11437992002-04-12 09:54:03 +000022676 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022677#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022678_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022680 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22681echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022682 OLD_CFLAGS=$CFLAGS
22683 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022685/* confdefs.h. */
22686_ACEOF
22687cat confdefs.h >>conftest.$ac_ext
22688cat >>conftest.$ac_ext <<_ACEOF
22689/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022690
22691# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022692
Martin v. Löwis11437992002-04-12 09:54:03 +000022693int
22694main ()
22695{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022696
22697 char *name;
22698 struct hostent *he, *res;
22699 char buffer[2048];
22700 int buflen = 2048;
22701 int h_errnop;
22702
22703 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022704
22705 ;
22706 return 0;
22707}
22708_ACEOF
22709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022710if { (ac_try="$ac_compile"
22711case "(($ac_try" in
22712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22713 *) ac_try_echo=$ac_try;;
22714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022718 grep -v '^ *+' conftest.er1 >conftest.err
22719 rm -f conftest.er1
22720 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022722 (exit $ac_status); } && {
22723 test -z "$ac_c_werror_flag" ||
22724 test ! -s conftest.err
22725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022726
22727 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022728#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022729_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022730
Martin v. Löwis11437992002-04-12 09:54:03 +000022731
22732cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022733#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022734_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022736 { echo "$as_me:$LINENO: result: yes" >&5
22737echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022738
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022741sed 's/^/| /' conftest.$ac_ext >&5
22742
Martin v. Löwis11437992002-04-12 09:54:03 +000022743
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022744 { echo "$as_me:$LINENO: result: no" >&5
22745echo "${ECHO_T}no" >&6; }
22746 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22747echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022749/* confdefs.h. */
22750_ACEOF
22751cat confdefs.h >>conftest.$ac_ext
22752cat >>conftest.$ac_ext <<_ACEOF
22753/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022754
22755# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022756
Martin v. Löwis11437992002-04-12 09:54:03 +000022757int
22758main ()
22759{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022760
22761 char *name;
22762 struct hostent *he;
22763 char buffer[2048];
22764 int buflen = 2048;
22765 int h_errnop;
22766
22767 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022768
22769 ;
22770 return 0;
22771}
22772_ACEOF
22773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022774if { (ac_try="$ac_compile"
22775case "(($ac_try" in
22776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22777 *) ac_try_echo=$ac_try;;
22778esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022782 grep -v '^ *+' conftest.er1 >conftest.err
22783 rm -f conftest.er1
22784 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786 (exit $ac_status); } && {
22787 test -z "$ac_c_werror_flag" ||
22788 test ! -s conftest.err
22789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022790
22791 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022792#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022793_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022794
Martin v. Löwis11437992002-04-12 09:54:03 +000022795
22796cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022797#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022798_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022800 { echo "$as_me:$LINENO: result: yes" >&5
22801echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022805sed 's/^/| /' conftest.$ac_ext >&5
22806
Martin v. Löwis11437992002-04-12 09:54:03 +000022807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022808 { echo "$as_me:$LINENO: result: no" >&5
22809echo "${ECHO_T}no" >&6; }
22810 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22811echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022813/* confdefs.h. */
22814_ACEOF
22815cat confdefs.h >>conftest.$ac_ext
22816cat >>conftest.$ac_ext <<_ACEOF
22817/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022818
22819# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022820
Martin v. Löwis11437992002-04-12 09:54:03 +000022821int
22822main ()
22823{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022824
22825 char *name;
22826 struct hostent *he;
22827 struct hostent_data data;
22828
22829 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022830
22831 ;
22832 return 0;
22833}
22834_ACEOF
22835rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022836if { (ac_try="$ac_compile"
22837case "(($ac_try" in
22838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22839 *) ac_try_echo=$ac_try;;
22840esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022842 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022843 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022844 grep -v '^ *+' conftest.er1 >conftest.err
22845 rm -f conftest.er1
22846 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022848 (exit $ac_status); } && {
22849 test -z "$ac_c_werror_flag" ||
22850 test ! -s conftest.err
22851 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
22853 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022854#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022855_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022856
Martin v. Löwis11437992002-04-12 09:54:03 +000022857
22858cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022859#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022860_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022861
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022862 { echo "$as_me:$LINENO: result: yes" >&5
22863echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022864
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022867sed 's/^/| /' conftest.$ac_ext >&5
22868
Martin v. Löwis11437992002-04-12 09:54:03 +000022869
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022870 { echo "$as_me:$LINENO: result: no" >&5
22871echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022874
22875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022878
22879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022880
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022882
22883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022884 CFLAGS=$OLD_CFLAGS
22885
22886else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022887
Martin v. Löwis11437992002-04-12 09:54:03 +000022888
22889for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022890do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022891as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22892{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22893echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022894if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022896else
Martin v. Löwis11437992002-04-12 09:54:03 +000022897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022898/* confdefs.h. */
22899_ACEOF
22900cat confdefs.h >>conftest.$ac_ext
22901cat >>conftest.$ac_ext <<_ACEOF
22902/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022903/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22904 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22905#define $ac_func innocuous_$ac_func
22906
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022907/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022908 which can conflict with char $ac_func (); below.
22909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022910 <limits.h> exists even on freestanding compilers. */
22911
22912#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022913# include <limits.h>
22914#else
22915# include <assert.h>
22916#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022917
22918#undef $ac_func
22919
Martin v. Löwiseba40652007-08-30 20:10:57 +000022920/* Override any GCC internal prototype to avoid an error.
22921 Use char because int might match the return type of a GCC
22922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022923#ifdef __cplusplus
22924extern "C"
22925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022926char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022927/* The GNU C library defines this for functions which it implements
22928 to always fail with ENOSYS. Some functions are actually named
22929 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022931choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022932#endif
22933
Skip Montanaro6dead952003-09-25 14:50:04 +000022934int
22935main ()
22936{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022937return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022938 ;
22939 return 0;
22940}
22941_ACEOF
22942rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022943if { (ac_try="$ac_link"
22944case "(($ac_try" in
22945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22946 *) ac_try_echo=$ac_try;;
22947esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022949 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022951 grep -v '^ *+' conftest.er1 >conftest.err
22952 rm -f conftest.er1
22953 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022955 (exit $ac_status); } && {
22956 test -z "$ac_c_werror_flag" ||
22957 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022958 } && test -s conftest$ac_exeext &&
22959 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022960 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022961else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022962 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022963sed 's/^/| /' conftest.$ac_ext >&5
22964
Martin v. Löwiseba40652007-08-30 20:10:57 +000022965 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022967
22968rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022969 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022970fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022971ac_res=`eval echo '${'$as_ac_var'}'`
22972 { echo "$as_me:$LINENO: result: $ac_res" >&5
22973echo "${ECHO_T}$ac_res" >&6; }
22974if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022975 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022976#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022977_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022979fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022980done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022981
Michael W. Hudson54241132001-12-07 15:38:26 +000022982
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022983fi
22984
Michael W. Hudson54241132001-12-07 15:38:26 +000022985
22986
22987
22988
22989
22990
Guido van Rossum627b2d71993-12-24 10:39:16 +000022991# checks for system services
22992# (none yet)
22993
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022994# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022995{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22996echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022997if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022998 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022999else
Martin v. Löwis11437992002-04-12 09:54:03 +000023000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023001/* confdefs.h. */
23002_ACEOF
23003cat confdefs.h >>conftest.$ac_ext
23004cat >>conftest.$ac_ext <<_ACEOF
23005/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023006/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23008#define __fpu_control innocuous___fpu_control
23009
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023010/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023011 which can conflict with char __fpu_control (); below.
23012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023013 <limits.h> exists even on freestanding compilers. */
23014
23015#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023016# include <limits.h>
23017#else
23018# include <assert.h>
23019#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023020
23021#undef __fpu_control
23022
Martin v. Löwiseba40652007-08-30 20:10:57 +000023023/* Override any GCC internal prototype to avoid an error.
23024 Use char because int might match the return type of a GCC
23025 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023026#ifdef __cplusplus
23027extern "C"
23028#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023029char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023030/* The GNU C library defines this for functions which it implements
23031 to always fail with ENOSYS. Some functions are actually named
23032 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023033#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023034choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023035#endif
23036
Skip Montanaro6dead952003-09-25 14:50:04 +000023037int
23038main ()
23039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023040return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023041 ;
23042 return 0;
23043}
23044_ACEOF
23045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046if { (ac_try="$ac_link"
23047case "(($ac_try" in
23048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23049 *) ac_try_echo=$ac_try;;
23050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023054 grep -v '^ *+' conftest.er1 >conftest.err
23055 rm -f conftest.er1
23056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023058 (exit $ac_status); } && {
23059 test -z "$ac_c_werror_flag" ||
23060 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023061 } && test -s conftest$ac_exeext &&
23062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023063 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023066sed 's/^/| /' conftest.$ac_ext >&5
23067
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023070
23071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023072 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023073fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023074{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23075echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23076if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023077 :
23078else
Martin v. Löwis11437992002-04-12 09:54:03 +000023079
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023080{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23081echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023082if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023084else
Martin v. Löwis11437992002-04-12 09:54:03 +000023085 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023086LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023088/* confdefs.h. */
23089_ACEOF
23090cat confdefs.h >>conftest.$ac_ext
23091cat >>conftest.$ac_ext <<_ACEOF
23092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023093
Martin v. Löwiseba40652007-08-30 20:10:57 +000023094/* Override any GCC internal prototype to avoid an error.
23095 Use char because int might match the return type of a GCC
23096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023097#ifdef __cplusplus
23098extern "C"
23099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023100char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023101int
23102main ()
23103{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023104return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023105 ;
23106 return 0;
23107}
23108_ACEOF
23109rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023110if { (ac_try="$ac_link"
23111case "(($ac_try" in
23112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23113 *) ac_try_echo=$ac_try;;
23114esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023116 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023118 grep -v '^ *+' conftest.er1 >conftest.err
23119 rm -f conftest.er1
23120 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023122 (exit $ac_status); } && {
23123 test -z "$ac_c_werror_flag" ||
23124 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023125 } && test -s conftest$ac_exeext &&
23126 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023128else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023130sed 's/^/| /' conftest.$ac_ext >&5
23131
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134
23135rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023138fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023139{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23140echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23141if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023142 cat >>confdefs.h <<_ACEOF
23143#define HAVE_LIBIEEE 1
23144_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023145
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023146 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023147
Guido van Rossum627b2d71993-12-24 10:39:16 +000023148fi
23149
Michael W. Hudson54241132001-12-07 15:38:26 +000023150
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023151fi
23152
Michael W. Hudson54241132001-12-07 15:38:26 +000023153
Guido van Rossum7f253911997-05-09 02:42:48 +000023154# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023155{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23156echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023157
Martin v. Löwiseba40652007-08-30 20:10:57 +000023158# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023159if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023160 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023161if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023162then
23163
23164cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023165#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023166_ACEOF
23167
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023168 { echo "$as_me:$LINENO: result: yes" >&5
23169echo "${ECHO_T}yes" >&6; }
23170else { echo "$as_me:$LINENO: result: no" >&5
23171echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023172fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023174 { echo "$as_me:$LINENO: result: no" >&5
23175echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176fi
23177
Guido van Rossum7f253911997-05-09 02:42:48 +000023178
Guido van Rossum7f43da71994-08-01 12:15:30 +000023179# check for --with-libm=...
23180
Guido van Rossum563e7081996-09-10 18:20:48 +000023181case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023182Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023183BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023184*) LIBM=-lm
23185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023186{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23187echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023188
Martin v. Löwiseba40652007-08-30 20:10:57 +000023189# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023190if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023191 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023192if test "$withval" = no
23193then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023194 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23195echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023196elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023197then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023198 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23199echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23200else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23201echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023202 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023203fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023205 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23206echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023207fi
23208
Guido van Rossum7f43da71994-08-01 12:15:30 +000023209
23210# check for --with-libc=...
23211
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023212{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23213echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023214
Martin v. Löwiseba40652007-08-30 20:10:57 +000023215# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023216if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023217 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023218if test "$withval" = no
23219then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023220 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23221echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023222elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023223then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023224 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23225echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23226else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23227echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023228 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023229fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023230else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023231 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23232echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023233fi
23234
Guido van Rossum7f43da71994-08-01 12:15:30 +000023235
Christian Heimes0a8143f2007-12-18 23:22:54 +000023236# ************************************
23237# * Check for mathematical functions *
23238# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023239
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023240LIBS_SAVE=$LIBS
23241LIBS="$LIBS $LIBM"
23242
Mark Dickinson04b27232009-01-04 12:29:36 +000023243# Detect whether system arithmetic is subject to x87-style double
23244# rounding issues. The result of this test has little meaning on non
23245# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23246# mode is round-to-nearest and double rounding issues are present, and
23247# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023248{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23249echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023250if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023251 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023252else
23253
23254if test "$cross_compiling" = yes; then
23255 ac_cv_x87_double_rounding=no
23256else
23257 cat >conftest.$ac_ext <<_ACEOF
23258/* confdefs.h. */
23259_ACEOF
23260cat confdefs.h >>conftest.$ac_ext
23261cat >>conftest.$ac_ext <<_ACEOF
23262/* end confdefs.h. */
23263
23264#include <stdlib.h>
23265#include <math.h>
23266int main() {
23267 volatile double x, y, z;
23268 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23269 x = 0.99999999999999989; /* 1-2**-53 */
23270 y = 1./x;
23271 if (y != 1.)
23272 exit(0);
23273 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23274 x = 1e16;
23275 y = 2.99999;
23276 z = x + y;
23277 if (z != 1e16+4.)
23278 exit(0);
23279 /* both tests show evidence of double rounding */
23280 exit(1);
23281}
23282
23283_ACEOF
23284rm -f conftest$ac_exeext
23285if { (ac_try="$ac_link"
23286case "(($ac_try" in
23287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23288 *) ac_try_echo=$ac_try;;
23289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023291 (eval "$ac_link") 2>&5
23292 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023294 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23295 { (case "(($ac_try" in
23296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23297 *) ac_try_echo=$ac_try;;
23298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023300 (eval "$ac_try") 2>&5
23301 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023303 (exit $ac_status); }; }; then
23304 ac_cv_x87_double_rounding=no
23305else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023306 echo "$as_me: program exited with status $ac_status" >&5
23307echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023308sed 's/^/| /' conftest.$ac_ext >&5
23309
23310( exit $ac_status )
23311ac_cv_x87_double_rounding=yes
23312fi
23313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23314fi
23315
23316
23317fi
23318
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023319{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23320echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023321if test "$ac_cv_x87_double_rounding" = yes
23322then
23323
23324cat >>confdefs.h <<\_ACEOF
23325#define X87_DOUBLE_ROUNDING 1
23326_ACEOF
23327
23328fi
23329
Jesse Noller355b1262009-04-02 00:03:28 +000023330# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023331{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23332echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023333if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23334 echo $ECHO_N "(cached) $ECHO_C" >&6
23335else
23336 if test "$cross_compiling" = yes; then
23337 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023338else
23339 cat >conftest.$ac_ext <<_ACEOF
23340/* confdefs.h. */
23341_ACEOF
23342cat confdefs.h >>conftest.$ac_ext
23343cat >>conftest.$ac_ext <<_ACEOF
23344/* end confdefs.h. */
23345
23346#include <unistd.h>
23347#include <fcntl.h>
23348#include <stdio.h>
23349#include <semaphore.h>
23350#include <sys/stat.h>
23351
23352int main(void){
23353 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23354 int count;
23355 int res;
23356 if(a==SEM_FAILED){
23357 perror("sem_open");
23358 return 1;
23359
23360 }
23361 res = sem_getvalue(a, &count);
23362 sem_close(a);
23363 return res==-1 ? 1 : 0;
23364}
23365
Jesse Noller355b1262009-04-02 00:03:28 +000023366_ACEOF
23367rm -f conftest$ac_exeext
23368if { (ac_try="$ac_link"
23369case "(($ac_try" in
23370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23371 *) ac_try_echo=$ac_try;;
23372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023374 (eval "$ac_link") 2>&5
23375 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23378 { (case "(($ac_try" in
23379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23380 *) ac_try_echo=$ac_try;;
23381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023383 (eval "$ac_try") 2>&5
23384 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023386 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023387 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023389 echo "$as_me: program exited with status $ac_status" >&5
23390echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023391sed 's/^/| /' conftest.$ac_ext >&5
23392
23393( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023394ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023395fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23397fi
23398
23399
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023400
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023401fi
23402
23403{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23404echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23405if test $ac_cv_broken_sem_getvalue = yes
23406then
23407
23408cat >>confdefs.h <<\_ACEOF
23409#define HAVE_BROKEN_SEM_GETVALUE 1
23410_ACEOF
23411
23412fi
23413
Mark Dickinson265d7382008-04-21 22:32:24 +000023414# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23415# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023416{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23417echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023418if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023419 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023420else
23421
23422if test "$cross_compiling" = yes; then
23423 ac_cv_tanh_preserves_zero_sign=no
23424else
23425 cat >conftest.$ac_ext <<_ACEOF
23426/* confdefs.h. */
23427_ACEOF
23428cat confdefs.h >>conftest.$ac_ext
23429cat >>conftest.$ac_ext <<_ACEOF
23430/* end confdefs.h. */
23431
23432#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023433#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023434int main() {
23435 /* return 0 if either negative zeros don't exist
23436 on this platform or if negative zeros exist
23437 and tanh(-0.) == -0. */
23438 if (atan2(0., -1.) == atan2(-0., -1.) ||
23439 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23440 else exit(1);
23441}
23442
23443_ACEOF
23444rm -f conftest$ac_exeext
23445if { (ac_try="$ac_link"
23446case "(($ac_try" in
23447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23448 *) ac_try_echo=$ac_try;;
23449esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023451 (eval "$ac_link") 2>&5
23452 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23455 { (case "(($ac_try" in
23456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23457 *) ac_try_echo=$ac_try;;
23458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023460 (eval "$ac_try") 2>&5
23461 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023463 (exit $ac_status); }; }; then
23464 ac_cv_tanh_preserves_zero_sign=yes
23465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023466 echo "$as_me: program exited with status $ac_status" >&5
23467echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023468sed 's/^/| /' conftest.$ac_ext >&5
23469
23470( exit $ac_status )
23471ac_cv_tanh_preserves_zero_sign=no
23472fi
23473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23474fi
23475
23476
23477fi
23478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023479{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23480echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023481if test "$ac_cv_tanh_preserves_zero_sign" = yes
23482then
23483
23484cat >>confdefs.h <<\_ACEOF
23485#define TANH_PRESERVES_ZERO_SIGN 1
23486_ACEOF
23487
23488fi
23489
Martin v. Löwis11437992002-04-12 09:54:03 +000023490
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023491
Michael W. Hudson54241132001-12-07 15:38:26 +000023492
Christian Heimes0a8143f2007-12-18 23:22:54 +000023493
23494
23495
23496
23497
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023498
Mark Dickinson65898e02009-09-05 10:27:00 +000023499for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23500do
23501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23505 echo $ECHO_N "(cached) $ECHO_C" >&6
23506else
23507 cat >conftest.$ac_ext <<_ACEOF
23508/* confdefs.h. */
23509_ACEOF
23510cat confdefs.h >>conftest.$ac_ext
23511cat >>conftest.$ac_ext <<_ACEOF
23512/* end confdefs.h. */
23513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23515#define $ac_func innocuous_$ac_func
23516
23517/* System header to define __stub macros and hopefully few prototypes,
23518 which can conflict with char $ac_func (); below.
23519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23520 <limits.h> exists even on freestanding compilers. */
23521
23522#ifdef __STDC__
23523# include <limits.h>
23524#else
23525# include <assert.h>
23526#endif
23527
23528#undef $ac_func
23529
23530/* Override any GCC internal prototype to avoid an error.
23531 Use char because int might match the return type of a GCC
23532 builtin and then its argument prototype would still apply. */
23533#ifdef __cplusplus
23534extern "C"
23535#endif
23536char $ac_func ();
23537/* The GNU C library defines this for functions which it implements
23538 to always fail with ENOSYS. Some functions are actually named
23539 something starting with __ and the normal name is an alias. */
23540#if defined __stub_$ac_func || defined __stub___$ac_func
23541choke me
23542#endif
23543
23544int
23545main ()
23546{
23547return $ac_func ();
23548 ;
23549 return 0;
23550}
23551_ACEOF
23552rm -f conftest.$ac_objext conftest$ac_exeext
23553if { (ac_try="$ac_link"
23554case "(($ac_try" in
23555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23556 *) ac_try_echo=$ac_try;;
23557esac
23558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23559 (eval "$ac_link") 2>conftest.er1
23560 ac_status=$?
23561 grep -v '^ *+' conftest.er1 >conftest.err
23562 rm -f conftest.er1
23563 cat conftest.err >&5
23564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23565 (exit $ac_status); } && {
23566 test -z "$ac_c_werror_flag" ||
23567 test ! -s conftest.err
23568 } && test -s conftest$ac_exeext &&
23569 $as_test_x conftest$ac_exeext; then
23570 eval "$as_ac_var=yes"
23571else
23572 echo "$as_me: failed program was:" >&5
23573sed 's/^/| /' conftest.$ac_ext >&5
23574
23575 eval "$as_ac_var=no"
23576fi
23577
23578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23579 conftest$ac_exeext conftest.$ac_ext
23580fi
23581ac_res=`eval echo '${'$as_ac_var'}'`
23582 { echo "$as_me:$LINENO: result: $ac_res" >&5
23583echo "${ECHO_T}$ac_res" >&6; }
23584if test `eval echo '${'$as_ac_var'}'` = yes; then
23585 cat >>confdefs.h <<_ACEOF
23586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23587_ACEOF
23588
23589fi
23590done
23591
23592
23593
23594
23595
23596
23597for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000023598do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023599as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23600{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23601echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023602if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023603 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023604else
23605 cat >conftest.$ac_ext <<_ACEOF
23606/* confdefs.h. */
23607_ACEOF
23608cat confdefs.h >>conftest.$ac_ext
23609cat >>conftest.$ac_ext <<_ACEOF
23610/* end confdefs.h. */
23611/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23612 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23613#define $ac_func innocuous_$ac_func
23614
23615/* System header to define __stub macros and hopefully few prototypes,
23616 which can conflict with char $ac_func (); below.
23617 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23618 <limits.h> exists even on freestanding compilers. */
23619
23620#ifdef __STDC__
23621# include <limits.h>
23622#else
23623# include <assert.h>
23624#endif
23625
23626#undef $ac_func
23627
23628/* Override any GCC internal prototype to avoid an error.
23629 Use char because int might match the return type of a GCC
23630 builtin and then its argument prototype would still apply. */
23631#ifdef __cplusplus
23632extern "C"
23633#endif
23634char $ac_func ();
23635/* The GNU C library defines this for functions which it implements
23636 to always fail with ENOSYS. Some functions are actually named
23637 something starting with __ and the normal name is an alias. */
23638#if defined __stub_$ac_func || defined __stub___$ac_func
23639choke me
23640#endif
23641
23642int
23643main ()
23644{
23645return $ac_func ();
23646 ;
23647 return 0;
23648}
23649_ACEOF
23650rm -f conftest.$ac_objext conftest$ac_exeext
23651if { (ac_try="$ac_link"
23652case "(($ac_try" in
23653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23654 *) ac_try_echo=$ac_try;;
23655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023657 (eval "$ac_link") 2>conftest.er1
23658 ac_status=$?
23659 grep -v '^ *+' conftest.er1 >conftest.err
23660 rm -f conftest.er1
23661 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023663 (exit $ac_status); } && {
23664 test -z "$ac_c_werror_flag" ||
23665 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023666 } && test -s conftest$ac_exeext &&
23667 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023668 eval "$as_ac_var=yes"
23669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023670 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023671sed 's/^/| /' conftest.$ac_ext >&5
23672
23673 eval "$as_ac_var=no"
23674fi
23675
23676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23677 conftest$ac_exeext conftest.$ac_ext
23678fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023679ac_res=`eval echo '${'$as_ac_var'}'`
23680 { echo "$as_me:$LINENO: result: $ac_res" >&5
23681echo "${ECHO_T}$ac_res" >&6; }
23682if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023683 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023684#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023685_ACEOF
23686
23687fi
23688done
23689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023690{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23691echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023692if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023693 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023694else
23695 cat >conftest.$ac_ext <<_ACEOF
23696/* confdefs.h. */
23697_ACEOF
23698cat confdefs.h >>conftest.$ac_ext
23699cat >>conftest.$ac_ext <<_ACEOF
23700/* end confdefs.h. */
23701#include <math.h>
23702
23703int
23704main ()
23705{
23706#ifndef isinf
23707 (void) isinf;
23708#endif
23709
23710 ;
23711 return 0;
23712}
23713_ACEOF
23714rm -f conftest.$ac_objext
23715if { (ac_try="$ac_compile"
23716case "(($ac_try" in
23717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23718 *) ac_try_echo=$ac_try;;
23719esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023721 (eval "$ac_compile") 2>conftest.er1
23722 ac_status=$?
23723 grep -v '^ *+' conftest.er1 >conftest.err
23724 rm -f conftest.er1
23725 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023727 (exit $ac_status); } && {
23728 test -z "$ac_c_werror_flag" ||
23729 test ! -s conftest.err
23730 } && test -s conftest.$ac_objext; then
23731 ac_cv_have_decl_isinf=yes
23732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023733 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023734sed 's/^/| /' conftest.$ac_ext >&5
23735
23736 ac_cv_have_decl_isinf=no
23737fi
23738
23739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23740fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023741{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23742echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23743if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023744
23745cat >>confdefs.h <<_ACEOF
23746#define HAVE_DECL_ISINF 1
23747_ACEOF
23748
23749
23750else
23751 cat >>confdefs.h <<_ACEOF
23752#define HAVE_DECL_ISINF 0
23753_ACEOF
23754
23755
23756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023757{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23758echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023759if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023760 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023761else
23762 cat >conftest.$ac_ext <<_ACEOF
23763/* confdefs.h. */
23764_ACEOF
23765cat confdefs.h >>conftest.$ac_ext
23766cat >>conftest.$ac_ext <<_ACEOF
23767/* end confdefs.h. */
23768#include <math.h>
23769
23770int
23771main ()
23772{
23773#ifndef isnan
23774 (void) isnan;
23775#endif
23776
23777 ;
23778 return 0;
23779}
23780_ACEOF
23781rm -f conftest.$ac_objext
23782if { (ac_try="$ac_compile"
23783case "(($ac_try" in
23784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23785 *) ac_try_echo=$ac_try;;
23786esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023788 (eval "$ac_compile") 2>conftest.er1
23789 ac_status=$?
23790 grep -v '^ *+' conftest.er1 >conftest.err
23791 rm -f conftest.er1
23792 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023794 (exit $ac_status); } && {
23795 test -z "$ac_c_werror_flag" ||
23796 test ! -s conftest.err
23797 } && test -s conftest.$ac_objext; then
23798 ac_cv_have_decl_isnan=yes
23799else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023800 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023801sed 's/^/| /' conftest.$ac_ext >&5
23802
23803 ac_cv_have_decl_isnan=no
23804fi
23805
23806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23807fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023808{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23809echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23810if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023811
23812cat >>confdefs.h <<_ACEOF
23813#define HAVE_DECL_ISNAN 1
23814_ACEOF
23815
23816
23817else
23818 cat >>confdefs.h <<_ACEOF
23819#define HAVE_DECL_ISNAN 0
23820_ACEOF
23821
23822
23823fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023824{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23825echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023826if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023827 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023828else
23829 cat >conftest.$ac_ext <<_ACEOF
23830/* confdefs.h. */
23831_ACEOF
23832cat confdefs.h >>conftest.$ac_ext
23833cat >>conftest.$ac_ext <<_ACEOF
23834/* end confdefs.h. */
23835#include <math.h>
23836
23837int
23838main ()
23839{
23840#ifndef isfinite
23841 (void) isfinite;
23842#endif
23843
23844 ;
23845 return 0;
23846}
23847_ACEOF
23848rm -f conftest.$ac_objext
23849if { (ac_try="$ac_compile"
23850case "(($ac_try" in
23851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23852 *) ac_try_echo=$ac_try;;
23853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023855 (eval "$ac_compile") 2>conftest.er1
23856 ac_status=$?
23857 grep -v '^ *+' conftest.er1 >conftest.err
23858 rm -f conftest.er1
23859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023861 (exit $ac_status); } && {
23862 test -z "$ac_c_werror_flag" ||
23863 test ! -s conftest.err
23864 } && test -s conftest.$ac_objext; then
23865 ac_cv_have_decl_isfinite=yes
23866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023867 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023868sed 's/^/| /' conftest.$ac_ext >&5
23869
23870 ac_cv_have_decl_isfinite=no
23871fi
23872
23873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023875{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23876echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23877if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023878
23879cat >>confdefs.h <<_ACEOF
23880#define HAVE_DECL_ISFINITE 1
23881_ACEOF
23882
23883
23884else
23885 cat >>confdefs.h <<_ACEOF
23886#define HAVE_DECL_ISFINITE 0
23887_ACEOF
23888
23889
23890fi
23891
23892
Christian Heimes0a8143f2007-12-18 23:22:54 +000023893
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023894LIBS=$LIBS_SAVE
23895
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023896# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023897{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23898echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023899# Check whether --enable-big-digits was given.
23900if test "${enable_big_digits+set}" = set; then
23901 enableval=$enable_big_digits; case $enable_big_digits in
23902yes)
23903 enable_big_digits=30 ;;
23904no)
23905 enable_big_digits=15 ;;
2390615|30)
23907 ;;
23908*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023909 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23910echo "$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 +000023911 { (exit 1); exit 1; }; } ;;
23912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023913{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23914echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023915
23916cat >>confdefs.h <<_ACEOF
23917#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23918_ACEOF
23919
23920
23921else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023922 { echo "$as_me:$LINENO: result: no value specified" >&5
23923echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023924fi
23925
23926
Guido van Rossumef2255b2000-03-10 22:30:29 +000023927# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023928if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023929 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23930echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023931if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023932 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023933fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023934{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23935echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023936else
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023938{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23939echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023941/* confdefs.h. */
23942_ACEOF
23943cat confdefs.h >>conftest.$ac_ext
23944cat >>conftest.$ac_ext <<_ACEOF
23945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023946$ac_includes_default
23947#include <wchar.h>
23948_ACEOF
23949rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023950if { (ac_try="$ac_compile"
23951case "(($ac_try" in
23952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23953 *) ac_try_echo=$ac_try;;
23954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023958 grep -v '^ *+' conftest.er1 >conftest.err
23959 rm -f conftest.er1
23960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023962 (exit $ac_status); } && {
23963 test -z "$ac_c_werror_flag" ||
23964 test ! -s conftest.err
23965 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 ac_header_compiler=yes
23967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023969sed 's/^/| /' conftest.$ac_ext >&5
23970
Martin v. Löwiseba40652007-08-30 20:10:57 +000023971 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023973
23974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023975{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23976echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023977
23978# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023979{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23980echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023982/* confdefs.h. */
23983_ACEOF
23984cat confdefs.h >>conftest.$ac_ext
23985cat >>conftest.$ac_ext <<_ACEOF
23986/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023987#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023988_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023989if { (ac_try="$ac_cpp conftest.$ac_ext"
23990case "(($ac_try" in
23991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23992 *) ac_try_echo=$ac_try;;
23993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023995 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023996 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023997 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023998 rm -f conftest.er1
23999 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001 (exit $ac_status); } >/dev/null && {
24002 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24003 test ! -s conftest.err
24004 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024005 ac_header_preproc=yes
24006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024008sed 's/^/| /' conftest.$ac_ext >&5
24009
Martin v. Löwis11437992002-04-12 09:54:03 +000024010 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024012
Martin v. Löwis11437992002-04-12 09:54:03 +000024013rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024014{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24015echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024016
24017# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024018case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24019 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024020 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24021echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24022 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24023echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024024 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024025 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024026 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024027 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24028echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24029 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24030echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24031 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24032echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24033 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24034echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24035 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24036echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24037 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24038echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024039 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024040## -------------------------------------- ##
24041## Report this to http://bugs.python.org/ ##
24042## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024043_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024044 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024045 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024047{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24048echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024049if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024051else
24052 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024053fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024054{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24055echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024056
24057fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024058if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024059
24060
24061cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024062#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024063_ACEOF
24064
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024065 wchar_h="yes"
24066
Guido van Rossumef2255b2000-03-10 22:30:29 +000024067else
Martin v. Löwis11437992002-04-12 09:54:03 +000024068 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024069
24070fi
24071
Michael W. Hudson54241132001-12-07 15:38:26 +000024072
Martin v. Löwis11437992002-04-12 09:54:03 +000024073
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024074# determine wchar_t size
24075if test "$wchar_h" = yes
24076then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024077 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24078echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24079if test "${ac_cv_type_wchar_t+set}" = set; then
24080 echo $ECHO_N "(cached) $ECHO_C" >&6
24081else
24082 cat >conftest.$ac_ext <<_ACEOF
24083/* confdefs.h. */
24084_ACEOF
24085cat confdefs.h >>conftest.$ac_ext
24086cat >>conftest.$ac_ext <<_ACEOF
24087/* end confdefs.h. */
24088#include <wchar.h>
24089
24090typedef wchar_t ac__type_new_;
24091int
24092main ()
24093{
24094if ((ac__type_new_ *) 0)
24095 return 0;
24096if (sizeof (ac__type_new_))
24097 return 0;
24098 ;
24099 return 0;
24100}
24101_ACEOF
24102rm -f conftest.$ac_objext
24103if { (ac_try="$ac_compile"
24104case "(($ac_try" in
24105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24106 *) ac_try_echo=$ac_try;;
24107esac
24108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24109 (eval "$ac_compile") 2>conftest.er1
24110 ac_status=$?
24111 grep -v '^ *+' conftest.er1 >conftest.err
24112 rm -f conftest.er1
24113 cat conftest.err >&5
24114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24115 (exit $ac_status); } && {
24116 test -z "$ac_c_werror_flag" ||
24117 test ! -s conftest.err
24118 } && test -s conftest.$ac_objext; then
24119 ac_cv_type_wchar_t=yes
24120else
24121 echo "$as_me: failed program was:" >&5
24122sed 's/^/| /' conftest.$ac_ext >&5
24123
24124 ac_cv_type_wchar_t=no
24125fi
24126
24127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24128fi
24129{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24130echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24131
24132# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000024133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24135# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024136{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24137echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024138if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024139 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024140else
Martin v. Löwis11437992002-04-12 09:54:03 +000024141 if test "$cross_compiling" = yes; then
24142 # Depending upon the size, compute the lo and hi bounds.
24143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024144/* confdefs.h. */
24145_ACEOF
24146cat confdefs.h >>conftest.$ac_ext
24147cat >>conftest.$ac_ext <<_ACEOF
24148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024149#include <wchar.h>
24150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024151 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024152int
24153main ()
24154{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024156test_array [0] = 0
24157
24158 ;
24159 return 0;
24160}
24161_ACEOF
24162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024163if { (ac_try="$ac_compile"
24164case "(($ac_try" in
24165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24166 *) ac_try_echo=$ac_try;;
24167esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024171 grep -v '^ *+' conftest.er1 >conftest.err
24172 rm -f conftest.er1
24173 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024175 (exit $ac_status); } && {
24176 test -z "$ac_c_werror_flag" ||
24177 test ! -s conftest.err
24178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024179 ac_lo=0 ac_mid=0
24180 while :; do
24181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024182/* confdefs.h. */
24183_ACEOF
24184cat confdefs.h >>conftest.$ac_ext
24185cat >>conftest.$ac_ext <<_ACEOF
24186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024187#include <wchar.h>
24188
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024189 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024190int
24191main ()
24192{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024194test_array [0] = 0
24195
24196 ;
24197 return 0;
24198}
24199_ACEOF
24200rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024201if { (ac_try="$ac_compile"
24202case "(($ac_try" in
24203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24204 *) ac_try_echo=$ac_try;;
24205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024209 grep -v '^ *+' conftest.er1 >conftest.err
24210 rm -f conftest.er1
24211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024213 (exit $ac_status); } && {
24214 test -z "$ac_c_werror_flag" ||
24215 test ! -s conftest.err
24216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024217 ac_hi=$ac_mid; break
24218else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024220sed 's/^/| /' conftest.$ac_ext >&5
24221
Martin v. Löwiseba40652007-08-30 20:10:57 +000024222 ac_lo=`expr $ac_mid + 1`
24223 if test $ac_lo -le $ac_mid; then
24224 ac_lo= ac_hi=
24225 break
24226 fi
24227 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024229
24230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024231 done
24232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024234sed 's/^/| /' conftest.$ac_ext >&5
24235
Martin v. Löwiseba40652007-08-30 20:10:57 +000024236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024237/* confdefs.h. */
24238_ACEOF
24239cat confdefs.h >>conftest.$ac_ext
24240cat >>conftest.$ac_ext <<_ACEOF
24241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024242#include <wchar.h>
24243
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024244 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024245int
24246main ()
24247{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024249test_array [0] = 0
24250
24251 ;
24252 return 0;
24253}
24254_ACEOF
24255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024256if { (ac_try="$ac_compile"
24257case "(($ac_try" in
24258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24259 *) ac_try_echo=$ac_try;;
24260esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024263 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024264 grep -v '^ *+' conftest.er1 >conftest.err
24265 rm -f conftest.er1
24266 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024268 (exit $ac_status); } && {
24269 test -z "$ac_c_werror_flag" ||
24270 test ! -s conftest.err
24271 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024272 ac_hi=-1 ac_mid=-1
24273 while :; do
24274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024275/* confdefs.h. */
24276_ACEOF
24277cat confdefs.h >>conftest.$ac_ext
24278cat >>conftest.$ac_ext <<_ACEOF
24279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024280#include <wchar.h>
24281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024282 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024283int
24284main ()
24285{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024286static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024287test_array [0] = 0
24288
24289 ;
24290 return 0;
24291}
24292_ACEOF
24293rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024294if { (ac_try="$ac_compile"
24295case "(($ac_try" in
24296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24297 *) ac_try_echo=$ac_try;;
24298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024300 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024302 grep -v '^ *+' conftest.er1 >conftest.err
24303 rm -f conftest.er1
24304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024306 (exit $ac_status); } && {
24307 test -z "$ac_c_werror_flag" ||
24308 test ! -s conftest.err
24309 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 ac_lo=$ac_mid; break
24311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024313sed 's/^/| /' conftest.$ac_ext >&5
24314
Martin v. Löwiseba40652007-08-30 20:10:57 +000024315 ac_hi=`expr '(' $ac_mid ')' - 1`
24316 if test $ac_mid -le $ac_hi; then
24317 ac_lo= ac_hi=
24318 break
24319 fi
24320 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024322
24323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024324 done
24325else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024327sed 's/^/| /' conftest.$ac_ext >&5
24328
Martin v. Löwiseba40652007-08-30 20:10:57 +000024329 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024331
24332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334
24335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024336# Binary search between lo and hi bounds.
24337while test "x$ac_lo" != "x$ac_hi"; do
24338 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024340/* confdefs.h. */
24341_ACEOF
24342cat confdefs.h >>conftest.$ac_ext
24343cat >>conftest.$ac_ext <<_ACEOF
24344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024345#include <wchar.h>
24346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024347 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024348int
24349main ()
24350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024352test_array [0] = 0
24353
24354 ;
24355 return 0;
24356}
24357_ACEOF
24358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024359if { (ac_try="$ac_compile"
24360case "(($ac_try" in
24361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24362 *) ac_try_echo=$ac_try;;
24363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024366 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024367 grep -v '^ *+' conftest.er1 >conftest.err
24368 rm -f conftest.er1
24369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024371 (exit $ac_status); } && {
24372 test -z "$ac_c_werror_flag" ||
24373 test ! -s conftest.err
24374 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024375 ac_hi=$ac_mid
24376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024378sed 's/^/| /' conftest.$ac_ext >&5
24379
Martin v. Löwiseba40652007-08-30 20:10:57 +000024380 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024382
24383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024384done
24385case $ac_lo in
24386?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024387'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024388 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024389See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024390echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024391See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024392 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024393 else
24394 ac_cv_sizeof_wchar_t=0
24395 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024396esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024397else
Martin v. Löwis11437992002-04-12 09:54:03 +000024398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024399/* confdefs.h. */
24400_ACEOF
24401cat confdefs.h >>conftest.$ac_ext
24402cat >>conftest.$ac_ext <<_ACEOF
24403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024404#include <wchar.h>
24405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024406 typedef wchar_t ac__type_sizeof_;
24407static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24408static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024409#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024410#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024411int
24412main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024413{
Martin v. Löwis11437992002-04-12 09:54:03 +000024414
24415 FILE *f = fopen ("conftest.val", "w");
24416 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024417 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024418 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024419 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024420 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024421 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024422 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024423 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024424 }
24425 else
24426 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024427 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024428 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024430 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024431 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024432 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024433
24434 ;
24435 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024436}
Martin v. Löwis11437992002-04-12 09:54:03 +000024437_ACEOF
24438rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024439if { (ac_try="$ac_link"
24440case "(($ac_try" in
24441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24442 *) ac_try_echo=$ac_try;;
24443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024446 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024448 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024449 { (case "(($ac_try" in
24450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24451 *) ac_try_echo=$ac_try;;
24452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024454 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024455 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024457 (exit $ac_status); }; }; then
24458 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024460 echo "$as_me: program exited with status $ac_status" >&5
24461echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024462sed 's/^/| /' conftest.$ac_ext >&5
24463
Martin v. Löwis11437992002-04-12 09:54:03 +000024464( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024465if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024466 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024467See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024468echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024469See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024470 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024471 else
24472 ac_cv_sizeof_wchar_t=0
24473 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024475rm -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 +000024476fi
24477rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024478fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024479{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24480echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024481
24482
24483
Martin v. Löwis11437992002-04-12 09:54:03 +000024484cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024485#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024486_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024487
Michael W. Hudson54241132001-12-07 15:38:26 +000024488
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024489fi
24490
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024491{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24492echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024493have_ucs4_tcl=no
24494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024495/* confdefs.h. */
24496_ACEOF
24497cat confdefs.h >>conftest.$ac_ext
24498cat >>conftest.$ac_ext <<_ACEOF
24499/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024500
24501#include <tcl.h>
24502#if TCL_UTF_MAX != 6
24503# error "NOT UCS4_TCL"
24504#endif
24505int
24506main ()
24507{
24508
24509 ;
24510 return 0;
24511}
24512_ACEOF
24513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024514if { (ac_try="$ac_compile"
24515case "(($ac_try" in
24516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24517 *) ac_try_echo=$ac_try;;
24518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024522 grep -v '^ *+' conftest.er1 >conftest.err
24523 rm -f conftest.er1
24524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024526 (exit $ac_status); } && {
24527 test -z "$ac_c_werror_flag" ||
24528 test ! -s conftest.err
24529 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024530
24531
24532cat >>confdefs.h <<\_ACEOF
24533#define HAVE_UCS4_TCL 1
24534_ACEOF
24535
24536 have_ucs4_tcl=yes
24537
24538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024540sed 's/^/| /' conftest.$ac_ext >&5
24541
Martin v. Löwiseba40652007-08-30 20:10:57 +000024542
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024544
24545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024546{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24547echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024548
Skip Montanaro6dead952003-09-25 14:50:04 +000024549# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024550if test "$wchar_h" = yes
24551then
24552 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024553 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24554echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024555 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024556 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024557else
24558
24559 if test "$cross_compiling" = yes; then
24560 ac_cv_wchar_t_signed=yes
24561else
24562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024563/* confdefs.h. */
24564_ACEOF
24565cat confdefs.h >>conftest.$ac_ext
24566cat >>conftest.$ac_ext <<_ACEOF
24567/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024568
24569 #include <wchar.h>
24570 int main()
24571 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024572 /* Success: exit code 0 */
24573 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024574 }
24575
24576_ACEOF
24577rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024578if { (ac_try="$ac_link"
24579case "(($ac_try" in
24580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24581 *) ac_try_echo=$ac_try;;
24582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024584 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024585 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024588 { (case "(($ac_try" in
24589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24590 *) ac_try_echo=$ac_try;;
24591esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024593 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024594 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024596 (exit $ac_status); }; }; then
24597 ac_cv_wchar_t_signed=yes
24598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024599 echo "$as_me: program exited with status $ac_status" >&5
24600echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024601sed 's/^/| /' conftest.$ac_ext >&5
24602
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024603( exit $ac_status )
24604ac_cv_wchar_t_signed=no
24605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024606rm -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 +000024607fi
24608
Martin v. Löwiseba40652007-08-30 20:10:57 +000024609
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024610fi
24611
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024612 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24613echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024614fi
24615
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024616{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24617echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024619if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024620 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024621else
24622 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024623fi
24624
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024625
24626if test $enable_unicode = yes
24627then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024628 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024629 case "$have_ucs4_tcl" in
24630 yes) enable_unicode="ucs4"
24631 ;;
24632 *) enable_unicode="ucs2"
24633 ;;
24634 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024635fi
24636
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024637
24638
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024639case "$enable_unicode" in
24640ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024641 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024642#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024643_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024644
24645 ;;
24646ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024647 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024648#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024649_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024650
24651 ;;
24652esac
24653
Michael W. Hudson54241132001-12-07 15:38:26 +000024654
Martin v. Löwis11437992002-04-12 09:54:03 +000024655
24656
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024657
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024658if test "$enable_unicode" = "no"
24659then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024660 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024661 { echo "$as_me:$LINENO: result: not used" >&5
24662echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024663else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024664 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024665
24666cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024667#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024668_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024669
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024670
24671 # wchar_t is only usable if it maps to an unsigned type
24672 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024673 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024674 then
24675 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024676
Martin v. Löwis11437992002-04-12 09:54:03 +000024677cat >>confdefs.h <<\_ACEOF
24678#define HAVE_USABLE_WCHAR_T 1
24679_ACEOF
24680
24681 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024682#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024683_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024684
24685 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24686 then
24687 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024688 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024689#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024690_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024691
24692 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24693 then
24694 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024695 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024696#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024697_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024698
24699 else
24700 PY_UNICODE_TYPE="no type found"
24701 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024702 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24703echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024704fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024705
24706# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024707{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24708echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024709if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024712 # See if sys/param.h defines the BYTE_ORDER macro.
24713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024714/* confdefs.h. */
24715_ACEOF
24716cat confdefs.h >>conftest.$ac_ext
24717cat >>conftest.$ac_ext <<_ACEOF
24718/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024719#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024720#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024721
Martin v. Löwis11437992002-04-12 09:54:03 +000024722int
24723main ()
24724{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024725#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24726 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24727 bogus endian macros
24728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024729
24730 ;
24731 return 0;
24732}
24733_ACEOF
24734rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024735if { (ac_try="$ac_compile"
24736case "(($ac_try" in
24737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24738 *) ac_try_echo=$ac_try;;
24739esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024741 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024742 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024743 grep -v '^ *+' conftest.er1 >conftest.err
24744 rm -f conftest.er1
24745 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024747 (exit $ac_status); } && {
24748 test -z "$ac_c_werror_flag" ||
24749 test ! -s conftest.err
24750 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024751 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024753/* confdefs.h. */
24754_ACEOF
24755cat confdefs.h >>conftest.$ac_ext
24756cat >>conftest.$ac_ext <<_ACEOF
24757/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024758#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024759#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024760
Martin v. Löwis11437992002-04-12 09:54:03 +000024761int
24762main ()
24763{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024764#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024765 not big endian
24766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024767
24768 ;
24769 return 0;
24770}
24771_ACEOF
24772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024773if { (ac_try="$ac_compile"
24774case "(($ac_try" in
24775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24776 *) ac_try_echo=$ac_try;;
24777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024781 grep -v '^ *+' conftest.er1 >conftest.err
24782 rm -f conftest.er1
24783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024785 (exit $ac_status); } && {
24786 test -z "$ac_c_werror_flag" ||
24787 test ! -s conftest.err
24788 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024789 ac_cv_c_bigendian=yes
24790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024792sed 's/^/| /' conftest.$ac_ext >&5
24793
Martin v. Löwiseba40652007-08-30 20:10:57 +000024794 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024796
24797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024800sed 's/^/| /' conftest.$ac_ext >&5
24801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024802 # It does not; compile a test program.
24803if test "$cross_compiling" = yes; then
24804 # try to guess the endianness by grepping values into an object file
24805 ac_cv_c_bigendian=unknown
24806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024807/* confdefs.h. */
24808_ACEOF
24809cat confdefs.h >>conftest.$ac_ext
24810cat >>conftest.$ac_ext <<_ACEOF
24811/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024812short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24813short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24814void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24815short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24816short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24817void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024818int
24819main ()
24820{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024821 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024822 ;
24823 return 0;
24824}
24825_ACEOF
24826rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827if { (ac_try="$ac_compile"
24828case "(($ac_try" in
24829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24830 *) ac_try_echo=$ac_try;;
24831esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024835 grep -v '^ *+' conftest.er1 >conftest.err
24836 rm -f conftest.er1
24837 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024839 (exit $ac_status); } && {
24840 test -z "$ac_c_werror_flag" ||
24841 test ! -s conftest.err
24842 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024843 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024844 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024846if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24847 if test "$ac_cv_c_bigendian" = unknown; then
24848 ac_cv_c_bigendian=no
24849 else
24850 # finding both strings is unlikely to happen, but who knows?
24851 ac_cv_c_bigendian=unknown
24852 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024853fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024856sed 's/^/| /' conftest.$ac_ext >&5
24857
Martin v. Löwiseba40652007-08-30 20:10:57 +000024858
Martin v. Löwis11437992002-04-12 09:54:03 +000024859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024860
24861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024862else
24863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024864/* confdefs.h. */
24865_ACEOF
24866cat confdefs.h >>conftest.$ac_ext
24867cat >>conftest.$ac_ext <<_ACEOF
24868/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024869$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024870int
24871main ()
24872{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024873
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024874 /* Are we little or big endian? From Harbison&Steele. */
24875 union
24876 {
24877 long int l;
24878 char c[sizeof (long int)];
24879 } u;
24880 u.l = 1;
24881 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024882
24883 ;
24884 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024885}
Martin v. Löwis11437992002-04-12 09:54:03 +000024886_ACEOF
24887rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888if { (ac_try="$ac_link"
24889case "(($ac_try" in
24890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24891 *) ac_try_echo=$ac_try;;
24892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024894 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024895 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024897 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024898 { (case "(($ac_try" in
24899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24900 *) ac_try_echo=$ac_try;;
24901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024903 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024906 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024907 ac_cv_c_bigendian=no
24908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024909 echo "$as_me: program exited with status $ac_status" >&5
24910echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024911sed 's/^/| /' conftest.$ac_ext >&5
24912
Martin v. Löwis11437992002-04-12 09:54:03 +000024913( exit $ac_status )
24914ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024916rm -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 +000024917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024918
24919
Martin v. Löwis11437992002-04-12 09:54:03 +000024920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024921
24922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24923fi
24924{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24925echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24926case $ac_cv_c_bigendian in
24927 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024928
24929cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024930#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024931_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024932 ;;
24933 no)
24934 ;;
24935 *)
24936 { { echo "$as_me:$LINENO: error: unknown endianness
24937presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24938echo "$as_me: error: unknown endianness
24939presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024940 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024942
Michael W. Hudson54241132001-12-07 15:38:26 +000024943
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024944# Check whether right shifting a negative integer extends the sign bit
24945# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024946{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24947echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024948if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024949 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024950else
Martin v. Löwis11437992002-04-12 09:54:03 +000024951
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024952if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024953 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024954else
Martin v. Löwis11437992002-04-12 09:54:03 +000024955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024956/* confdefs.h. */
24957_ACEOF
24958cat confdefs.h >>conftest.$ac_ext
24959cat >>conftest.$ac_ext <<_ACEOF
24960/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024961
24962int main()
24963{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024964 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024965}
24966
Martin v. Löwis11437992002-04-12 09:54:03 +000024967_ACEOF
24968rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024969if { (ac_try="$ac_link"
24970case "(($ac_try" in
24971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24972 *) ac_try_echo=$ac_try;;
24973esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024976 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024978 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024979 { (case "(($ac_try" in
24980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24981 *) ac_try_echo=$ac_try;;
24982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024984 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024985 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024987 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024988 ac_cv_rshift_extends_sign=yes
24989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024990 echo "$as_me: program exited with status $ac_status" >&5
24991echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024992sed 's/^/| /' conftest.$ac_ext >&5
24993
Martin v. Löwis11437992002-04-12 09:54:03 +000024994( exit $ac_status )
24995ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024997rm -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 +000024998fi
24999
Martin v. Löwiseba40652007-08-30 20:10:57 +000025000
25001fi
25002
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025003{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25004echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025005if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025006then
Martin v. Löwis11437992002-04-12 09:54:03 +000025007
25008cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025009#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025010_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025011
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025012fi
25013
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025014# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025015{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25016echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025017if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025018 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025019else
Martin v. Löwis11437992002-04-12 09:54:03 +000025020
25021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025022/* confdefs.h. */
25023_ACEOF
25024cat confdefs.h >>conftest.$ac_ext
25025cat >>conftest.$ac_ext <<_ACEOF
25026/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025027#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025028int
25029main ()
25030{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025031
25032 FILE *f = fopen("/dev/null", "r");
25033 flockfile(f);
25034 getc_unlocked(f);
25035 funlockfile(f);
25036
Martin v. Löwis11437992002-04-12 09:54:03 +000025037 ;
25038 return 0;
25039}
25040_ACEOF
25041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025042if { (ac_try="$ac_link"
25043case "(($ac_try" in
25044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25045 *) ac_try_echo=$ac_try;;
25046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025050 grep -v '^ *+' conftest.er1 >conftest.err
25051 rm -f conftest.er1
25052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025054 (exit $ac_status); } && {
25055 test -z "$ac_c_werror_flag" ||
25056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025057 } && test -s conftest$ac_exeext &&
25058 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025059 ac_cv_have_getc_unlocked=yes
25060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025062sed 's/^/| /' conftest.$ac_ext >&5
25063
Martin v. Löwiseba40652007-08-30 20:10:57 +000025064 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066
25067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025068 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025069fi
25070
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025071{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25072echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025073if test "$ac_cv_have_getc_unlocked" = yes
25074then
Martin v. Löwis11437992002-04-12 09:54:03 +000025075
25076cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025077#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025078_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025079
25080fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025081
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025082# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025083# save the value of LIBS so we don't actually link Python with readline
25084LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025085
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025086# On some systems we need to link readline to a termcap compatible
25087# library. NOTE: Keep the precedence of listed libraries synchronised
25088# with setup.py.
25089py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025090{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25091echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025092for py_libtermcap in "" ncursesw ncurses curses termcap; do
25093 if test -z "$py_libtermcap"; then
25094 READLINE_LIBS="-lreadline"
25095 else
25096 READLINE_LIBS="-lreadline -l$py_libtermcap"
25097 fi
25098 LIBS="$READLINE_LIBS $LIBS_no_readline"
25099 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025100/* confdefs.h. */
25101_ACEOF
25102cat confdefs.h >>conftest.$ac_ext
25103cat >>conftest.$ac_ext <<_ACEOF
25104/* end confdefs.h. */
25105
Martin v. Löwiseba40652007-08-30 20:10:57 +000025106/* Override any GCC internal prototype to avoid an error.
25107 Use char because int might match the return type of a GCC
25108 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025109#ifdef __cplusplus
25110extern "C"
25111#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025112char readline ();
25113int
25114main ()
25115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025116return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025117 ;
25118 return 0;
25119}
25120_ACEOF
25121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025122if { (ac_try="$ac_link"
25123case "(($ac_try" in
25124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25125 *) ac_try_echo=$ac_try;;
25126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025128 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025129 ac_status=$?
25130 grep -v '^ *+' conftest.er1 >conftest.err
25131 rm -f conftest.er1
25132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134 (exit $ac_status); } && {
25135 test -z "$ac_c_werror_flag" ||
25136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025137 } && test -s conftest$ac_exeext &&
25138 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025139 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025141 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025142sed 's/^/| /' conftest.$ac_ext >&5
25143
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025144
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146
25147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025148 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025149 if test $py_cv_lib_readline = yes; then
25150 break
25151 fi
25152done
25153# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25154#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000025155if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025156 { echo "$as_me:$LINENO: result: none" >&5
25157echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025158else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025159 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25160echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000025161
25162cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025163#define HAVE_LIBREADLINE 1
25164_ACEOF
25165
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025166fi
25167
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025168# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025169{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25170echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025171if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025172 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025173else
25174 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025175LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025176cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025177/* confdefs.h. */
25178_ACEOF
25179cat confdefs.h >>conftest.$ac_ext
25180cat >>conftest.$ac_ext <<_ACEOF
25181/* end confdefs.h. */
25182
Martin v. Löwiseba40652007-08-30 20:10:57 +000025183/* Override any GCC internal prototype to avoid an error.
25184 Use char because int might match the return type of a GCC
25185 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025186#ifdef __cplusplus
25187extern "C"
25188#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025189char rl_callback_handler_install ();
25190int
25191main ()
25192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025193return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025194 ;
25195 return 0;
25196}
25197_ACEOF
25198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025199if { (ac_try="$ac_link"
25200case "(($ac_try" in
25201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25202 *) ac_try_echo=$ac_try;;
25203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025205 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025207 grep -v '^ *+' conftest.er1 >conftest.err
25208 rm -f conftest.er1
25209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025211 (exit $ac_status); } && {
25212 test -z "$ac_c_werror_flag" ||
25213 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025214 } && test -s conftest$ac_exeext &&
25215 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025216 ac_cv_lib_readline_rl_callback_handler_install=yes
25217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025218 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025219sed 's/^/| /' conftest.$ac_ext >&5
25220
Martin v. Löwiseba40652007-08-30 20:10:57 +000025221 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025223
25224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025225 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025226LIBS=$ac_check_lib_save_LIBS
25227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025228{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25229echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25230if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025231
25232cat >>confdefs.h <<\_ACEOF
25233#define HAVE_RL_CALLBACK 1
25234_ACEOF
25235
25236fi
25237
25238
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025239# check for readline 2.2
25240cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025241/* confdefs.h. */
25242_ACEOF
25243cat confdefs.h >>conftest.$ac_ext
25244cat >>conftest.$ac_ext <<_ACEOF
25245/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025246#include <readline/readline.h>
25247_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248if { (ac_try="$ac_cpp conftest.$ac_ext"
25249case "(($ac_try" in
25250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25251 *) ac_try_echo=$ac_try;;
25252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025254 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025255 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025256 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025257 rm -f conftest.er1
25258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025260 (exit $ac_status); } >/dev/null && {
25261 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25262 test ! -s conftest.err
25263 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025264 have_readline=yes
25265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025267sed 's/^/| /' conftest.$ac_ext >&5
25268
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025269 have_readline=no
25270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025271
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025272rm -f conftest.err conftest.$ac_ext
25273if test $have_readline = yes
25274then
25275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025276/* confdefs.h. */
25277_ACEOF
25278cat confdefs.h >>conftest.$ac_ext
25279cat >>conftest.$ac_ext <<_ACEOF
25280/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025281#include <readline/readline.h>
25282
25283_ACEOF
25284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025285 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025286
25287cat >>confdefs.h <<\_ACEOF
25288#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25289_ACEOF
25290
25291fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025292rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025293
25294fi
25295
Martin v. Löwis0daad592001-09-30 21:09:59 +000025296# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025297{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25298echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025299if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025301else
Martin v. Löwis11437992002-04-12 09:54:03 +000025302 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025303LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025305/* confdefs.h. */
25306_ACEOF
25307cat confdefs.h >>conftest.$ac_ext
25308cat >>conftest.$ac_ext <<_ACEOF
25309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025310
Martin v. Löwiseba40652007-08-30 20:10:57 +000025311/* Override any GCC internal prototype to avoid an error.
25312 Use char because int might match the return type of a GCC
25313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025314#ifdef __cplusplus
25315extern "C"
25316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025317char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025318int
25319main ()
25320{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025321return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025322 ;
25323 return 0;
25324}
25325_ACEOF
25326rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327if { (ac_try="$ac_link"
25328case "(($ac_try" in
25329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25330 *) ac_try_echo=$ac_try;;
25331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025335 grep -v '^ *+' conftest.er1 >conftest.err
25336 rm -f conftest.er1
25337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025339 (exit $ac_status); } && {
25340 test -z "$ac_c_werror_flag" ||
25341 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025342 } && test -s conftest$ac_exeext &&
25343 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025345else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025346 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025347sed 's/^/| /' conftest.$ac_ext >&5
25348
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351
25352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025353 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025354LIBS=$ac_check_lib_save_LIBS
25355fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025356{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25357echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25358if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025359
Martin v. Löwis11437992002-04-12 09:54:03 +000025360cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025361#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025362_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025363
Martin v. Löwis0daad592001-09-30 21:09:59 +000025364fi
25365
Michael W. Hudson54241132001-12-07 15:38:26 +000025366
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025367# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25369echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025370if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025371 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025372else
25373 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025374LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025375cat >conftest.$ac_ext <<_ACEOF
25376/* confdefs.h. */
25377_ACEOF
25378cat confdefs.h >>conftest.$ac_ext
25379cat >>conftest.$ac_ext <<_ACEOF
25380/* end confdefs.h. */
25381
25382/* Override any GCC internal prototype to avoid an error.
25383 Use char because int might match the return type of a GCC
25384 builtin and then its argument prototype would still apply. */
25385#ifdef __cplusplus
25386extern "C"
25387#endif
25388char rl_completion_display_matches_hook ();
25389int
25390main ()
25391{
25392return rl_completion_display_matches_hook ();
25393 ;
25394 return 0;
25395}
25396_ACEOF
25397rm -f conftest.$ac_objext conftest$ac_exeext
25398if { (ac_try="$ac_link"
25399case "(($ac_try" in
25400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25401 *) ac_try_echo=$ac_try;;
25402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025404 (eval "$ac_link") 2>conftest.er1
25405 ac_status=$?
25406 grep -v '^ *+' conftest.er1 >conftest.err
25407 rm -f conftest.er1
25408 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025410 (exit $ac_status); } && {
25411 test -z "$ac_c_werror_flag" ||
25412 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025413 } && test -s conftest$ac_exeext &&
25414 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025415 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25416else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025417 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025418sed 's/^/| /' conftest.$ac_ext >&5
25419
25420 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25421fi
25422
25423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25424 conftest$ac_exeext conftest.$ac_ext
25425LIBS=$ac_check_lib_save_LIBS
25426fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025427{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25428echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25429if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025430
25431cat >>confdefs.h <<\_ACEOF
25432#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25433_ACEOF
25434
25435fi
25436
25437
Martin v. Löwis0daad592001-09-30 21:09:59 +000025438# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025439{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25440echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025441if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025442 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025443else
Martin v. Löwis11437992002-04-12 09:54:03 +000025444 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025445LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025446cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025447/* confdefs.h. */
25448_ACEOF
25449cat confdefs.h >>conftest.$ac_ext
25450cat >>conftest.$ac_ext <<_ACEOF
25451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025452
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453/* Override any GCC internal prototype to avoid an error.
25454 Use char because int might match the return type of a GCC
25455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025456#ifdef __cplusplus
25457extern "C"
25458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025459char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025460int
25461main ()
25462{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025463return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025464 ;
25465 return 0;
25466}
25467_ACEOF
25468rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025469if { (ac_try="$ac_link"
25470case "(($ac_try" in
25471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25472 *) ac_try_echo=$ac_try;;
25473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025477 grep -v '^ *+' conftest.er1 >conftest.err
25478 rm -f conftest.er1
25479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025481 (exit $ac_status); } && {
25482 test -z "$ac_c_werror_flag" ||
25483 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025484 } && test -s conftest$ac_exeext &&
25485 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025489sed 's/^/| /' conftest.$ac_ext >&5
25490
Martin v. Löwiseba40652007-08-30 20:10:57 +000025491 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025493
25494rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025496LIBS=$ac_check_lib_save_LIBS
25497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025498{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25499echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25500if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025501
Martin v. Löwis11437992002-04-12 09:54:03 +000025502cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025503#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025504_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025505
Guido van Rossum353ae582001-07-10 16:45:32 +000025506fi
25507
Jack Jansendd19cf82001-12-06 22:36:17 +000025508
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025509# also in readline 4.2
25510cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025511/* confdefs.h. */
25512_ACEOF
25513cat confdefs.h >>conftest.$ac_ext
25514cat >>conftest.$ac_ext <<_ACEOF
25515/* end confdefs.h. */
25516#include <readline/readline.h>
25517_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518if { (ac_try="$ac_cpp conftest.$ac_ext"
25519case "(($ac_try" in
25520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25521 *) ac_try_echo=$ac_try;;
25522esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025524 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025525 ac_status=$?
25526 grep -v '^ *+' conftest.er1 >conftest.err
25527 rm -f conftest.er1
25528 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025530 (exit $ac_status); } >/dev/null && {
25531 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25532 test ! -s conftest.err
25533 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025534 have_readline=yes
25535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025536 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025537sed 's/^/| /' conftest.$ac_ext >&5
25538
25539 have_readline=no
25540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025542rm -f conftest.err conftest.$ac_ext
25543if test $have_readline = yes
25544then
25545 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025546/* confdefs.h. */
25547_ACEOF
25548cat confdefs.h >>conftest.$ac_ext
25549cat >>conftest.$ac_ext <<_ACEOF
25550/* end confdefs.h. */
25551#include <readline/readline.h>
25552
25553_ACEOF
25554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25555 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25556
25557cat >>confdefs.h <<\_ACEOF
25558#define HAVE_RL_CATCH_SIGNAL 1
25559_ACEOF
25560
25561fi
Ronald Oussoren25967582009-09-06 10:00:26 +000025562rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025563
25564fi
25565
Martin v. Löwis82bca632006-02-10 20:49:30 +000025566# End of readline checks: restore LIBS
25567LIBS=$LIBS_no_readline
25568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025569{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25570echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025571if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025572 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025573else
Martin v. Löwis11437992002-04-12 09:54:03 +000025574
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025575if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025576 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025577else
Martin v. Löwis11437992002-04-12 09:54:03 +000025578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025579/* confdefs.h. */
25580_ACEOF
25581cat confdefs.h >>conftest.$ac_ext
25582cat >>conftest.$ac_ext <<_ACEOF
25583/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025584
25585int main()
25586{
25587 int val1 = nice(1);
25588 if (val1 != -1 && val1 == nice(2))
25589 exit(0);
25590 exit(1);
25591}
25592
Martin v. Löwis11437992002-04-12 09:54:03 +000025593_ACEOF
25594rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025595if { (ac_try="$ac_link"
25596case "(($ac_try" in
25597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25598 *) ac_try_echo=$ac_try;;
25599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025601 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025602 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025605 { (case "(($ac_try" in
25606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25607 *) ac_try_echo=$ac_try;;
25608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025610 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025611 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025613 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025614 ac_cv_broken_nice=yes
25615else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025616 echo "$as_me: program exited with status $ac_status" >&5
25617echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025618sed 's/^/| /' conftest.$ac_ext >&5
25619
Martin v. Löwis11437992002-04-12 09:54:03 +000025620( exit $ac_status )
25621ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025623rm -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 +000025624fi
25625
Martin v. Löwiseba40652007-08-30 20:10:57 +000025626
25627fi
25628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025629{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25630echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025631if test "$ac_cv_broken_nice" = yes
25632then
Martin v. Löwis11437992002-04-12 09:54:03 +000025633
25634cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025635#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025636_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025637
25638fi
25639
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025640{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25641echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025642if test "${ac_cv_broken_poll+set}" = set; then
25643 echo $ECHO_N "(cached) $ECHO_C" >&6
25644else
25645 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025646 ac_cv_broken_poll=no
25647else
25648 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025649/* confdefs.h. */
25650_ACEOF
25651cat confdefs.h >>conftest.$ac_ext
25652cat >>conftest.$ac_ext <<_ACEOF
25653/* end confdefs.h. */
25654
25655#include <poll.h>
25656
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025657int main()
25658{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025659 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025660 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025661
25662 close (42);
25663
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025664 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025665 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025666 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025667 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025668 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025669 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025670 return 1;
25671}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025672
25673_ACEOF
25674rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025675if { (ac_try="$ac_link"
25676case "(($ac_try" in
25677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25678 *) ac_try_echo=$ac_try;;
25679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025681 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025682 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025685 { (case "(($ac_try" in
25686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25687 *) ac_try_echo=$ac_try;;
25688esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025690 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025691 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025693 (exit $ac_status); }; }; then
25694 ac_cv_broken_poll=yes
25695else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696 echo "$as_me: program exited with status $ac_status" >&5
25697echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025698sed 's/^/| /' conftest.$ac_ext >&5
25699
25700( exit $ac_status )
25701ac_cv_broken_poll=no
25702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025703rm -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 +000025704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025705
25706
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025707fi
25708
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025709{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25710echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025711if test "$ac_cv_broken_poll" = yes
25712then
25713
25714cat >>confdefs.h <<\_ACEOF
25715#define HAVE_BROKEN_POLL 1
25716_ACEOF
25717
25718fi
25719
Brett Cannon43802422005-02-10 20:48:03 +000025720# 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 +000025721# (which is not required by ISO C or UNIX spec) and/or if we support
25722# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025723{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25724echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025725if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025726 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025727else
25728 cat >conftest.$ac_ext <<_ACEOF
25729/* confdefs.h. */
25730_ACEOF
25731cat confdefs.h >>conftest.$ac_ext
25732cat >>conftest.$ac_ext <<_ACEOF
25733/* end confdefs.h. */
25734#include <sys/types.h>
25735#include <$ac_cv_struct_tm>
25736
25737
25738int
25739main ()
25740{
25741static struct tm ac_aggr;
25742if (ac_aggr.tm_zone)
25743return 0;
25744 ;
25745 return 0;
25746}
25747_ACEOF
25748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025749if { (ac_try="$ac_compile"
25750case "(($ac_try" in
25751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25752 *) ac_try_echo=$ac_try;;
25753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025755 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025756 ac_status=$?
25757 grep -v '^ *+' conftest.er1 >conftest.err
25758 rm -f conftest.er1
25759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025761 (exit $ac_status); } && {
25762 test -z "$ac_c_werror_flag" ||
25763 test ! -s conftest.err
25764 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025765 ac_cv_member_struct_tm_tm_zone=yes
25766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025767 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025768sed 's/^/| /' conftest.$ac_ext >&5
25769
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025771/* confdefs.h. */
25772_ACEOF
25773cat confdefs.h >>conftest.$ac_ext
25774cat >>conftest.$ac_ext <<_ACEOF
25775/* end confdefs.h. */
25776#include <sys/types.h>
25777#include <$ac_cv_struct_tm>
25778
25779
25780int
25781main ()
25782{
25783static struct tm ac_aggr;
25784if (sizeof ac_aggr.tm_zone)
25785return 0;
25786 ;
25787 return 0;
25788}
25789_ACEOF
25790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025791if { (ac_try="$ac_compile"
25792case "(($ac_try" in
25793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25794 *) ac_try_echo=$ac_try;;
25795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025797 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025798 ac_status=$?
25799 grep -v '^ *+' conftest.er1 >conftest.err
25800 rm -f conftest.er1
25801 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025803 (exit $ac_status); } && {
25804 test -z "$ac_c_werror_flag" ||
25805 test ! -s conftest.err
25806 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025807 ac_cv_member_struct_tm_tm_zone=yes
25808else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025809 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025810sed 's/^/| /' conftest.$ac_ext >&5
25811
Martin v. Löwiseba40652007-08-30 20:10:57 +000025812 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025814
25815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025817
25818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025819fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025820{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25821echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25822if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025823
25824cat >>confdefs.h <<_ACEOF
25825#define HAVE_STRUCT_TM_TM_ZONE 1
25826_ACEOF
25827
25828
25829fi
25830
25831if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25832
25833cat >>confdefs.h <<\_ACEOF
25834#define HAVE_TM_ZONE 1
25835_ACEOF
25836
25837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025838 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25839echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025842else
25843 cat >conftest.$ac_ext <<_ACEOF
25844/* confdefs.h. */
25845_ACEOF
25846cat confdefs.h >>conftest.$ac_ext
25847cat >>conftest.$ac_ext <<_ACEOF
25848/* end confdefs.h. */
25849#include <time.h>
25850
25851int
25852main ()
25853{
25854#ifndef tzname
25855 (void) tzname;
25856#endif
25857
25858 ;
25859 return 0;
25860}
25861_ACEOF
25862rm -f conftest.$ac_objext
25863if { (ac_try="$ac_compile"
25864case "(($ac_try" in
25865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25866 *) ac_try_echo=$ac_try;;
25867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025869 (eval "$ac_compile") 2>conftest.er1
25870 ac_status=$?
25871 grep -v '^ *+' conftest.er1 >conftest.err
25872 rm -f conftest.er1
25873 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025875 (exit $ac_status); } && {
25876 test -z "$ac_c_werror_flag" ||
25877 test ! -s conftest.err
25878 } && test -s conftest.$ac_objext; then
25879 ac_cv_have_decl_tzname=yes
25880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025881 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025882sed 's/^/| /' conftest.$ac_ext >&5
25883
25884 ac_cv_have_decl_tzname=no
25885fi
25886
25887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025889{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25890echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25891if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025892
25893cat >>confdefs.h <<_ACEOF
25894#define HAVE_DECL_TZNAME 1
25895_ACEOF
25896
25897
25898else
25899 cat >>confdefs.h <<_ACEOF
25900#define HAVE_DECL_TZNAME 0
25901_ACEOF
25902
25903
25904fi
25905
25906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025907 { echo "$as_me:$LINENO: checking for tzname" >&5
25908echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025909if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025910 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025911else
25912 cat >conftest.$ac_ext <<_ACEOF
25913/* confdefs.h. */
25914_ACEOF
25915cat confdefs.h >>conftest.$ac_ext
25916cat >>conftest.$ac_ext <<_ACEOF
25917/* end confdefs.h. */
25918#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025919#if !HAVE_DECL_TZNAME
25920extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025921#endif
25922
25923int
25924main ()
25925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025926return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025927 ;
25928 return 0;
25929}
25930_ACEOF
25931rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025932if { (ac_try="$ac_link"
25933case "(($ac_try" in
25934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25935 *) ac_try_echo=$ac_try;;
25936esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025938 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025939 ac_status=$?
25940 grep -v '^ *+' conftest.er1 >conftest.err
25941 rm -f conftest.er1
25942 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025944 (exit $ac_status); } && {
25945 test -z "$ac_c_werror_flag" ||
25946 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025947 } && test -s conftest$ac_exeext &&
25948 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025949 ac_cv_var_tzname=yes
25950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025951 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025952sed 's/^/| /' conftest.$ac_ext >&5
25953
Martin v. Löwiseba40652007-08-30 20:10:57 +000025954 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025956
25957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025958 conftest$ac_exeext conftest.$ac_ext
25959fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025960{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25961echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025962 if test $ac_cv_var_tzname = yes; then
25963
25964cat >>confdefs.h <<\_ACEOF
25965#define HAVE_TZNAME 1
25966_ACEOF
25967
25968 fi
25969fi
25970
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025971
Martin v. Löwis1d459062005-03-14 21:23:33 +000025972# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025973{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25974echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025975if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025976 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025977else
25978
25979if test "$cross_compiling" = yes; then
25980 ac_cv_working_tzset=no
25981else
25982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025983/* confdefs.h. */
25984_ACEOF
25985cat confdefs.h >>conftest.$ac_ext
25986cat >>conftest.$ac_ext <<_ACEOF
25987/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025988
25989#include <stdlib.h>
25990#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025991#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025992
25993#if HAVE_TZNAME
25994extern char *tzname[];
25995#endif
25996
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025997int main()
25998{
Brett Cannon18367812003-09-19 00:59:16 +000025999 /* Note that we need to ensure that not only does tzset(3)
26000 do 'something' with localtime, but it works as documented
26001 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026002 This includes making sure that tzname is set properly if
26003 tm->tm_zone does not exist since it is the alternative way
26004 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026005
26006 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026007 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026008 */
26009
Martin v. Löwis1d459062005-03-14 21:23:33 +000026010 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026011 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26012
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026013 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026014 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026015 if (localtime(&groundhogday)->tm_hour != 0)
26016 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026017#if HAVE_TZNAME
26018 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26019 if (strcmp(tzname[0], "UTC") ||
26020 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26021 exit(1);
26022#endif
Brett Cannon18367812003-09-19 00:59:16 +000026023
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026024 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026025 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026026 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026027 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026028#if HAVE_TZNAME
26029 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26030 exit(1);
26031#endif
Brett Cannon18367812003-09-19 00:59:16 +000026032
26033 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26034 tzset();
26035 if (localtime(&groundhogday)->tm_hour != 11)
26036 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026037#if HAVE_TZNAME
26038 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26039 exit(1);
26040#endif
26041
26042#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026043 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26044 exit(1);
26045 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26046 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026047#endif
Brett Cannon18367812003-09-19 00:59:16 +000026048
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026049 exit(0);
26050}
26051
26052_ACEOF
26053rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054if { (ac_try="$ac_link"
26055case "(($ac_try" in
26056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26057 *) ac_try_echo=$ac_try;;
26058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026060 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026061 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026064 { (case "(($ac_try" in
26065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26066 *) ac_try_echo=$ac_try;;
26067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026069 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026070 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026072 (exit $ac_status); }; }; then
26073 ac_cv_working_tzset=yes
26074else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026075 echo "$as_me: program exited with status $ac_status" >&5
26076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026077sed 's/^/| /' conftest.$ac_ext >&5
26078
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026079( exit $ac_status )
26080ac_cv_working_tzset=no
26081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026082rm -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 +000026083fi
26084
Martin v. Löwiseba40652007-08-30 20:10:57 +000026085
26086fi
26087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026088{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26089echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026090if test "$ac_cv_working_tzset" = yes
26091then
26092
26093cat >>confdefs.h <<\_ACEOF
26094#define HAVE_WORKING_TZSET 1
26095_ACEOF
26096
26097fi
26098
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026099# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026100{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26101echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026102if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026103 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026104else
26105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026106/* confdefs.h. */
26107_ACEOF
26108cat confdefs.h >>conftest.$ac_ext
26109cat >>conftest.$ac_ext <<_ACEOF
26110/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026111#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026112int
26113main ()
26114{
26115
26116struct stat st;
26117st.st_mtim.tv_nsec = 1;
26118
26119 ;
26120 return 0;
26121}
26122_ACEOF
26123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026124if { (ac_try="$ac_compile"
26125case "(($ac_try" in
26126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26127 *) ac_try_echo=$ac_try;;
26128esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026132 grep -v '^ *+' conftest.er1 >conftest.err
26133 rm -f conftest.er1
26134 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026136 (exit $ac_status); } && {
26137 test -z "$ac_c_werror_flag" ||
26138 test ! -s conftest.err
26139 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026140 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026141else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026142 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026143sed 's/^/| /' conftest.$ac_ext >&5
26144
Martin v. Löwiseba40652007-08-30 20:10:57 +000026145 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026146fi
26147
Martin v. Löwiseba40652007-08-30 20:10:57 +000026148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26149fi
26150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026151{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26152echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026153if test "$ac_cv_stat_tv_nsec" = yes
26154then
26155
26156cat >>confdefs.h <<\_ACEOF
26157#define HAVE_STAT_TV_NSEC 1
26158_ACEOF
26159
26160fi
26161
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026162# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026163{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26164echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026165if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026166 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026167else
26168 cat >conftest.$ac_ext <<_ACEOF
26169/* confdefs.h. */
26170_ACEOF
26171cat confdefs.h >>conftest.$ac_ext
26172cat >>conftest.$ac_ext <<_ACEOF
26173/* end confdefs.h. */
26174#include <sys/stat.h>
26175int
26176main ()
26177{
26178
26179struct stat st;
26180st.st_mtimespec.tv_nsec = 1;
26181
26182 ;
26183 return 0;
26184}
26185_ACEOF
26186rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026187if { (ac_try="$ac_compile"
26188case "(($ac_try" in
26189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26190 *) ac_try_echo=$ac_try;;
26191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026194 ac_status=$?
26195 grep -v '^ *+' conftest.er1 >conftest.err
26196 rm -f conftest.er1
26197 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026199 (exit $ac_status); } && {
26200 test -z "$ac_c_werror_flag" ||
26201 test ! -s conftest.err
26202 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026203 ac_cv_stat_tv_nsec2=yes
26204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026205 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026206sed 's/^/| /' conftest.$ac_ext >&5
26207
Martin v. Löwiseba40652007-08-30 20:10:57 +000026208 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026209fi
26210
Martin v. Löwiseba40652007-08-30 20:10:57 +000026211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26212fi
26213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026214{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26215echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026216if test "$ac_cv_stat_tv_nsec2" = yes
26217then
26218
26219cat >>confdefs.h <<\_ACEOF
26220#define HAVE_STAT_TV_NSEC2 1
26221_ACEOF
26222
26223fi
26224
Jack Jansen666b1e72001-10-31 12:11:48 +000026225# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026226{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26227echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026228if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026229 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026230else
Martin v. Löwis11437992002-04-12 09:54:03 +000026231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026232/* confdefs.h. */
26233_ACEOF
26234cat confdefs.h >>conftest.$ac_ext
26235cat >>conftest.$ac_ext <<_ACEOF
26236/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026237#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026238int
26239main ()
26240{
Jack Jansen666b1e72001-10-31 12:11:48 +000026241
26242 int rtn;
26243 rtn = mvwdelch(0,0,0);
26244
Martin v. Löwis11437992002-04-12 09:54:03 +000026245 ;
26246 return 0;
26247}
26248_ACEOF
26249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026250if { (ac_try="$ac_compile"
26251case "(($ac_try" in
26252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26253 *) ac_try_echo=$ac_try;;
26254esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026258 grep -v '^ *+' conftest.er1 >conftest.err
26259 rm -f conftest.er1
26260 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026262 (exit $ac_status); } && {
26263 test -z "$ac_c_werror_flag" ||
26264 test ! -s conftest.err
26265 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026266 ac_cv_mvwdelch_is_expression=yes
26267else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026269sed 's/^/| /' conftest.$ac_ext >&5
26270
Martin v. Löwiseba40652007-08-30 20:10:57 +000026271 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026272fi
26273
Martin v. Löwiseba40652007-08-30 20:10:57 +000026274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26275fi
26276
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026277{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26278echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026279
26280if test "$ac_cv_mvwdelch_is_expression" = yes
26281then
Martin v. Löwis11437992002-04-12 09:54:03 +000026282
26283cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026284#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026285_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026286
26287fi
26288
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026289{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26290echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026291if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026292 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026293else
Martin v. Löwis11437992002-04-12 09:54:03 +000026294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026295/* confdefs.h. */
26296_ACEOF
26297cat confdefs.h >>conftest.$ac_ext
26298cat >>conftest.$ac_ext <<_ACEOF
26299/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026300#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026301int
26302main ()
26303{
Jack Jansen666b1e72001-10-31 12:11:48 +000026304
26305 WINDOW *w;
26306 w->_flags = 0;
26307
Martin v. Löwis11437992002-04-12 09:54:03 +000026308 ;
26309 return 0;
26310}
26311_ACEOF
26312rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026313if { (ac_try="$ac_compile"
26314case "(($ac_try" in
26315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26316 *) ac_try_echo=$ac_try;;
26317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026319 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026321 grep -v '^ *+' conftest.er1 >conftest.err
26322 rm -f conftest.er1
26323 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026325 (exit $ac_status); } && {
26326 test -z "$ac_c_werror_flag" ||
26327 test ! -s conftest.err
26328 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026329 ac_cv_window_has_flags=yes
26330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026332sed 's/^/| /' conftest.$ac_ext >&5
26333
Martin v. Löwiseba40652007-08-30 20:10:57 +000026334 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026335fi
26336
Martin v. Löwiseba40652007-08-30 20:10:57 +000026337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26338fi
26339
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026340{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26341echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026342
Jack Jansen666b1e72001-10-31 12:11:48 +000026343
26344if test "$ac_cv_window_has_flags" = yes
26345then
Martin v. Löwis11437992002-04-12 09:54:03 +000026346
26347cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026348#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026349_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026350
26351fi
26352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026353{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26354echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026355cat >conftest.$ac_ext <<_ACEOF
26356/* confdefs.h. */
26357_ACEOF
26358cat confdefs.h >>conftest.$ac_ext
26359cat >>conftest.$ac_ext <<_ACEOF
26360/* end confdefs.h. */
26361#include <curses.h>
26362int
26363main ()
26364{
26365void *x=is_term_resized
26366 ;
26367 return 0;
26368}
26369_ACEOF
26370rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026371if { (ac_try="$ac_compile"
26372case "(($ac_try" in
26373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26374 *) ac_try_echo=$ac_try;;
26375esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026377 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026378 ac_status=$?
26379 grep -v '^ *+' conftest.er1 >conftest.err
26380 rm -f conftest.er1
26381 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026383 (exit $ac_status); } && {
26384 test -z "$ac_c_werror_flag" ||
26385 test ! -s conftest.err
26386 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026387
26388cat >>confdefs.h <<\_ACEOF
26389#define HAVE_CURSES_IS_TERM_RESIZED 1
26390_ACEOF
26391
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026392 { echo "$as_me:$LINENO: result: yes" >&5
26393echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026395 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026396sed 's/^/| /' conftest.$ac_ext >&5
26397
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026398 { echo "$as_me:$LINENO: result: no" >&5
26399echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026400
26401fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026402
Martin v. Löwiseba40652007-08-30 20:10:57 +000026403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026405{ echo "$as_me:$LINENO: checking for resize_term" >&5
26406echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026407cat >conftest.$ac_ext <<_ACEOF
26408/* confdefs.h. */
26409_ACEOF
26410cat confdefs.h >>conftest.$ac_ext
26411cat >>conftest.$ac_ext <<_ACEOF
26412/* end confdefs.h. */
26413#include <curses.h>
26414int
26415main ()
26416{
26417void *x=resize_term
26418 ;
26419 return 0;
26420}
26421_ACEOF
26422rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026423if { (ac_try="$ac_compile"
26424case "(($ac_try" in
26425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26426 *) ac_try_echo=$ac_try;;
26427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026429 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026430 ac_status=$?
26431 grep -v '^ *+' conftest.er1 >conftest.err
26432 rm -f conftest.er1
26433 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026435 (exit $ac_status); } && {
26436 test -z "$ac_c_werror_flag" ||
26437 test ! -s conftest.err
26438 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026439
26440cat >>confdefs.h <<\_ACEOF
26441#define HAVE_CURSES_RESIZE_TERM 1
26442_ACEOF
26443
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026444 { echo "$as_me:$LINENO: result: yes" >&5
26445echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026446else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026447 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026448sed 's/^/| /' conftest.$ac_ext >&5
26449
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026450 { echo "$as_me:$LINENO: result: no" >&5
26451echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026452
26453fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026454
Martin v. Löwiseba40652007-08-30 20:10:57 +000026455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026457{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26458echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026459cat >conftest.$ac_ext <<_ACEOF
26460/* confdefs.h. */
26461_ACEOF
26462cat confdefs.h >>conftest.$ac_ext
26463cat >>conftest.$ac_ext <<_ACEOF
26464/* end confdefs.h. */
26465#include <curses.h>
26466int
26467main ()
26468{
26469void *x=resizeterm
26470 ;
26471 return 0;
26472}
26473_ACEOF
26474rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026475if { (ac_try="$ac_compile"
26476case "(($ac_try" in
26477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26478 *) ac_try_echo=$ac_try;;
26479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026481 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026482 ac_status=$?
26483 grep -v '^ *+' conftest.er1 >conftest.err
26484 rm -f conftest.er1
26485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026487 (exit $ac_status); } && {
26488 test -z "$ac_c_werror_flag" ||
26489 test ! -s conftest.err
26490 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026491
26492cat >>confdefs.h <<\_ACEOF
26493#define HAVE_CURSES_RESIZETERM 1
26494_ACEOF
26495
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026496 { echo "$as_me:$LINENO: result: yes" >&5
26497echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026498else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026499 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026500sed 's/^/| /' conftest.$ac_ext >&5
26501
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026502 { echo "$as_me:$LINENO: result: no" >&5
26503echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026504
26505fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026506
Martin v. Löwiseba40652007-08-30 20:10:57 +000026507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026509{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26510echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026511
26512if test -r /dev/ptmx
26513then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026514 { echo "$as_me:$LINENO: result: yes" >&5
26515echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026516
26517cat >>confdefs.h <<\_ACEOF
26518#define HAVE_DEV_PTMX 1
26519_ACEOF
26520
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026522 { echo "$as_me:$LINENO: result: no" >&5
26523echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026524fi
26525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026526{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26527echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026528
26529if test -r /dev/ptc
26530then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026531 { echo "$as_me:$LINENO: result: yes" >&5
26532echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026533
26534cat >>confdefs.h <<\_ACEOF
26535#define HAVE_DEV_PTC 1
26536_ACEOF
26537
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026538else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026539 { echo "$as_me:$LINENO: result: no" >&5
26540echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026541fi
26542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026543{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26544echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026545if test "${ac_cv_have_size_t_format+set}" = set; then
26546 echo $ECHO_N "(cached) $ECHO_C" >&6
26547else
26548 if test "$cross_compiling" = yes; then
26549 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026550else
26551 cat >conftest.$ac_ext <<_ACEOF
26552/* confdefs.h. */
26553_ACEOF
26554cat confdefs.h >>conftest.$ac_ext
26555cat >>conftest.$ac_ext <<_ACEOF
26556/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026557
Brett Cannon09d12362006-05-11 05:11:33 +000026558#include <stdio.h>
26559#include <stddef.h>
26560#include <string.h>
26561
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026562#ifdef HAVE_SYS_TYPES_H
26563#include <sys/types.h>
26564#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026565
26566#ifdef HAVE_SSIZE_T
26567typedef ssize_t Py_ssize_t;
26568#elif SIZEOF_VOID_P == SIZEOF_LONG
26569typedef long Py_ssize_t;
26570#else
26571typedef int Py_ssize_t;
26572#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026573
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026574int main()
26575{
26576 char buffer[256];
26577
Brett Cannon09d12362006-05-11 05:11:33 +000026578 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26579 return 1;
26580
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026581 if (strcmp(buffer, "123"))
26582 return 1;
26583
26584 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26585 return 1;
26586
26587 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026588 return 1;
26589
26590 return 0;
26591}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026592
Brett Cannon09d12362006-05-11 05:11:33 +000026593_ACEOF
26594rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026595if { (ac_try="$ac_link"
26596case "(($ac_try" in
26597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26598 *) ac_try_echo=$ac_try;;
26599esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026601 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026602 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026605 { (case "(($ac_try" in
26606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26607 *) ac_try_echo=$ac_try;;
26608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026610 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026611 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026613 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026614 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026615else
26616 echo "$as_me: program exited with status $ac_status" >&5
26617echo "$as_me: failed program was:" >&5
26618sed 's/^/| /' conftest.$ac_ext >&5
26619
26620( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026621ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026622fi
26623rm -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 +000026624fi
26625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026626
26627
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026628fi
26629
26630{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26631echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26632if test $ac_cv_have_size_t_format = yes
26633then
26634
26635cat >>confdefs.h <<\_ACEOF
26636#define PY_FORMAT_SIZE_T "z"
26637_ACEOF
26638
26639fi
26640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26642echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026643if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026644 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026645else
Martin v. Löwis11437992002-04-12 09:54:03 +000026646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026647/* confdefs.h. */
26648_ACEOF
26649cat confdefs.h >>conftest.$ac_ext
26650cat >>conftest.$ac_ext <<_ACEOF
26651/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026652
26653#ifdef HAVE_SYS_TYPES_H
26654#include <sys/types.h>
26655#endif
26656#ifdef HAVE_SYS_SOCKET_H
26657#include <sys/socket.h>
26658#endif
26659
26660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026661typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026662int
26663main ()
26664{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026665if ((ac__type_new_ *) 0)
26666 return 0;
26667if (sizeof (ac__type_new_))
26668 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026669 ;
26670 return 0;
26671}
26672_ACEOF
26673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026674if { (ac_try="$ac_compile"
26675case "(($ac_try" in
26676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26677 *) ac_try_echo=$ac_try;;
26678esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026682 grep -v '^ *+' conftest.er1 >conftest.err
26683 rm -f conftest.er1
26684 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026686 (exit $ac_status); } && {
26687 test -z "$ac_c_werror_flag" ||
26688 test ! -s conftest.err
26689 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026690 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026693sed 's/^/| /' conftest.$ac_ext >&5
26694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026695 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026697
26698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026699fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026700{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26701echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26702if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026703 :
26704else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026705
Martin v. Löwis01c04012002-11-11 14:58:44 +000026706cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026707#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026708_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026709
26710fi
26711
Michael W. Hudson54241132001-12-07 15:38:26 +000026712
Michael W. Hudson54241132001-12-07 15:38:26 +000026713
26714
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026715for h in `(cd $srcdir;echo Python/thread_*.h)`
26716do
26717 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26718done
26719
Michael W. Hudson54241132001-12-07 15:38:26 +000026720
Neal Norwitzd24499d2005-12-18 21:36:39 +000026721SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026722{ echo "$as_me:$LINENO: checking for build directories" >&5
26723echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026724for dir in $SRCDIRS; do
26725 if test ! -d $dir; then
26726 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026727 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026728done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026729{ echo "$as_me:$LINENO: result: done" >&5
26730echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026731
Guido van Rossum627b2d71993-12-24 10:39:16 +000026732# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026733ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026734
Martin v. Löwis11437992002-04-12 09:54:03 +000026735cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026736# This file is a shell script that caches the results of configure
26737# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026738# scripts and configure runs, see configure's option --config-cache.
26739# It is not useful on other systems. If it contains results you don't
26740# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026741#
Martin v. Löwis11437992002-04-12 09:54:03 +000026742# config.status only pays attention to the cache file if you give it
26743# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026744#
Skip Montanaro6dead952003-09-25 14:50:04 +000026745# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026746# loading this file, other *unset* `ac_cv_foo' will be assigned the
26747# following values.
26748
26749_ACEOF
26750
Guido van Rossumf78abae1997-01-21 22:02:36 +000026751# The following way of writing the cache mishandles newlines in values,
26752# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026753# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026754# Ultrix sh set writes to stderr and can't be redirected directly,
26755# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026756(
26757 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26758 eval ac_val=\$$ac_var
26759 case $ac_val in #(
26760 *${as_nl}*)
26761 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026762 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26763echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026764 esac
26765 case $ac_var in #(
26766 _ | IFS | as_nl) ;; #(
26767 *) $as_unset $ac_var ;;
26768 esac ;;
26769 esac
26770 done
26771
Martin v. Löwis11437992002-04-12 09:54:03 +000026772 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026773 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26774 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026775 # `set' does not quote correctly, so add quotes (double-quote
26776 # substitution turns \\\\ into \\, and sed turns \\ into \).
26777 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026778 "s/'/'\\\\''/g;
26779 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026780 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026781 *)
26782 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026783 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026784 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026785 esac |
26786 sort
26787) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026788 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026789 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026790 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026791 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026792 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26793 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026794 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26795 :end' >>confcache
26796if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26797 if test -w "$cache_file"; then
26798 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026799 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26800echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026801 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026802 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026803 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26804echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026805 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026806fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026807rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026809test "x$prefix" = xNONE && prefix=$ac_default_prefix
26810# Let make expand exec_prefix.
26811test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026812
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026813DEFS=-DHAVE_CONFIG_H
26814
Skip Montanaro6dead952003-09-25 14:50:04 +000026815ac_libobjs=
26816ac_ltlibobjs=
26817for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26818 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026819 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026820 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026821 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26822 # will be set to the directory where LIBOBJS objects are built.
26823 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26824 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026825done
26826LIBOBJS=$ac_libobjs
26827
26828LTLIBOBJS=$ac_ltlibobjs
26829
26830
Martin v. Löwis11437992002-04-12 09:54:03 +000026831
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026832: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026833ac_clean_files_save=$ac_clean_files
26834ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026835{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26836echo "$as_me: creating $CONFIG_STATUS" >&6;}
26837cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026838#! $SHELL
26839# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026840# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026841# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026842# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026843
Martin v. Löwis11437992002-04-12 09:54:03 +000026844debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026845ac_cs_recheck=false
26846ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026847SHELL=\${CONFIG_SHELL-$SHELL}
26848_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026850cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026851## --------------------- ##
26852## M4sh Initialization. ##
26853## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026854
Martin v. Löwiseba40652007-08-30 20:10:57 +000026855# Be more Bourne compatible
26856DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026857if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26858 emulate sh
26859 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026860 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026861 # is contrary to our usage. Disable this feature.
26862 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026863 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026864else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026865 case `(set -o) 2>/dev/null` in
26866 *posix*) set -o posix ;;
26867esac
26868
Martin v. Löwis11437992002-04-12 09:54:03 +000026869fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026870
Skip Montanaro6dead952003-09-25 14:50:04 +000026871
Martin v. Löwis11437992002-04-12 09:54:03 +000026872
26873
Martin v. Löwiseba40652007-08-30 20:10:57 +000026874# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026875# Avoid depending upon Character Ranges.
26876as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26877as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26878as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26879as_cr_digits='0123456789'
26880as_cr_alnum=$as_cr_Letters$as_cr_digits
26881
26882# The user is always right.
26883if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026884 echo "#! /bin/sh" >conf$$.sh
26885 echo "exit 0" >>conf$$.sh
26886 chmod +x conf$$.sh
26887 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26888 PATH_SEPARATOR=';'
26889 else
26890 PATH_SEPARATOR=:
26891 fi
26892 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026893fi
26894
Martin v. Löwiseba40652007-08-30 20:10:57 +000026895# Support unset when possible.
26896if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26897 as_unset=unset
26898else
26899 as_unset=false
26900fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026901
Martin v. Löwiseba40652007-08-30 20:10:57 +000026902
26903# IFS
26904# We need space, tab and new line, in precisely that order. Quoting is
26905# there to prevent editors from complaining about space-tab.
26906# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26907# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026908as_nl='
26909'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026910IFS=" "" $as_nl"
26911
26912# Find who we are. Look in the path if we contain no directory separator.
26913case $0 in
26914 *[\\/]* ) as_myself=$0 ;;
26915 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026916for as_dir in $PATH
26917do
26918 IFS=$as_save_IFS
26919 test -z "$as_dir" && as_dir=.
26920 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26921done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026922IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026923
Martin v. Löwiseba40652007-08-30 20:10:57 +000026924 ;;
26925esac
26926# We did not find ourselves, most probably we were run as `sh COMMAND'
26927# in which case we are not to be found in the path.
26928if test "x$as_myself" = x; then
26929 as_myself=$0
26930fi
26931if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026932 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026933 { (exit 1); exit 1; }
26934fi
26935
26936# Work around bugs in pre-3.0 UWIN ksh.
26937for as_var in ENV MAIL MAILPATH
26938do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26939done
26940PS1='$ '
26941PS2='> '
26942PS4='+ '
26943
26944# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026945for as_var in \
26946 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26947 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26948 LC_TELEPHONE LC_TIME
26949do
26950 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26951 eval $as_var=C; export $as_var
26952 else
26953 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26954 fi
26955done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026956
26957# Required to use basename.
26958if expr a : '\(a\)' >/dev/null 2>&1 &&
26959 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26960 as_expr=expr
26961else
26962 as_expr=false
26963fi
26964
26965if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26966 as_basename=basename
26967else
26968 as_basename=false
26969fi
26970
26971
26972# Name of the executable.
26973as_me=`$as_basename -- "$0" ||
26974$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26975 X"$0" : 'X\(//\)$' \| \
26976 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026977echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026978 sed '/^.*\/\([^/][^/]*\)\/*$/{
26979 s//\1/
26980 q
26981 }
26982 /^X\/\(\/\/\)$/{
26983 s//\1/
26984 q
26985 }
26986 /^X\/\(\/\).*/{
26987 s//\1/
26988 q
26989 }
26990 s/.*/./; q'`
26991
26992# CDPATH.
26993$as_unset CDPATH
26994
26995
26996
Martin v. Löwis11437992002-04-12 09:54:03 +000026997 as_lineno_1=$LINENO
26998 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026999 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027000 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027001
Martin v. Löwis11437992002-04-12 09:54:03 +000027002 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27003 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000027004 # line-number line after each line using $LINENO; the second 'sed'
27005 # does the real work. The second script uses 'N' to pair each
27006 # line-number line with the line containing $LINENO, and appends
27007 # trailing '-' during substitution so that $LINENO is not a special
27008 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027009 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010 # scripts with optimization help from Paolo Bonzini. Blame Lee
27011 # E. McMahon (1931-1989) for sed's syntax. :-)
27012 sed -n '
27013 p
27014 /[$]LINENO/=
27015 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027016 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027017 s/[$]LINENO.*/&-/
27018 t lineno
27019 b
27020 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027021 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000027022 :loop
27023 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027024 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027026 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000027027 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027028 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027029 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027030
Martin v. Löwis11437992002-04-12 09:54:03 +000027031 # Don't try to exec as it changes $[0], causing all sort of problems
27032 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000027033 # original and so on. Autoconf is especially sensitive to this).
27034 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027035 # Exit status is that of the last command.
27036 exit
27037}
27038
27039
Martin v. Löwiseba40652007-08-30 20:10:57 +000027040if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27041 as_dirname=dirname
27042else
27043 as_dirname=false
27044fi
27045
27046ECHO_C= ECHO_N= ECHO_T=
27047case `echo -n x` in
27048-n*)
27049 case `echo 'x\c'` in
27050 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27051 *) ECHO_C='\c';;
27052 esac;;
27053*)
27054 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027055esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027056
Martin v. Löwiseba40652007-08-30 20:10:57 +000027057if expr a : '\(a\)' >/dev/null 2>&1 &&
27058 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027059 as_expr=expr
27060else
27061 as_expr=false
27062fi
27063
27064rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000027065if test -d conf$$.dir; then
27066 rm -f conf$$.dir/conf$$.file
27067else
27068 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027069 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000027070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027071echo >conf$$.file
27072if ln -s conf$$.file conf$$ 2>/dev/null; then
27073 as_ln_s='ln -s'
27074 # ... but there are two gotchas:
27075 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27076 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27077 # In both cases, we have to default to `cp -p'.
27078 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027079 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027080elif ln conf$$.file conf$$ 2>/dev/null; then
27081 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027082else
27083 as_ln_s='cp -p'
27084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027085rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27086rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027087
Skip Montanaro6dead952003-09-25 14:50:04 +000027088if mkdir -p . 2>/dev/null; then
27089 as_mkdir_p=:
27090else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027091 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027092 as_mkdir_p=false
27093fi
27094
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095if test -x / >/dev/null 2>&1; then
27096 as_test_x='test -x'
27097else
27098 if ls -dL / >/dev/null 2>&1; then
27099 as_ls_L_option=L
27100 else
27101 as_ls_L_option=
27102 fi
27103 as_test_x='
27104 eval sh -c '\''
27105 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027106 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000027107 else
27108 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027109 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027110 esac;
27111 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27112 ???[sx]*):;;*)false;;esac;fi
27113 '\'' sh
27114 '
27115fi
27116as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027117
27118# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027119as_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 +000027120
27121# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027122as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027123
27124
Martin v. Löwis11437992002-04-12 09:54:03 +000027125exec 6>&1
27126
Martin v. Löwiseba40652007-08-30 20:10:57 +000027127# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027128# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000027129# values after options handling.
27130ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000027131This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027132generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027133
27134 CONFIG_FILES = $CONFIG_FILES
27135 CONFIG_HEADERS = $CONFIG_HEADERS
27136 CONFIG_LINKS = $CONFIG_LINKS
27137 CONFIG_COMMANDS = $CONFIG_COMMANDS
27138 $ $0 $@
27139
Martin v. Löwiseba40652007-08-30 20:10:57 +000027140on `(hostname || uname -n) 2>/dev/null | sed 1q`
27141"
27142
Martin v. Löwis11437992002-04-12 09:54:03 +000027143_ACEOF
27144
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027145cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027146# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000027147config_files="$ac_config_files"
27148config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027149
Martin v. Löwiseba40652007-08-30 20:10:57 +000027150_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027151
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027152cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027153ac_cs_usage="\
27154\`$as_me' instantiates files from templates according to the
27155current configuration.
27156
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027157Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027158
27159 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000027160 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027162 -d, --debug don't remove temporary files
27163 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027164 --file=FILE[:TEMPLATE]
27165 instantiate the configuration file FILE
27166 --header=FILE[:TEMPLATE]
27167 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027168
27169Configuration files:
27170$config_files
27171
27172Configuration headers:
27173$config_headers
27174
27175Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000027176
Martin v. Löwiseba40652007-08-30 20:10:57 +000027177_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027178cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027179ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000027180python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027181configured by $0, generated by GNU Autoconf 2.61,
27182 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027184Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027185This config.status script is free software; the Free Software Foundation
27186gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027187
27188ac_pwd='$ac_pwd'
27189srcdir='$srcdir'
27190INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027191_ACEOF
27192
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027193cat >>$CONFIG_STATUS <<\_ACEOF
27194# If no file are specified by the user, then we need to provide default
27195# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027196ac_need_defaults=:
27197while test $# != 0
27198do
27199 case $1 in
27200 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000027201 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27202 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027203 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027204 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027205 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027206 ac_option=$1
27207 ac_optarg=$2
27208 ac_shift=shift
27209 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027210 esac
27211
Skip Montanaro6dead952003-09-25 14:50:04 +000027212 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027213 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027214 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27215 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027216 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027218 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027219 debug=: ;;
27220 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027221 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027222 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027223 ac_need_defaults=false;;
27224 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027225 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027226 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027227 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027228 --he | --h)
27229 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027230 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027231Try \`$0 --help' for more information." >&2
27232 { (exit 1); exit 1; }; };;
27233 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027234 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027235 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27236 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27237 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027238
27239 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027240 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027241Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027242 { (exit 1); exit 1; }; } ;;
27243
Martin v. Löwiseba40652007-08-30 20:10:57 +000027244 *) ac_config_targets="$ac_config_targets $1"
27245 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027246
27247 esac
27248 shift
27249done
27250
Skip Montanaro6dead952003-09-25 14:50:04 +000027251ac_configure_extra_args=
27252
27253if $ac_cs_silent; then
27254 exec 6>/dev/null
27255 ac_configure_extra_args="$ac_configure_extra_args --silent"
27256fi
27257
27258_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027259cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027260if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027261 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27262 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027263 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027264 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027265fi
27266
Martin v. Löwis11437992002-04-12 09:54:03 +000027267_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027268cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269exec 5>>config.log
27270{
27271 echo
27272 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27273## Running $as_me. ##
27274_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027275 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027276} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027277
Martin v. Löwiseba40652007-08-30 20:10:57 +000027278_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027279cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027280_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027281
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027282cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027283
27284# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027285for ac_config_target in $ac_config_targets
27286do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027287 case $ac_config_target in
27288 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27289 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27290 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27291 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027292 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27293 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027294 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27295 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027296 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027298 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27299echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027300 { (exit 1); exit 1; }; };;
27301 esac
27302done
27303
Martin v. Löwiseba40652007-08-30 20:10:57 +000027304
Martin v. Löwis11437992002-04-12 09:54:03 +000027305# If the user did not use the arguments to specify the items to instantiate,
27306# then the envvar interface is used. Set only those that are not.
27307# We use the long form for the default assignment because of an extremely
27308# bizarre bug on SunOS 4.1.3.
27309if $ac_need_defaults; then
27310 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27311 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27312fi
27313
Skip Montanaro6dead952003-09-25 14:50:04 +000027314# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027315# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027316# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027317# Hook for its removal unless debugging.
27318# Note that there is a small window in which the directory will not be cleaned:
27319# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027320$debug ||
27321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027322 tmp=
27323 trap 'exit_status=$?
27324 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27325' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027326 trap '{ (exit 1); exit 1; }' 1 2 13 15
27327}
Martin v. Löwis11437992002-04-12 09:54:03 +000027328# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027329
Martin v. Löwis11437992002-04-12 09:54:03 +000027330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027331 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027332 test -n "$tmp" && test -d "$tmp"
27333} ||
27334{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027335 tmp=./conf$$-$RANDOM
27336 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027337} ||
27338{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027339 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027340 { (exit 1); exit 1; }
27341}
27342
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027343#
27344# Set up the sed scripts for CONFIG_FILES section.
27345#
27346
27347# No need to generate the scripts if there are no CONFIG_FILES.
27348# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027349if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027350
27351_ACEOF
27352
Martin v. Löwiseba40652007-08-30 20:10:57 +000027353
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027354
Martin v. Löwiseba40652007-08-30 20:10:57 +000027355ac_delim='%!_!# '
27356for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027357 cat >conf$$subs.sed <<_ACEOF
27358SHELL!$SHELL$ac_delim
27359PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27360PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27361PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27362PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27363PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27364PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27365exec_prefix!$exec_prefix$ac_delim
27366prefix!$prefix$ac_delim
27367program_transform_name!$program_transform_name$ac_delim
27368bindir!$bindir$ac_delim
27369sbindir!$sbindir$ac_delim
27370libexecdir!$libexecdir$ac_delim
27371datarootdir!$datarootdir$ac_delim
27372datadir!$datadir$ac_delim
27373sysconfdir!$sysconfdir$ac_delim
27374sharedstatedir!$sharedstatedir$ac_delim
27375localstatedir!$localstatedir$ac_delim
27376includedir!$includedir$ac_delim
27377oldincludedir!$oldincludedir$ac_delim
27378docdir!$docdir$ac_delim
27379infodir!$infodir$ac_delim
27380htmldir!$htmldir$ac_delim
27381dvidir!$dvidir$ac_delim
27382pdfdir!$pdfdir$ac_delim
27383psdir!$psdir$ac_delim
27384libdir!$libdir$ac_delim
27385localedir!$localedir$ac_delim
27386mandir!$mandir$ac_delim
27387DEFS!$DEFS$ac_delim
27388ECHO_C!$ECHO_C$ac_delim
27389ECHO_N!$ECHO_N$ac_delim
27390ECHO_T!$ECHO_T$ac_delim
27391LIBS!$LIBS$ac_delim
27392build_alias!$build_alias$ac_delim
27393host_alias!$host_alias$ac_delim
27394target_alias!$target_alias$ac_delim
27395VERSION!$VERSION$ac_delim
27396SOVERSION!$SOVERSION$ac_delim
27397CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27398UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27399ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27400PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27401PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27402PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27403PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27404PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27405FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27406FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27407FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27408FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27409FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27410MACHDEP!$MACHDEP$ac_delim
27411SGI_ABI!$SGI_ABI$ac_delim
27412EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27413EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27414CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27415EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27416CC!$CC$ac_delim
27417CFLAGS!$CFLAGS$ac_delim
27418LDFLAGS!$LDFLAGS$ac_delim
27419CPPFLAGS!$CPPFLAGS$ac_delim
27420ac_ct_CC!$ac_ct_CC$ac_delim
27421EXEEXT!$EXEEXT$ac_delim
27422OBJEXT!$OBJEXT$ac_delim
27423CXX!$CXX$ac_delim
27424MAINCC!$MAINCC$ac_delim
27425CPP!$CPP$ac_delim
27426GREP!$GREP$ac_delim
27427EGREP!$EGREP$ac_delim
27428BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27429LIBRARY!$LIBRARY$ac_delim
27430LDLIBRARY!$LDLIBRARY$ac_delim
27431DLLLIBRARY!$DLLLIBRARY$ac_delim
27432BLDLIBRARY!$BLDLIBRARY$ac_delim
27433LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27434INSTSONAME!$INSTSONAME$ac_delim
27435RUNSHARED!$RUNSHARED$ac_delim
27436LINKCC!$LINKCC$ac_delim
27437GNULD!$GNULD$ac_delim
27438RANLIB!$RANLIB$ac_delim
27439AR!$AR$ac_delim
27440ARFLAGS!$ARFLAGS$ac_delim
27441SVNVERSION!$SVNVERSION$ac_delim
27442INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27443INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27444INSTALL_DATA!$INSTALL_DATA$ac_delim
27445LN!$LN$ac_delim
27446OPT!$OPT$ac_delim
27447BASECFLAGS!$BASECFLAGS$ac_delim
27448UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27449OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27450LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27451SO!$SO$ac_delim
27452LDSHARED!$LDSHARED$ac_delim
27453BLDSHARED!$BLDSHARED$ac_delim
27454CCSHARED!$CCSHARED$ac_delim
27455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027457 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 +000027458 break
27459 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027460 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27461echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027462 { (exit 1); exit 1; }; }
27463 else
27464 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027465 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027466done
27467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027468ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27469if test -n "$ac_eof"; then
27470 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27471 ac_eof=`expr $ac_eof + 1`
27472fi
27473
27474cat >>$CONFIG_STATUS <<_ACEOF
27475cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27476/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027477_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478sed '
27479s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27480s/^/s,@/; s/!/@,|#_!!_#|/
27481:n
27482t n
27483s/'"$ac_delim"'$/,g/; t
27484s/$/\\/; p
27485N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27486' >>$CONFIG_STATUS <conf$$subs.sed
27487rm -f conf$$subs.sed
27488cat >>$CONFIG_STATUS <<_ACEOF
27489CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027490_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027491
27492
27493ac_delim='%!_!# '
27494for ac_last_try in false false false false false :; do
27495 cat >conf$$subs.sed <<_ACEOF
27496LINKFORSHARED!$LINKFORSHARED$ac_delim
27497CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27498SHLIBS!$SHLIBS$ac_delim
27499USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27500SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27501USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27502LDLAST!$LDLAST$ac_delim
27503THREADOBJ!$THREADOBJ$ac_delim
27504DLINCLDIR!$DLINCLDIR$ac_delim
27505DYNLOADFILE!$DYNLOADFILE$ac_delim
27506MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27507TRUE!$TRUE$ac_delim
27508LIBOBJS!$LIBOBJS$ac_delim
27509HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27510HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27511HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27512HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27513HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27514LIBM!$LIBM$ac_delim
27515LIBC!$LIBC$ac_delim
27516UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27517THREADHEADERS!$THREADHEADERS$ac_delim
27518SRCDIRS!$SRCDIRS$ac_delim
27519LTLIBOBJS!$LTLIBOBJS$ac_delim
27520_ACEOF
27521
27522 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27523 break
27524 elif $ac_last_try; then
27525 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27526echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027527 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027528 else
27529 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27530 fi
27531done
27532
27533ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27534if test -n "$ac_eof"; then
27535 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27536 ac_eof=`expr $ac_eof + 1`
27537fi
27538
27539cat >>$CONFIG_STATUS <<_ACEOF
27540cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27541/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027542_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027543sed '
27544s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27545s/^/s,@/; s/!/@,|#_!!_#|/
27546:n
27547t n
27548s/'"$ac_delim"'$/,g/; t
27549s/$/\\/; p
27550N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27551' >>$CONFIG_STATUS <conf$$subs.sed
27552rm -f conf$$subs.sed
27553cat >>$CONFIG_STATUS <<_ACEOF
27554:end
27555s/|#_!!_#|//g
27556CEOF$ac_eof
27557_ACEOF
27558
Martin v. Löwiseba40652007-08-30 20:10:57 +000027559
27560# VPATH may cause trouble with some makes, so we remove $(srcdir),
27561# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27562# trailing colons and then remove the whole line if VPATH becomes empty
27563# (actually we leave an empty line to preserve line numbers).
27564if test "x$srcdir" = x.; then
27565 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27566s/:*\$(srcdir):*/:/
27567s/:*\${srcdir}:*/:/
27568s/:*@srcdir@:*/:/
27569s/^\([^=]*=[ ]*\):*/\1/
27570s/:*$//
27571s/^[^=]*=[ ]*$//
27572}'
27573fi
27574
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027575cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027576fi # test -n "$CONFIG_FILES"
27577
Martin v. Löwiseba40652007-08-30 20:10:57 +000027578
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027579for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027580do
27581 case $ac_tag in
27582 :[FHLC]) ac_mode=$ac_tag; continue;;
27583 esac
27584 case $ac_mode$ac_tag in
27585 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027586 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27587echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027588 { (exit 1); exit 1; }; };;
27589 :[FH]-) ac_tag=-:-;;
27590 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27591 esac
27592 ac_save_IFS=$IFS
27593 IFS=:
27594 set x $ac_tag
27595 IFS=$ac_save_IFS
27596 shift
27597 ac_file=$1
27598 shift
27599
27600 case $ac_mode in
27601 :L) ac_source=$1;;
27602 :[FH])
27603 ac_file_inputs=
27604 for ac_f
27605 do
27606 case $ac_f in
27607 -) ac_f="$tmp/stdin";;
27608 *) # Look for the file first in the build tree, then in the source tree
27609 # (if the path is not absolute). The absolute path cannot be DOS-style,
27610 # because $ac_f cannot contain `:'.
27611 test -f "$ac_f" ||
27612 case $ac_f in
27613 [\\/$]*) false;;
27614 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27615 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027616 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27617echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027618 { (exit 1); exit 1; }; };;
27619 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027620 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027621 done
27622
27623 # Let's still pretend it is `configure' which instantiates (i.e., don't
27624 # use $as_me), people would be surprised to read:
27625 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027626 configure_input="Generated from "`IFS=:
27627 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027628 if test x"$ac_file" != x-; then
27629 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027630 { echo "$as_me:$LINENO: creating $ac_file" >&5
27631echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027632 fi
27633
27634 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027635 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027636 esac
27637 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027638 esac
27639
Martin v. Löwiseba40652007-08-30 20:10:57 +000027640 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027641$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027642 X"$ac_file" : 'X\(//\)[^/]' \| \
27643 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027644 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027645echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027646 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27647 s//\1/
27648 q
27649 }
27650 /^X\(\/\/\)[^/].*/{
27651 s//\1/
27652 q
27653 }
27654 /^X\(\/\/\)$/{
27655 s//\1/
27656 q
27657 }
27658 /^X\(\/\).*/{
27659 s//\1/
27660 q
27661 }
27662 s/.*/./; q'`
27663 { as_dir="$ac_dir"
27664 case $as_dir in #(
27665 -*) as_dir=./$as_dir;;
27666 esac
27667 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027668 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027669 while :; do
27670 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027671 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027672 *) as_qdir=$as_dir;;
27673 esac
27674 as_dirs="'$as_qdir' $as_dirs"
27675 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027676$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027677 X"$as_dir" : 'X\(//\)[^/]' \| \
27678 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027679 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027680echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027681 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27682 s//\1/
27683 q
27684 }
27685 /^X\(\/\/\)[^/].*/{
27686 s//\1/
27687 q
27688 }
27689 /^X\(\/\/\)$/{
27690 s//\1/
27691 q
27692 }
27693 /^X\(\/\).*/{
27694 s//\1/
27695 q
27696 }
27697 s/.*/./; q'`
27698 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027699 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027700 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027701 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27702echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027703 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027704 ac_builddir=.
27705
Martin v. Löwiseba40652007-08-30 20:10:57 +000027706case "$ac_dir" in
27707.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27708*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027709 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027710 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027711 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027712 case $ac_top_builddir_sub in
27713 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27714 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27715 esac ;;
27716esac
27717ac_abs_top_builddir=$ac_pwd
27718ac_abs_builddir=$ac_pwd$ac_dir_suffix
27719# for backward compatibility:
27720ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027721
27722case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027723 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027724 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027725 ac_top_srcdir=$ac_top_builddir_sub
27726 ac_abs_top_srcdir=$ac_pwd ;;
27727 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027728 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027729 ac_top_srcdir=$srcdir
27730 ac_abs_top_srcdir=$srcdir ;;
27731 *) # Relative name.
27732 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27733 ac_top_srcdir=$ac_top_build_prefix$srcdir
27734 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027735esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027736ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027737
Martin v. Löwis11437992002-04-12 09:54:03 +000027738
Martin v. Löwiseba40652007-08-30 20:10:57 +000027739 case $ac_mode in
27740 :F)
27741 #
27742 # CONFIG_FILE
27743 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027744
27745 case $INSTALL in
27746 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027747 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027748 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027749_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027750
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027751cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027752# If the template does not know about datarootdir, expand it.
27753# FIXME: This hack should be removed a few years after 2.60.
27754ac_datarootdir_hack=; ac_datarootdir_seen=
27755
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027756case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027757 p
27758 q
27759}
27760/@datadir@/p
27761/@docdir@/p
27762/@infodir@/p
27763/@localedir@/p
27764/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027765' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027766*datarootdir*) ac_datarootdir_seen=yes;;
27767*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027768 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27769echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027770_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027771cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027772 ac_datarootdir_hack='
27773 s&@datadir@&$datadir&g
27774 s&@docdir@&$docdir&g
27775 s&@infodir@&$infodir&g
27776 s&@localedir@&$localedir&g
27777 s&@mandir@&$mandir&g
27778 s&\\\${datarootdir}&$datarootdir&g' ;;
27779esac
27780_ACEOF
27781
27782# Neutralize VPATH when `$srcdir' = `.'.
27783# Shell code in configure.ac might set extrasub.
27784# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027785cat >>$CONFIG_STATUS <<_ACEOF
27786 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027787$extrasub
27788_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027789cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027790:t
27791/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027792s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027793s&@top_builddir@&$ac_top_builddir_sub&;t t
27794s&@srcdir@&$ac_srcdir&;t t
27795s&@abs_srcdir@&$ac_abs_srcdir&;t t
27796s&@top_srcdir@&$ac_top_srcdir&;t t
27797s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27798s&@builddir@&$ac_builddir&;t t
27799s&@abs_builddir@&$ac_abs_builddir&;t t
27800s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27801s&@INSTALL@&$ac_INSTALL&;t t
27802$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027803" $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 +000027804
Martin v. Löwiseba40652007-08-30 20:10:57 +000027805test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27806 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27807 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027808 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027809which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027810echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027811which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027812
Martin v. Löwiseba40652007-08-30 20:10:57 +000027813 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027814 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027815 -) cat "$tmp/out"; rm -f "$tmp/out";;
27816 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27817 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027818 ;;
27819 :H)
27820 #
27821 # CONFIG_HEADER
27822 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027823_ACEOF
27824
27825# Transform confdefs.h into a sed script `conftest.defines', that
27826# substitutes the proper values into config.h.in to produce config.h.
27827rm -f conftest.defines conftest.tail
27828# First, append a space to every undef/define line, to ease matching.
27829echo 's/$/ /' >conftest.defines
27830# Then, protect against being on the right side of a sed subst, or in
27831# an unquoted here document, in config.status. If some macros were
27832# called several times there might be several #defines for the same
27833# symbol, which is useless. But do not sort them, since the last
27834# AC_DEFINE must be honored.
27835ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27836# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27837# NAME is the cpp macro being defined, VALUE is the value it is being given.
27838# PARAMS is the parameter list in the macro definition--in most cases, it's
27839# just an empty string.
27840ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27841ac_dB='\\)[ (].*,\\1define\\2'
27842ac_dC=' '
27843ac_dD=' ,'
27844
27845uniq confdefs.h |
27846 sed -n '
27847 t rset
27848 :rset
27849 s/^[ ]*#[ ]*define[ ][ ]*//
27850 t ok
27851 d
27852 :ok
27853 s/[\\&,]/\\&/g
27854 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27855 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27856 ' >>conftest.defines
27857
27858# Remove the space that was appended to ease matching.
27859# Then replace #undef with comments. This is necessary, for
27860# example, in the case of _POSIX_SOURCE, which is predefined and required
27861# on some systems where configure will not decide to define it.
27862# (The regexp can be short, since the line contains either #define or #undef.)
27863echo 's/ $//
27864s,^[ #]*u.*,/* & */,' >>conftest.defines
27865
27866# Break up conftest.defines:
27867ac_max_sed_lines=50
27868
27869# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27870# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27871# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27872# et cetera.
27873ac_in='$ac_file_inputs'
27874ac_out='"$tmp/out1"'
27875ac_nxt='"$tmp/out2"'
27876
27877while :
27878do
27879 # Write a here document:
27880 cat >>$CONFIG_STATUS <<_ACEOF
27881 # First, check the format of the line:
27882 cat >"\$tmp/defines.sed" <<\\CEOF
27883/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27884/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27885b
27886:def
27887_ACEOF
27888 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27889 echo 'CEOF
27890 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27891 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27892 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27893 grep . conftest.tail >/dev/null || break
27894 rm -f conftest.defines
27895 mv conftest.tail conftest.defines
27896done
27897rm -f conftest.defines conftest.tail
27898
27899echo "ac_result=$ac_in" >>$CONFIG_STATUS
27900cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027901 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027902 echo "/* $configure_input */" >"$tmp/config.h"
27903 cat "$ac_result" >>"$tmp/config.h"
27904 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27905 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27906echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027907 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027908 rm -f $ac_file
27909 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027910 fi
27911 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027912 echo "/* $configure_input */"
27913 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027914 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027915 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027916 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027917
Martin v. Löwiseba40652007-08-30 20:10:57 +000027918
27919 esac
27920
27921done # for ac_tag
27922
Guido van Rossum627b2d71993-12-24 10:39:16 +000027923
Martin v. Löwis11437992002-04-12 09:54:03 +000027924{ (exit 0); exit 0; }
27925_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027926chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027927ac_clean_files=$ac_clean_files_save
27928
27929
27930# configure is writing to config.log, and then calls config.status.
27931# config.status does its own redirection, appending to config.log.
27932# Unfortunately, on DOS this fails, as config.log is still kept open
27933# by configure, so config.status won't be able to write to it; its
27934# output is simply discarded. So we exec the FD to /dev/null,
27935# effectively closing config.log, so it can be properly (re)opened and
27936# appended to by config.status. When coming back to configure, we
27937# need to make the FD available again.
27938if test "$no_create" != yes; then
27939 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027940 ac_config_status_args=
27941 test "$silent" = yes &&
27942 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027943 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027944 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027945 exec 5>>config.log
27946 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27947 # would make configure fail if this is the last instruction.
27948 $ac_cs_success || { (exit 1); exit 1; }
27949fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027950
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027951
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027952echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027953if test ! -f Modules/Setup
27954then
27955 cp $srcdir/Modules/Setup.dist Modules/Setup
27956fi
27957
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027958echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027959if test ! -f Modules/Setup.local
27960then
27961 echo "# Edit this file for local setup changes" >Modules/Setup.local
27962fi
27963
27964echo "creating Makefile"
27965$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27966 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027967 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027968
27969case $ac_sys_system in
27970BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027971 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027972
27973 Support for BeOS is deprecated as of Python 2.6.
27974 See PEP 11 for the gory details.
27975 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027976echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027977
27978 Support for BeOS is deprecated as of Python 2.6.
27979 See PEP 11 for the gory details.
27980 " >&2;}
27981 ;;
27982*) ;;
27983esac
27984
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027985mv config.c Modules