blob: 1aba38c3d84de21abf18adea087f378f91d95521 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002# From configure.in Revision: 78194 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren92919a62009-12-24 13:30:58 +0000661LIPO_32BIT_FLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674EXTRAPLATDIR
675EXTRAMACHDEPPATH
676CONFIGURE_MACOSX_DEPLOYMENT_TARGET
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CC
679CFLAGS
680LDFLAGS
681CPPFLAGS
682ac_ct_CC
683EXEEXT
684OBJEXT
685CXX
686MAINCC
687CPP
688GREP
689EGREP
690BUILDEXEEXT
691LIBRARY
692LDLIBRARY
693DLLLIBRARY
694BLDLIBRARY
695LDLIBRARYDIR
696INSTSONAME
697RUNSHARED
698LINKCC
699GNULD
700RANLIB
701AR
702ARFLAGS
703SVNVERSION
704INSTALL_PROGRAM
705INSTALL_SCRIPT
706INSTALL_DATA
707LN
708OPT
709BASECFLAGS
710UNIVERSAL_ARCH_FLAGS
711OTHER_LIBTOOL_OPT
712LIBTOOL_CRUFT
713SO
714LDSHARED
715BLDSHARED
716CCSHARED
717LINKFORSHARED
718CFLAGSFORSHARED
719SHLIBS
Benjamin Peterson1c335e62010-01-01 15:16:29 +0000720PKG_CONFIG
721LIBFFI_INCLUDEDIR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000722USE_SIGNAL_MODULE
723SIGNAL_OBJS
724USE_THREAD_MODULE
725LDLAST
726THREADOBJ
727DLINCLDIR
728DYNLOADFILE
729MACHDEP_OBJS
730TRUE
731LIBOBJS
732HAVE_GETHOSTBYNAME_R_6_ARG
733HAVE_GETHOSTBYNAME_R_5_ARG
734HAVE_GETHOSTBYNAME_R_3_ARG
735HAVE_GETHOSTBYNAME_R
736HAVE_GETHOSTBYNAME
737LIBM
738LIBC
739UNICODE_OBJS
740THREADHEADERS
741SRCDIRS
742LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000743ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000744 ac_precious_vars='build_alias
745host_alias
746target_alias
747CC
748CFLAGS
749LDFLAGS
750LIBS
751CPPFLAGS
752CPP'
753
Guido van Rossum627b2d71993-12-24 10:39:16 +0000754
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000756ac_init_help=
757ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758# The variables have the same names as the options, with
759# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000760cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763no_recursion=
764prefix=NONE
765program_prefix=NONE
766program_suffix=NONE
767program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000772x_includes=NONE
773x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000774
775# Installation directory options.
776# These are left unexpanded so users can "make install exec_prefix=/foo"
777# and all the variables that are supposed to be based on exec_prefix
778# by default will actually change.
779# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000780# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781bindir='${exec_prefix}/bin'
782sbindir='${exec_prefix}/sbin'
783libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784datarootdir='${prefix}/share'
785datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786sysconfdir='${prefix}/etc'
787sharedstatedir='${prefix}/com'
788localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000789includedir='${prefix}/include'
790oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000791docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
792infodir='${datarootdir}/info'
793htmldir='${docdir}'
794dvidir='${docdir}'
795pdfdir='${docdir}'
796psdir='${docdir}'
797libdir='${exec_prefix}/lib'
798localedir='${datarootdir}/locale'
799mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 # If the previous option needs an argument, assign it.
806 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808 ac_prev=
809 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_option in
813 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
814 *) ac_optarg=yes ;;
815 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817 # Accept the important Cygnus configure options, so we can diagnose typos.
818
Martin v. Löwiseba40652007-08-30 20:10:57 +0000819 case $ac_dashdash$ac_option in
820 --)
821 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -bindir | --bindir | --bindi | --bind | --bin | --bi)
824 ac_prev=bindir ;;
825 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827
828 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000829 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000830 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 -cache-file | --cache-file | --cache-fil | --cache-fi \
834 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
835 ac_prev=cache_file ;;
836 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
837 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 cache_file=$ac_optarg ;;
839
840 --config-cache | -C)
841 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847
Martin v. Löwiseba40652007-08-30 20:10:57 +0000848 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
849 | --dataroo | --dataro | --datar)
850 ac_prev=datarootdir ;;
851 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
852 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
853 datarootdir=$ac_optarg ;;
854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000856 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
859 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000861 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
862 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000863
864 -docdir | --docdir | --docdi | --doc | --do)
865 ac_prev=docdir ;;
866 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
867 docdir=$ac_optarg ;;
868
869 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
870 ac_prev=dvidir ;;
871 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
872 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
874 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000875 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
878 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000880 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
881 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
884 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
885 | --exec | --exe | --ex)
886 ac_prev=exec_prefix ;;
887 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
888 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
889 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
892 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 # Obsolete; use --with-gas.
894 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 -help | --help | --hel | --he | -h)
897 ac_init_help=long ;;
898 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
899 ac_init_help=recursive ;;
900 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
901 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
903 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Martin v. Löwiseba40652007-08-30 20:10:57 +0000908 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
909 ac_prev=htmldir ;;
910 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
911 | --ht=*)
912 htmldir=$ac_optarg ;;
913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -includedir | --includedir | --includedi | --included | --include \
915 | --includ | --inclu | --incl | --inc)
916 ac_prev=includedir ;;
917 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
918 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -infodir | --infodir | --infodi | --infod | --info | --inf)
922 ac_prev=infodir ;;
923 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libdir | --libdir | --libdi | --libd)
927 ac_prev=libdir ;;
928 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
931 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
932 | --libexe | --libex | --libe)
933 ac_prev=libexecdir ;;
934 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
935 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 -localedir | --localedir | --localedi | --localed | --locale)
939 ac_prev=localedir ;;
940 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
941 localedir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=localstatedir ;;
946 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000947 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
951 ac_prev=mandir ;;
952 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Obsolete; use --without-fp.
957 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 no_create=yes ;;
962
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
964 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
965 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
968 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
969 | --oldin | --oldi | --old | --ol | --o)
970 ac_prev=oldincludedir ;;
971 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
972 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
973 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
977 ac_prev=prefix ;;
978 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-prefix | --program-prefix | --program-prefi | --program-pref \
982 | --program-pre | --program-pr | --program-p)
983 ac_prev=program_prefix ;;
984 -program-prefix=* | --program-prefix=* | --program-prefi=* \
985 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-suffix | --program-suffix | --program-suffi | --program-suff \
989 | --program-suf | --program-su | --program-s)
990 ac_prev=program_suffix ;;
991 -program-suffix=* | --program-suffix=* | --program-suffi=* \
992 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
995 -program-transform-name | --program-transform-name \
996 | --program-transform-nam | --program-transform-na \
997 | --program-transform-n | --program-transform- \
998 | --program-transform | --program-transfor \
999 | --program-transfo | --program-transf \
1000 | --program-trans | --program-tran \
1001 | --progr-tra | --program-tr | --program-t)
1002 ac_prev=program_transform_name ;;
1003 -program-transform-name=* | --program-transform-name=* \
1004 | --program-transform-nam=* | --program-transform-na=* \
1005 | --program-transform-n=* | --program-transform-=* \
1006 | --program-transform=* | --program-transfor=* \
1007 | --program-transfo=* | --program-transf=* \
1008 | --program-trans=* | --program-tran=* \
1009 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwiseba40652007-08-30 20:10:57 +00001012 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1013 ac_prev=pdfdir ;;
1014 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1015 pdfdir=$ac_optarg ;;
1016
1017 -psdir | --psdir | --psdi | --psd | --ps)
1018 ac_prev=psdir ;;
1019 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1020 psdir=$ac_optarg ;;
1021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1023 | -silent | --silent | --silen | --sile | --sil)
1024 silent=yes ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1027 ac_prev=sbindir ;;
1028 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1029 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1033 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1034 | --sharedst | --shareds | --shared | --share | --shar \
1035 | --sha | --sh)
1036 ac_prev=sharedstatedir ;;
1037 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1038 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1039 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1040 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043 -site | --site | --sit)
1044 ac_prev=site ;;
1045 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1049 ac_prev=srcdir ;;
1050 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1054 | --syscon | --sysco | --sysc | --sys | --sy)
1055 ac_prev=sysconfdir ;;
1056 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1057 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1066 verbose=yes ;;
1067
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 -version | --version | --versio | --versi | --vers | -V)
1069 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001072 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1075 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001077 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1078 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001081 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1084 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001086 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1087 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 --x)
1090 # Obsolete; use --with-x.
1091 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1094 | --x-incl | --x-inc | --x-in | --x-i)
1095 ac_prev=x_includes ;;
1096 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1097 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1101 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1102 ac_prev=x_libraries ;;
1103 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1104 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001107 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001108Try \`$0 --help' for more information." >&2
1109 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 ;;
1111
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 *=*)
1113 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1114 # Reject names that are not valid shell variable names.
1115 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001116 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001118 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 export $ac_envvar ;;
1120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001123 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001125 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 ;;
1128
1129 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130done
1131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001134 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136fi
1137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001138# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1140 datadir sysconfdir sharedstatedir localstatedir includedir \
1141 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1142 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001146 [\\/$]* | ?:[\\/]* ) continue;;
1147 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001149 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001150 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001151done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# There might be people who depend on the old broken behavior: `$host'
1154# used to hold the argument of --host etc.
1155# FIXME: To remove some day.
1156build=$build_alias
1157host=$host_alias
1158target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001159
Martin v. Löwis11437992002-04-12 09:54:03 +00001160# FIXME: To remove some day.
1161if test "x$host_alias" != x; then
1162 if test "x$build_alias" = x; then
1163 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001164 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 +00001165 If a cross compiler is detected then cross compile mode will be used." >&2
1166 elif test "x$build_alias" != "x$host_alias"; then
1167 cross_compiling=yes
1168 fi
1169fi
1170
1171ac_tool_prefix=
1172test -n "$host_alias" && ac_tool_prefix=$host_alias-
1173
1174test "$silent" = yes && exec 6>/dev/null
1175
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176
Martin v. Löwiseba40652007-08-30 20:10:57 +00001177ac_pwd=`pwd` && test -n "$ac_pwd" &&
1178ac_ls_di=`ls -di .` &&
1179ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001183 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001184 { (exit 1); exit 1; }; }
1185
1186
Guido van Rossum627b2d71993-12-24 10:39:16 +00001187# Find the source files, if location was not specified.
1188if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001191 ac_confdir=`$as_dirname -- "$0" ||
1192$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1193 X"$0" : 'X\(//\)[^/]' \| \
1194 X"$0" : 'X\(//\)$' \| \
1195 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1196echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)[^/].*/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\/\)$/{
1206 s//\1/
1207 q
1208 }
1209 /^X\(\/\).*/{
1210 s//\1/
1211 q
1212 }
1213 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001215 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216 srcdir=..
1217 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218else
1219 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221if test ! -r "$srcdir/$ac_unique_file"; then
1222 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001223 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001226ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1227ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001228 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001229 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001230 pwd)`
1231# When building in place, set srcdir=.
1232if test "$ac_abs_confdir" = "$ac_pwd"; then
1233 srcdir=.
1234fi
1235# Remove unnecessary trailing slashes from srcdir.
1236# Double slashes in file names in object file debugging info
1237# mess up M-x gdb in Emacs.
1238case $srcdir in
1239*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1240esac
1241for ac_var in $ac_precious_vars; do
1242 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1243 eval ac_env_${ac_var}_value=\$${ac_var}
1244 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1245 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1246done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248#
1249# Report the --help message.
1250#
1251if test "$ac_init_help" = "long"; then
1252 # Omit some internal or obsolete options to make the list less imposing.
1253 # This message is too long to be a string in the A/UX 3.1 sh.
1254 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001255\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001256
1257Usage: $0 [OPTION]... [VAR=VALUE]...
1258
1259To assign environment variables (e.g., CC, CFLAGS...), specify them as
1260VAR=VALUE. See below for descriptions of some of the useful variables.
1261
1262Defaults for the options are specified in brackets.
1263
1264Configuration:
1265 -h, --help display this help and exit
1266 --help=short display options specific to this package
1267 --help=recursive display the short help of all the included packages
1268 -V, --version display version information and exit
1269 -q, --quiet, --silent do not print \`checking...' messages
1270 --cache-file=FILE cache test results in FILE [disabled]
1271 -C, --config-cache alias for \`--cache-file=config.cache'
1272 -n, --no-create do not create output files
1273 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1274
Martin v. Löwis11437992002-04-12 09:54:03 +00001275Installation directories:
1276 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001277 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001279 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001280
1281By default, \`make install' will install all the files in
1282\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1283an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1284for instance \`--prefix=\$HOME'.
1285
1286For better control, use the options below.
1287
1288Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001289 --bindir=DIR user executables [EPREFIX/bin]
1290 --sbindir=DIR system admin executables [EPREFIX/sbin]
1291 --libexecdir=DIR program executables [EPREFIX/libexec]
1292 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1293 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1294 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1295 --libdir=DIR object code libraries [EPREFIX/lib]
1296 --includedir=DIR C header files [PREFIX/include]
1297 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1298 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1299 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1300 --infodir=DIR info documentation [DATAROOTDIR/info]
1301 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1302 --mandir=DIR man documentation [DATAROOTDIR/man]
1303 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1304 --htmldir=DIR html documentation [DOCDIR]
1305 --dvidir=DIR dvi documentation [DOCDIR]
1306 --pdfdir=DIR pdf documentation [DOCDIR]
1307 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001308_ACEOF
1309
1310 cat <<\_ACEOF
1311_ACEOF
1312fi
1313
1314if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001315 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001316 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001317 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 cat <<\_ACEOF
1319
1320Optional Features:
1321 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1322 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001323 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001324 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001325 --enable-framework[=INSTALLDIR]
1326 Build (MacOSX|Darwin) framework
1327 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001328 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001329 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1330 --enable-ipv6 Enable ipv6 (with ipv4) support
1331 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001332 --enable-big-digits[=BITS]
1333 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --enable-unicode[=ucs[24]]
1335 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337Optional Packages:
1338 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1339 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001340 --with-universal-archs=ARCH
1341 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001342 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001343 --with-framework-name=FRAMEWORK
1344 specify an alternate name of the framework built
1345 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001346 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001347 --with-cxx-main=<compiler>
1348 compile main() and link python executable with C++
1349 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001350 --with-suffix=.exe set executable suffix
1351 --with-pydebug build with Py_DEBUG defined
1352 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001353 --with-system-expat build pyexpat module using an installed expat
1354 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001355 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001356 --with-dbmliborder=db1:db2:...
1357 order to check db backends for dbm. Valid value is a
1358 colon separated string with the backend names
1359 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-signal-module disable/enable signal module
1361 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1362 --with(out)-threads[=DIRECTORY]
1363 disable/enable thread support
1364 --with(out)-thread[=DIRECTORY]
1365 deprecated; use --with(out)-threads
1366 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001367 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001368 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001369 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001370 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001371 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001372 --with-fpectl enable SIGFPE catching
1373 --with-libm=STRING math library
1374 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001375
1376Some influential environment variables:
1377 CC C compiler command
1378 CFLAGS C compiler flags
1379 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1380 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 LIBS libraries to pass to the linker, e.g. -l<library>
1382 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1383 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 CPP C preprocessor
1385
1386Use these variables to override the choices made by `configure' or to help
1387it to find libraries and programs with nonstandard names/locations.
1388
Georg Brandl464432d2009-05-20 18:24:08 +00001389Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001391ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001392fi
1393
1394if test "$ac_init_help" = "recursive"; then
1395 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001398 ac_builddir=.
1399
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400case "$ac_dir" in
1401.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001403 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001405 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001406 case $ac_top_builddir_sub in
1407 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1408 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1409 esac ;;
1410esac
1411ac_abs_top_builddir=$ac_pwd
1412ac_abs_builddir=$ac_pwd$ac_dir_suffix
1413# for backward compatibility:
1414ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 ac_top_srcdir=$ac_top_builddir_sub
1420 ac_abs_top_srcdir=$ac_pwd ;;
1421 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 ac_top_srcdir=$srcdir
1424 ac_abs_top_srcdir=$srcdir ;;
1425 *) # Relative name.
1426 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1427 ac_top_srcdir=$ac_top_build_prefix$srcdir
1428 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001429esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001431
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432 cd "$ac_dir" || { ac_status=$?; continue; }
1433 # Check for guested configure.
1434 if test -f "$ac_srcdir/configure.gnu"; then
1435 echo &&
1436 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1437 elif test -f "$ac_srcdir/configure"; then
1438 echo &&
1439 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001441 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442 fi || ac_status=$?
1443 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 done
1445fi
1446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001448if $ac_init_version; then
1449 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001450python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001451generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014542002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This configure script is free software; the Free Software Foundation
1456gives unlimited permission to copy, distribute and modify it.
1457_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001458 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001460cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001461This file contains any messages produced by compilers while
1462running configure, to aid debugging if configure makes a mistake.
1463
Martin v. Löwis174440b2008-10-03 08:59:41 +00001464It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001465generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467 $ $0 $@
1468
1469_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001471{
1472cat <<_ASUNAME
1473## --------- ##
1474## Platform. ##
1475## --------- ##
1476
1477hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1478uname -m = `(uname -m) 2>/dev/null || echo unknown`
1479uname -r = `(uname -r) 2>/dev/null || echo unknown`
1480uname -s = `(uname -s) 2>/dev/null || echo unknown`
1481uname -v = `(uname -v) 2>/dev/null || echo unknown`
1482
1483/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1484/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1485
1486/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1487/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1488/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001490/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1491/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1492/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1493
1494_ASUNAME
1495
1496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1497for as_dir in $PATH
1498do
1499 IFS=$as_save_IFS
1500 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001501 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001502done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001503IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001504
1505} >&5
1506
1507cat >&5 <<_ACEOF
1508
1509
1510## ----------- ##
1511## Core tests. ##
1512## ----------- ##
1513
1514_ACEOF
1515
1516
1517# Keep a trace of the command line.
1518# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001519# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001523ac_configure_args0=
1524ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001525ac_must_keep_next=false
1526for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001527do
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 for ac_arg
1529 do
1530 case $ac_arg in
1531 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1533 | -silent | --silent | --silen | --sile | --sil)
1534 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001536 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 esac
1538 case $ac_pass in
1539 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1540 2)
1541 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1542 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545 case $ac_arg in
1546 *=* | --config-cache | -C | -disable-* | --disable-* \
1547 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1548 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1549 | -with-* | --with-* | -without-* | --without-* | --x)
1550 case "$ac_configure_args0 " in
1551 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1552 esac
1553 ;;
1554 -* ) ac_must_keep_next=true ;;
1555 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001556 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001557 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001558 ;;
1559 esac
1560 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001561done
Skip Montanaro6dead952003-09-25 14:50:04 +00001562$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1563$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 +00001564
1565# When interrupted or exit'd, cleanup temporary files, and complete
1566# config.log. We remove comments because anyway the quotes in there
1567# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568# WARNING: Use '\'' to represent an apostrophe within the trap.
1569# 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 +00001570trap 'exit_status=$?
1571 # Save into config.log some information that might help in debugging.
1572 {
1573 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001574
Martin v. Löwis11437992002-04-12 09:54:03 +00001575 cat <<\_ASBOX
1576## ---------------- ##
1577## Cache variables. ##
1578## ---------------- ##
1579_ASBOX
1580 echo
1581 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582(
1583 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1584 eval ac_val=\$$ac_var
1585 case $ac_val in #(
1586 *${as_nl}*)
1587 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001588 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1589echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 esac
1591 case $ac_var in #(
1592 _ | IFS | as_nl) ;; #(
1593 *) $as_unset $ac_var ;;
1594 esac ;;
1595 esac
1596 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001598 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1599 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 "s/'\''/'\''\\\\'\'''\''/g;
1602 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1603 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001604 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001606 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607 esac |
1608 sort
1609)
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001611
1612 cat <<\_ASBOX
1613## ----------------- ##
1614## Output variables. ##
1615## ----------------- ##
1616_ASBOX
1617 echo
1618 for ac_var in $ac_subst_vars
1619 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001620 eval ac_val=\$$ac_var
1621 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001622 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001624 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001625 done | sort
1626 echo
1627
1628 if test -n "$ac_subst_files"; then
1629 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630## ------------------- ##
1631## File substitutions. ##
1632## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001633_ASBOX
1634 echo
1635 for ac_var in $ac_subst_files
1636 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 eval ac_val=\$$ac_var
1638 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001639 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001641 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001642 done | sort
1643 echo
1644 fi
1645
Martin v. Löwis11437992002-04-12 09:54:03 +00001646 if test -s confdefs.h; then
1647 cat <<\_ASBOX
1648## ----------- ##
1649## confdefs.h. ##
1650## ----------- ##
1651_ASBOX
1652 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001653 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001654 echo
1655 fi
1656 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001657 echo "$as_me: caught signal $ac_signal"
1658 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001659 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001660 rm -f core *.core core.conftest.* &&
1661 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001662 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001663' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001664for ac_signal in 1 2 13 15; do
1665 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1666done
1667ac_signal=0
1668
1669# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001670rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001671
1672# Predefined preprocessor variables.
1673
1674cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_NAME "$PACKAGE_NAME"
1676_ACEOF
1677
1678
1679cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1681_ACEOF
1682
1683
1684cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_VERSION "$PACKAGE_VERSION"
1686_ACEOF
1687
1688
1689cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_STRING "$PACKAGE_STRING"
1691_ACEOF
1692
1693
1694cat >>confdefs.h <<_ACEOF
1695#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1696_ACEOF
1697
1698
1699# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001702 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001703elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001704 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001706 set x "$ac_default_prefix/share/config.site" \
1707 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001709shift
1710for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001711do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001713 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1714echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716 . "$ac_site_file"
1717 fi
1718done
1719
1720if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001721 # Some versions of bash will fail to source /dev/null (special
1722 # files actually), so we avoid doing that.
1723 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001724 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1725echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001727 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1728 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 esac
1730 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001732 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1733echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001734 >$cache_file
1735fi
1736
1737# Check that the precious variables saved in the cache have kept the same
1738# value.
1739ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001740for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1742 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001743 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1744 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 case $ac_old_set,$ac_new_set in
1746 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1748echo "$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 +00001749 ac_cache_corrupted=: ;;
1750 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1752echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 ac_cache_corrupted=: ;;
1754 ,);;
1755 *)
1756 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001757 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1758echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1759 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1760echo "$as_me: former value: $ac_old_val" >&2;}
1761 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1762echo "$as_me: current value: $ac_new_val" >&2;}
1763 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 fi;;
1765 esac
1766 # Pass precious variables to config.status.
1767 if test "$ac_new_set" = set; then
1768 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001769 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001770 *) ac_arg=$ac_var=$ac_new_val ;;
1771 esac
1772 case " $ac_configure_args " in
1773 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1774 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1775 esac
1776 fi
1777done
1778if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001779 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1780echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1781 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1782echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001783 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784fi
1785
Martin v. Löwiseba40652007-08-30 20:10:57 +00001786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
Guido van Rossum7f43da71994-08-01 12:15:30 +00001810ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815
Guido van Rossum627b2d71993-12-24 10:39:16 +00001816
Michael W. Hudson54241132001-12-07 15:38:26 +00001817
Martin v. Löwiseba40652007-08-30 20:10:57 +00001818ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
Georg Brandlbcd64a32009-03-31 21:45:18 +00001822if test "$prefix" != "/"; then
1823 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1824fi
1825
1826
Martin v. Löwis11437992002-04-12 09:54:03 +00001827
1828
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001829
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001830
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001831# We don't use PACKAGE_ variables, and they cause conflicts
1832# with other autoconf-based packages that include Python.h
1833grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1834rm confdefs.h
1835mv confdefs.h.new confdefs.h
1836
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001837
Martin v. Löwis174440b2008-10-03 08:59:41 +00001838VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001839
Martin v. Löwis1142de32002-03-29 16:28:31 +00001840
1841SOVERSION=1.0
1842
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001843# The later defininition of _XOPEN_SOURCE disables certain features
1844# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _GNU_SOURCE 1
1848_ACEOF
1849
1850
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define _NETBSD_SOURCE 1
1857_ACEOF
1858
1859
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1862# them.
1863
1864cat >>confdefs.h <<\_ACEOF
1865#define __BSD_VISIBLE 1
1866_ACEOF
1867
1868
Martin v. Löwisd6320502004-08-12 13:45:08 +00001869# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1870# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _BSD_TYPES 1
1874_ACEOF
1875
1876
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001877# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1878# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1879# them.
1880
1881cat >>confdefs.h <<\_ACEOF
1882#define _DARWIN_C_SOURCE 1
1883_ACEOF
1884
1885
1886
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001887define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001888
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001889# Arguments passed to configure.
1890
1891CONFIG_ARGS="$ac_configure_args"
1892
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001893{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1894echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001895# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001896if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898 case $enableval in
1899 yes)
1900 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001901 if test ! -d "${enableval}"
1902 then
1903 enableval=/
1904 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001905 ;;
1906 esac
1907 case $enableval in
1908 no)
1909 UNIVERSALSDK=
1910 enable_universalsdk=
1911 ;;
1912 *)
1913 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001914 if test ! -d "${UNIVERSALSDK}"
1915 then
1916 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1917echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1918 { (exit 1); exit 1; }; }
1919 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001920 ;;
1921 esac
1922
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001923
Ronald Oussoren988117f2006-04-29 11:31:35 +00001924else
1925
1926 UNIVERSALSDK=
1927 enable_universalsdk=
1928
Martin v. Löwiseba40652007-08-30 20:10:57 +00001929fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001930
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00001931if test -n "${UNIVERSALSDK}"
1932then
1933 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1934echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1935else
1936 { echo "$as_me:$LINENO: result: no" >&5
1937echo "${ECHO_T}no" >&6; }
1938fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001939
Martin v. Löwiseba40652007-08-30 20:10:57 +00001940
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001941
1942
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001943UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00001944
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001945{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1946echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001947
1948# Check whether --with-universal-archs was given.
1949if test "${with_universal_archs+set}" = set; then
1950 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001951 { echo "$as_me:$LINENO: result: $withval" >&5
1952echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001953 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001954 if test "${enable_universalsdk}" ; then
1955 :
1956 else
1957 { { echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
1958echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
1959 { (exit 1); exit 1; }; }
1960 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001961
1962else
1963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001964 { echo "$as_me:$LINENO: result: 32-bit" >&5
1965echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001966
1967fi
1968
1969
1970
1971
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001972
1973# Check whether --with-framework-name was given.
1974if test "${with_framework_name+set}" = set; then
1975 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00001976 if test "${enable_framework}"; then
1977 :
1978 else
1979 { { echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
1980echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
1981 { (exit 1); exit 1; }; }
1982 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001983 PYTHONFRAMEWORK=${withval}
1984 PYTHONFRAMEWORKDIR=${withval}.framework
1985 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1986
1987else
1988
1989 PYTHONFRAMEWORK=Python
1990 PYTHONFRAMEWORKDIR=Python.framework
1991 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1992
1993fi
1994
Martin v. Löwiseba40652007-08-30 20:10:57 +00001995# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001996if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001997 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001998 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001999 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002000 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002001 esac
2002 case $enableval in
2003 no)
2004 PYTHONFRAMEWORK=
2005 PYTHONFRAMEWORKDIR=no-framework
2006 PYTHONFRAMEWORKPREFIX=
2007 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002008 FRAMEWORKINSTALLFIRST=
2009 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002010 FRAMEWORKALTINSTALLFIRST=
2011 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002012 if test "x${prefix}" = "xNONE"; then
2013 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2014 else
2015 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2016 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002017 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002018 ;;
2019 *)
2020 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002021 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002022 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002023 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002024 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2025 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002026
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002027 if test "x${prefix}" = "xNONE" ; then
2028 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2029 else
2030 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2031 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002032 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002033
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002034 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002035 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002037
Martin v. Löwiseba40652007-08-30 20:10:57 +00002038 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002039
Martin v. Löwiseba40652007-08-30 20:10:57 +00002040 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002041
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002042 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2043
2044 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2045
Jack Jansene578a632001-08-15 01:27:14 +00002046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002047
Guido van Rossum563e7081996-09-10 18:20:48 +00002048else
Martin v. Löwis11437992002-04-12 09:54:03 +00002049
Jack Jansene578a632001-08-15 01:27:14 +00002050 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002051 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002052 PYTHONFRAMEWORKPREFIX=
2053 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002054 FRAMEWORKINSTALLFIRST=
2055 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002056 FRAMEWORKALTINSTALLFIRST=
2057 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002058 if test "x${prefix}" = "xNONE" ; then
2059 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2060 else
2061 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2062 fi
Jack Jansene578a632001-08-15 01:27:14 +00002063 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002065
Martin v. Löwiseba40652007-08-30 20:10:57 +00002066fi
2067
Michael W. Hudson54241132001-12-07 15:38:26 +00002068
2069
2070
2071
Jack Jansene578a632001-08-15 01:27:14 +00002072
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002073
2074
Ronald Oussoren5b787322006-06-06 19:50:24 +00002075
2076
2077
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002078
Jack Jansene578a632001-08-15 01:27:14 +00002079##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002080## AC_HELP_STRING(--with-dyld,
2081## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002082##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002083# Set name for machine-dependent library files
2084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002085{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2086echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087if test -z "$MACHDEP"
2088then
Guido van Rossum563e7081996-09-10 18:20:48 +00002089 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002090 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002091 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002092 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002093 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002094 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002095 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002096 ac_md_system=`echo $ac_sys_system |
2097 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2098 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002099 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002100 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002101
Guido van Rossum07397971997-04-29 21:49:50 +00002102 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002103 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002104 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002105 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002106 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002107 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002108 esac
2109fi
Guido van Rossum91922671997-10-09 20:24:13 +00002110
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002111# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2112# disable features if it is defined, without any means to access these
2113# features as extensions. For these systems, we skip the definition of
2114# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2115# some feature, make sure there is no alternative way to access this
2116# feature. Also, when using wildcards, make sure you have verified the
2117# need for not defining _XOPEN_SOURCE on all systems matching the
2118# wildcard, and that the wildcard does not include future systems
2119# (which may remove their limitations).
2120case $ac_sys_system/$ac_sys_release in
2121 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2122 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002123 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002124 # In addition, Stefan Krah confirms that issue #1244610 exists through
2125 # OpenBSD 4.6, but is fixed in 4.7.
2126 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002127 define_xopen_source=no
2128 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2129 # also defined. This can be overridden by defining _BSD_SOURCE
2130 # As this has a different meaning on Linux, only define it on OpenBSD
2131
2132cat >>confdefs.h <<\_ACEOF
2133#define _BSD_SOURCE 1
2134_ACEOF
2135
2136 ;;
Martin v. Löwis7875ef62010-02-15 21:41:12 +00002137 OpenBSD/4.[789])
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00002138 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2139 # also defined. This can be overridden by defining _BSD_SOURCE
2140 # As this has a different meaning on Linux, only define it on OpenBSD
2141
2142cat >>confdefs.h <<\_ACEOF
2143#define _BSD_SOURCE 1
2144_ACEOF
2145
2146 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002147 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2148 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2149 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002150 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 +00002151 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002152 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2153 # of union __?sigval. Reported by Stuart Bishop.
2154 SunOS/5.6)
2155 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002156 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2157 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002158 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002159 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002160 define_xopen_source=no;;
2161 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002162 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002163 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002164 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002165 # On FreeBSD 4, the math functions C89 does not cover are never defined
2166 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2167 FreeBSD/4.*)
2168 define_xopen_source=no;;
2169 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2170 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2171 # identifies itself as Darwin/7.*
2172 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2173 # disables platform specific features beyond repair.
2174 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2175 # has no effect, don't bother defining them
2176 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002177 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00002178 Darwin/1[0-9].*)
2179 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002180 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2181 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2182 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002183 AIX/4)
2184 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002185 AIX/5)
2186 if test `uname -r` -eq 1; then
2187 define_xopen_source=no
2188 fi
2189 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002190 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2191 # defining NI_NUMERICHOST.
2192 QNX/6.3.2)
2193 define_xopen_source=no
2194 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002195
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002196esac
2197
2198if test $define_xopen_source = yes
2199then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002200 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2201 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002202 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2203 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002204 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002205 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002206
2207cat >>confdefs.h <<\_ACEOF
2208#define _XOPEN_SOURCE 500
2209_ACEOF
2210
2211 ;;
2212 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002213
2214cat >>confdefs.h <<\_ACEOF
2215#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002216_ACEOF
2217
Skip Montanarof0d5f792004-08-15 14:08:23 +00002218 ;;
2219 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002220
2221 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2222 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2223 # several APIs are not declared. Since this is also needed in some
2224 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002225 # except for Solaris 10, where it must not be defined,
2226 # as it implies XPG4.2
2227 case $ac_sys_system/$ac_sys_release in
2228 SunOS/5.10)
2229 ;;
2230 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002231
2232cat >>confdefs.h <<\_ACEOF
2233#define _XOPEN_SOURCE_EXTENDED 1
2234_ACEOF
2235
Martin v. Löwis7dece662005-11-26 11:38:24 +00002236 ;;
2237 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002238
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002239
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002240cat >>confdefs.h <<\_ACEOF
2241#define _POSIX_C_SOURCE 200112L
2242_ACEOF
2243
2244
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002245fi
2246
Guido van Rossum91922671997-10-09 20:24:13 +00002247#
2248# SGI compilers allow the specification of the both the ABI and the
2249# ISA on the command line. Depending on the values of these switches,
2250# different and often incompatable code will be generated.
2251#
2252# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2253# thus supply support for various ABI/ISA combinations. The MACHDEP
2254# variable is also adjusted.
2255#
2256
2257if test ! -z "$SGI_ABI"
2258then
2259 CC="cc $SGI_ABI"
2260 LDFLAGS="$SGI_ABI $LDFLAGS"
2261 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2262fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002263{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2264echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002265
Jack Jansen83f898c2002-12-30 22:23:40 +00002266# And add extra plat-mac for darwin
2267
Jack Jansen7b59b422003-03-17 15:44:10 +00002268
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002269{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2270echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002271if test -z "$EXTRAPLATDIR"
2272then
2273 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002274 darwin)
2275 EXTRAPLATDIR="\$(PLATMACDIRS)"
2276 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2277 ;;
2278 *)
2279 EXTRAPLATDIR=""
2280 EXTRAMACHDEPPATH=""
2281 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002282 esac
2283fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002284{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2285echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002286
Jack Jansen6b08a402004-06-03 12:41:45 +00002287# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2288# it may influence the way we can build extensions, so distutils
2289# needs to check it
2290
Ronald Oussoren988117f2006-04-29 11:31:35 +00002291
Jack Jansen6b08a402004-06-03 12:41:45 +00002292CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002293EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002295{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2296echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002297ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002298{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2299echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002300
Guido van Rossum627b2d71993-12-24 10:39:16 +00002301# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002302
2303# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2304# for debug/optimization stuff. BASECFLAGS is for flags that are required
2305# just to get things to compile and link. Users are free to override OPT
2306# when running configure or make. The build should not break if they do.
2307# BASECFLAGS should generally not be messed with, however.
2308
2309# XXX shouldn't some/most/all of this code be merged with the stuff later
2310# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002311{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2312echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002313
Martin v. Löwiseba40652007-08-30 20:10:57 +00002314# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002315if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002316 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002317 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002318 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002319 without_gcc=yes;;
2320 yes) CC=gcc
2321 without_gcc=no;;
2322 *) CC=$withval
2323 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002324 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002325else
Martin v. Löwis11437992002-04-12 09:54:03 +00002326
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002327 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002328 AIX*) CC=cc_r
2329 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002330 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002331 case $BE_HOST_CPU in
2332 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002333 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002334 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002335 BASECFLAGS="$BASECFLAGS -export pragma"
2336 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002337 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002338 ;;
2339 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002340 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002341 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002342 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002343 ;;
2344 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002345 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2346echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002347 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002348 ;;
2349 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002350 AR="\$(srcdir)/Modules/ar_beos"
2351 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002352 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002353 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002354 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002355fi
2356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002357{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2358echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002359
Guido van Rossum8b131c51995-03-09 14:10:13 +00002360# If the user switches compilers, we can't believe the cache
2361if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2362then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002363 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002364(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002365echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002366(it is also a good idea to do 'make clean' before compiling)" >&2;}
2367 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002368fi
2369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370ac_ext=c
2371ac_cpp='$CPP $CPPFLAGS'
2372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2374ac_compiler_gnu=$ac_cv_c_compiler_gnu
2375if test -n "$ac_tool_prefix"; then
2376 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2377set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002378{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002380if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002382else
2383 if test -n "$CC"; then
2384 ac_cv_prog_CC="$CC" # Let the user override the test.
2385else
Martin v. Löwis11437992002-04-12 09:54:03 +00002386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
2391 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392 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 +00002393 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002395 break 2
2396 fi
2397done
2398done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002399IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002400
Jack Jansendd19cf82001-12-06 22:36:17 +00002401fi
2402fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002403CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002404if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002405 { echo "$as_me:$LINENO: result: $CC" >&5
2406echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002408 { echo "$as_me:$LINENO: result: no" >&5
2409echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002410fi
2411
Martin v. Löwiseba40652007-08-30 20:10:57 +00002412
Martin v. Löwis11437992002-04-12 09:54:03 +00002413fi
2414if test -z "$ac_cv_prog_CC"; then
2415 ac_ct_CC=$CC
2416 # Extract the first word of "gcc", so it can be a program name with args.
2417set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002418{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2419echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002420if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002421 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002422else
2423 if test -n "$ac_ct_CC"; then
2424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2425else
2426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2427for as_dir in $PATH
2428do
2429 IFS=$as_save_IFS
2430 test -z "$as_dir" && as_dir=.
2431 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002432 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 +00002433 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 break 2
2436 fi
2437done
2438done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441fi
2442fi
2443ac_ct_CC=$ac_cv_prog_ac_ct_CC
2444if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002445 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2446echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002448 { echo "$as_me:$LINENO: result: no" >&5
2449echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002450fi
2451
Martin v. Löwiseba40652007-08-30 20:10:57 +00002452 if test "x$ac_ct_CC" = x; then
2453 CC=""
2454 else
2455 case $cross_compiling:$ac_tool_warned in
2456yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002457{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2458whose name does not start with the host triplet. If you think this
2459configuration is useful to you, please write to autoconf@gnu.org." >&5
2460echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2461whose name does not start with the host triplet. If you think this
2462configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463ac_tool_warned=yes ;;
2464esac
2465 CC=$ac_ct_CC
2466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002467else
2468 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002469fi
2470
Jack Jansendd19cf82001-12-06 22:36:17 +00002471if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472 if test -n "$ac_tool_prefix"; then
2473 # 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 +00002474set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002475{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002477if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002478 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002479else
2480 if test -n "$CC"; then
2481 ac_cv_prog_CC="$CC" # Let the user override the test.
2482else
Martin v. Löwis11437992002-04-12 09:54:03 +00002483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
2488 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489 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 +00002490 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 break 2
2493 fi
2494done
2495done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002497
2498fi
2499fi
2500CC=$ac_cv_prog_CC
2501if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002502 { echo "$as_me:$LINENO: result: $CC" >&5
2503echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002504else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002505 { echo "$as_me:$LINENO: result: no" >&5
2506echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507fi
2508
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002511fi
2512if test -z "$CC"; then
2513 # Extract the first word of "cc", so it can be a program name with args.
2514set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002515{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002517if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002518 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002519else
2520 if test -n "$CC"; then
2521 ac_cv_prog_CC="$CC" # Let the user override the test.
2522else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2525for as_dir in $PATH
2526do
2527 IFS=$as_save_IFS
2528 test -z "$as_dir" && as_dir=.
2529 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002530 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 +00002531 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2532 ac_prog_rejected=yes
2533 continue
2534 fi
2535 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002536 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 break 2
2538 fi
2539done
2540done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002543if test $ac_prog_rejected = yes; then
2544 # We found a bogon in the path, so make sure we never use it.
2545 set dummy $ac_cv_prog_CC
2546 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002548 # We chose a different compiler from the bogus one.
2549 # However, it has the same basename, so the bogon will be chosen
2550 # first if we set CC to just the basename; use the full file name.
2551 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002552 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002553 fi
2554fi
2555fi
2556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002557CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002558if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002559 { echo "$as_me:$LINENO: result: $CC" >&5
2560echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002561else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002562 { echo "$as_me:$LINENO: result: no" >&5
2563echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002564fi
2565
Martin v. Löwiseba40652007-08-30 20:10:57 +00002566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567fi
2568if test -z "$CC"; then
2569 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002570 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 do
2572 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002574{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002576if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002578else
2579 if test -n "$CC"; then
2580 ac_cv_prog_CC="$CC" # Let the user override the test.
2581else
Martin v. Löwis11437992002-04-12 09:54:03 +00002582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2583for as_dir in $PATH
2584do
2585 IFS=$as_save_IFS
2586 test -z "$as_dir" && as_dir=.
2587 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 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 +00002589 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002590 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002592 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002593done
2594done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002596
2597fi
2598fi
2599CC=$ac_cv_prog_CC
2600if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002601 { echo "$as_me:$LINENO: result: $CC" >&5
2602echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002604 { echo "$as_me:$LINENO: result: no" >&5
2605echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002606fi
2607
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 test -n "$CC" && break
2610 done
2611fi
2612if test -z "$CC"; then
2613 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002615do
2616 # Extract the first word of "$ac_prog", so it can be a program name with args.
2617set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002618{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2619echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002620if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002621 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002622else
2623 if test -n "$ac_ct_CC"; then
2624 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2625else
2626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2627for as_dir in $PATH
2628do
2629 IFS=$as_save_IFS
2630 test -z "$as_dir" && as_dir=.
2631 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632 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 +00002633 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 break 2
2636 fi
2637done
2638done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641fi
2642fi
2643ac_ct_CC=$ac_cv_prog_ac_ct_CC
2644if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002645 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2646echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002648 { echo "$as_me:$LINENO: result: no" >&5
2649echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002650fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002651
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 test -n "$ac_ct_CC" && break
2654done
Michael W. Hudson54241132001-12-07 15:38:26 +00002655
Martin v. Löwiseba40652007-08-30 20:10:57 +00002656 if test "x$ac_ct_CC" = x; then
2657 CC=""
2658 else
2659 case $cross_compiling:$ac_tool_warned in
2660yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002661{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2662whose name does not start with the host triplet. If you think this
2663configuration is useful to you, please write to autoconf@gnu.org." >&5
2664echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2665whose name does not start with the host triplet. If you think this
2666configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002667ac_tool_warned=yes ;;
2668esac
2669 CC=$ac_ct_CC
2670 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002671fi
2672
2673fi
2674
2675
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002676test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002677See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002678echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002679See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002680 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002683echo "$as_me:$LINENO: checking for C compiler version" >&5
2684ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002685{ (ac_try="$ac_compiler --version >&5"
2686case "(($ac_try" in
2687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688 *) ac_try_echo=$ac_try;;
2689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695{ (ac_try="$ac_compiler -v >&5"
2696case "(($ac_try" in
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002705{ (ac_try="$ac_compiler -V >&5"
2706case "(($ac_try" in
2707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2708 *) ac_try_echo=$ac_try;;
2709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 (exit $ac_status); }
2715
2716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002717/* confdefs.h. */
2718_ACEOF
2719cat confdefs.h >>conftest.$ac_ext
2720cat >>conftest.$ac_ext <<_ACEOF
2721/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002722
Martin v. Löwis11437992002-04-12 09:54:03 +00002723int
2724main ()
2725{
2726
2727 ;
2728 return 0;
2729}
2730_ACEOF
2731ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002732ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002733# Try to create an executable without -o first, disregard a.out.
2734# It will help us diagnose broken compilers, and finding out an intuition
2735# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002736{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2737echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2738ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2739#
2740# List of possible output files, starting from the most likely.
2741# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2742# only as a last resort. b.out is created by i960 compilers.
2743ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2744#
2745# The IRIX 6 linker writes into existing files which may not be
2746# executable, retaining their permissions. Remove them first so a
2747# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002748ac_rmfiles=
2749for ac_file in $ac_files
2750do
2751 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002752 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002753 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2754 esac
2755done
2756rm -f $ac_rmfiles
2757
2758if { (ac_try="$ac_link_default"
2759case "(($ac_try" in
2760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2761 *) ac_try_echo=$ac_try;;
2762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2769# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2770# in a Makefile. We should not override ac_cv_exeext if it was cached,
2771# so that the user can short-circuit this test for compilers unknown to
2772# Autoconf.
2773for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002774do
2775 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002777 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002778 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002779 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002780 # We found the default executable, but exeext='' is most
2781 # certainly right.
2782 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002783 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2785 then :; else
2786 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2787 fi
2788 # We set ac_cv_exeext here because the later test for it is not
2789 # safe: cross compilers may not add the suffix if given an `-o'
2790 # argument, so we may need to know it at that point already.
2791 # Even if this section looks crufty: it has the advantage of
2792 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002793 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002794 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002795 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 esac
2797done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002798test "$ac_cv_exeext" = no && ac_cv_exeext=
2799
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002800else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801 ac_file=''
2802fi
2803
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002804{ echo "$as_me:$LINENO: result: $ac_file" >&5
2805echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002806if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002808sed 's/^/| /' conftest.$ac_ext >&5
2809
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002811See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002812echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002813See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002814 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002815fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002816
Martin v. Löwis11437992002-04-12 09:54:03 +00002817ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002818
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002820# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002821{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2822echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002823# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2824# If not cross compiling, check that we can run a simple program.
2825if test "$cross_compiling" != yes; then
2826 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002827 { (case "(($ac_try" in
2828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829 *) ac_try_echo=$ac_try;;
2830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002832 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002835 (exit $ac_status); }; }; then
2836 cross_compiling=no
2837 else
2838 if test "$cross_compiling" = maybe; then
2839 cross_compiling=yes
2840 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002841 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002842If you meant to cross compile, use \`--host'.
2843See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002844echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002845If you meant to cross compile, use \`--host'.
2846See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002847 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 fi
2849 fi
2850fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002851{ echo "$as_me:$LINENO: result: yes" >&5
2852echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002854rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002855ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002856# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002857# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002858{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2859echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2860{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2861echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002863{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2864echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002865if { (ac_try="$ac_link"
2866case "(($ac_try" in
2867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868 *) ac_try_echo=$ac_try;;
2869esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 (exit $ac_status); }; then
2875 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2876# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2877# work properly (i.e., refer to `conftest.exe'), while it won't with
2878# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002879for ac_file in conftest.exe conftest conftest.*; do
2880 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002882 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002884 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 * ) break;;
2886 esac
2887done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002889 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002890See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002892See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002893 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002894fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002895
Martin v. Löwis11437992002-04-12 09:54:03 +00002896rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002897{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2898echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002899
2900rm -f conftest.$ac_ext
2901EXEEXT=$ac_cv_exeext
2902ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002903{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2904echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002905if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002907else
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002909/* confdefs.h. */
2910_ACEOF
2911cat confdefs.h >>conftest.$ac_ext
2912cat >>conftest.$ac_ext <<_ACEOF
2913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
Martin v. Löwis11437992002-04-12 09:54:03 +00002915int
2916main ()
2917{
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002924if { (ac_try="$ac_compile"
2925case "(($ac_try" in
2926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927 *) ac_try_echo=$ac_try;;
2928esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002930 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002931 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002934 for ac_file in conftest.o conftest.obj conftest.*; do
2935 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2939 break;;
2940 esac
2941done
2942else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002944sed 's/^/| /' conftest.$ac_ext >&5
2945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002946{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002947See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002948echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002949See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002950 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002951fi
2952
2953rm -f conftest.$ac_cv_objext conftest.$ac_ext
2954fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002955{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2956echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002957OBJEXT=$ac_cv_objext
2958ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002959{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2960echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002961if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002962 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002963else
2964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002965/* confdefs.h. */
2966_ACEOF
2967cat confdefs.h >>conftest.$ac_ext
2968cat >>conftest.$ac_ext <<_ACEOF
2969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002970
Martin v. Löwis11437992002-04-12 09:54:03 +00002971int
2972main ()
2973{
2974#ifndef __GNUC__
2975 choke me
2976#endif
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002983if { (ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002991 grep -v '^ *+' conftest.er1 >conftest.err
2992 rm -f conftest.er1
2993 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002995 (exit $ac_status); } && {
2996 test -z "$ac_c_werror_flag" ||
2997 test ! -s conftest.err
2998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002999 ac_compiler_gnu=yes
3000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003002sed 's/^/| /' conftest.$ac_ext >&5
3003
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006
3007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003008ac_cv_c_compiler_gnu=$ac_compiler_gnu
3009
3010fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003011{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3012echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3013GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003014ac_test_CFLAGS=${CFLAGS+set}
3015ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003016{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3017echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003018if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003019 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003020else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003021 ac_save_c_werror_flag=$ac_c_werror_flag
3022 ac_c_werror_flag=yes
3023 ac_cv_prog_cc_g=no
3024 CFLAGS="-g"
3025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003026/* confdefs.h. */
3027_ACEOF
3028cat confdefs.h >>conftest.$ac_ext
3029cat >>conftest.$ac_ext <<_ACEOF
3030/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Martin v. Löwis11437992002-04-12 09:54:03 +00003032int
3033main ()
3034{
3035
3036 ;
3037 return 0;
3038}
3039_ACEOF
3040rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041if { (ac_try="$ac_compile"
3042case "(($ac_try" in
3043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3044 *) ac_try_echo=$ac_try;;
3045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003049 grep -v '^ *+' conftest.er1 >conftest.err
3050 rm -f conftest.er1
3051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053 (exit $ac_status); } && {
3054 test -z "$ac_c_werror_flag" ||
3055 test ! -s conftest.err
3056 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003057 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003060sed 's/^/| /' conftest.$ac_ext >&5
3061
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062 CFLAGS=""
3063 cat >conftest.$ac_ext <<_ACEOF
3064/* confdefs.h. */
3065_ACEOF
3066cat confdefs.h >>conftest.$ac_ext
3067cat >>conftest.$ac_ext <<_ACEOF
3068/* end confdefs.h. */
3069
3070int
3071main ()
3072{
3073
3074 ;
3075 return 0;
3076}
3077_ACEOF
3078rm -f conftest.$ac_objext
3079if { (ac_try="$ac_compile"
3080case "(($ac_try" in
3081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3082 *) ac_try_echo=$ac_try;;
3083esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003085 (eval "$ac_compile") 2>conftest.er1
3086 ac_status=$?
3087 grep -v '^ *+' conftest.er1 >conftest.err
3088 rm -f conftest.er1
3089 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003091 (exit $ac_status); } && {
3092 test -z "$ac_c_werror_flag" ||
3093 test ! -s conftest.err
3094 } && test -s conftest.$ac_objext; then
3095 :
3096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003097 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003098sed 's/^/| /' conftest.$ac_ext >&5
3099
3100 ac_c_werror_flag=$ac_save_c_werror_flag
3101 CFLAGS="-g"
3102 cat >conftest.$ac_ext <<_ACEOF
3103/* confdefs.h. */
3104_ACEOF
3105cat confdefs.h >>conftest.$ac_ext
3106cat >>conftest.$ac_ext <<_ACEOF
3107/* end confdefs.h. */
3108
3109int
3110main ()
3111{
3112
3113 ;
3114 return 0;
3115}
3116_ACEOF
3117rm -f conftest.$ac_objext
3118if { (ac_try="$ac_compile"
3119case "(($ac_try" in
3120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3121 *) ac_try_echo=$ac_try;;
3122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124 (eval "$ac_compile") 2>conftest.er1
3125 ac_status=$?
3126 grep -v '^ *+' conftest.er1 >conftest.err
3127 rm -f conftest.er1
3128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003130 (exit $ac_status); } && {
3131 test -z "$ac_c_werror_flag" ||
3132 test ! -s conftest.err
3133 } && test -s conftest.$ac_objext; then
3134 ac_cv_prog_cc_g=yes
3135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003136 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137sed 's/^/| /' conftest.$ac_ext >&5
3138
3139
Guido van Rossum627b2d71993-12-24 10:39:16 +00003140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003141
3142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003144
3145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3146fi
3147
3148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3149 ac_c_werror_flag=$ac_save_c_werror_flag
3150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003151{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3152echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003153if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003154 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003155elif test $ac_cv_prog_cc_g = yes; then
3156 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003157 CFLAGS="-g -O2"
3158 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003159 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003160 fi
3161else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003162 if test "$GCC" = yes; then
3163 CFLAGS="-O2"
3164 else
3165 CFLAGS=
3166 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003167fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003168{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3169echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003171 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003172else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003174ac_save_CC=$CC
3175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003176/* confdefs.h. */
3177_ACEOF
3178cat confdefs.h >>conftest.$ac_ext
3179cat >>conftest.$ac_ext <<_ACEOF
3180/* end confdefs.h. */
3181#include <stdarg.h>
3182#include <stdio.h>
3183#include <sys/types.h>
3184#include <sys/stat.h>
3185/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3186struct buf { int x; };
3187FILE * (*rcsopen) (struct buf *, struct stat *, int);
3188static char *e (p, i)
3189 char **p;
3190 int i;
3191{
3192 return p[i];
3193}
3194static char *f (char * (*g) (char **, int), char **p, ...)
3195{
3196 char *s;
3197 va_list v;
3198 va_start (v,p);
3199 s = g (p, va_arg (v,int));
3200 va_end (v);
3201 return s;
3202}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003203
3204/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3205 function prototypes and stuff, but not '\xHH' hex character constants.
3206 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003207 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003208 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3209 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003211int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3214 inside strings and character constants. */
3215#define FOO(x) 'x'
3216int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3217
Skip Montanaro6dead952003-09-25 14:50:04 +00003218int test (int i, double x);
3219struct s1 {int (*f) (int a);};
3220struct s2 {int (*f) (double a);};
3221int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3222int argc;
3223char **argv;
3224int
3225main ()
3226{
3227return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3228 ;
3229 return 0;
3230}
3231_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3233 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003234do
3235 CC="$ac_save_CC $ac_arg"
3236 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237if { (ac_try="$ac_compile"
3238case "(($ac_try" in
3239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3240 *) ac_try_echo=$ac_try;;
3241esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003243 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003245 grep -v '^ *+' conftest.er1 >conftest.err
3246 rm -f conftest.er1
3247 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003249 (exit $ac_status); } && {
3250 test -z "$ac_c_werror_flag" ||
3251 test ! -s conftest.err
3252 } && test -s conftest.$ac_objext; then
3253 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003254else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003256sed 's/^/| /' conftest.$ac_ext >&5
3257
Martin v. Löwiseba40652007-08-30 20:10:57 +00003258
Skip Montanaro6dead952003-09-25 14:50:04 +00003259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003260
3261rm -f core conftest.err conftest.$ac_objext
3262 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003263done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003264rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003265CC=$ac_save_CC
3266
3267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003268# AC_CACHE_VAL
3269case "x$ac_cv_prog_cc_c89" in
3270 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003271 { echo "$as_me:$LINENO: result: none needed" >&5
3272echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003274 { echo "$as_me:$LINENO: result: unsupported" >&5
3275echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003276 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003277 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003278 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3279echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003280esac
3281
Skip Montanaro6dead952003-09-25 14:50:04 +00003282
Martin v. Löwis11437992002-04-12 09:54:03 +00003283ac_ext=c
3284ac_cpp='$CPP $CPPFLAGS'
3285ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3286ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3287ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003288
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003289
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003290
3291
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003292{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3293echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294
Martin v. Löwiseba40652007-08-30 20:10:57 +00003295# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003297 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003298
3299 case $withval in
3300 no) with_cxx_main=no
3301 MAINCC='$(CC)';;
3302 yes) with_cxx_main=yes
3303 MAINCC='$(CXX)';;
3304 *) with_cxx_main=yes
3305 MAINCC=$withval
3306 if test -z "$CXX"
3307 then
3308 CXX=$withval
3309 fi;;
3310 esac
3311else
3312
3313 with_cxx_main=no
3314 MAINCC='$(CC)'
3315
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316fi
3317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003318{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3319echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003320
3321preset_cxx="$CXX"
3322if test -z "$CXX"
3323then
3324 case "$CC" in
3325 gcc) # Extract the first word of "g++", so it can be a program name with args.
3326set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003329if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003331else
3332 case $CXX in
3333 [\\/]* | ?:[\\/]*)
3334 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3335 ;;
3336 *)
3337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in notfound
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 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 +00003344 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003346 break 2
3347 fi
3348done
3349done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003350IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003351
3352 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3353 ;;
3354esac
3355fi
3356CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003358 { echo "$as_me:$LINENO: result: $CXX" >&5
3359echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003361 { echo "$as_me:$LINENO: result: no" >&5
3362echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003365 ;;
3366 cc) # Extract the first word of "c++", so it can be a program name with args.
3367set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003368{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003370if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003371 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003372else
3373 case $CXX in
3374 [\\/]* | ?:[\\/]*)
3375 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3376 ;;
3377 *)
3378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3379for as_dir in notfound
3380do
3381 IFS=$as_save_IFS
3382 test -z "$as_dir" && as_dir=.
3383 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003384 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 +00003385 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003386 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003387 break 2
3388 fi
3389done
3390done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003391IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003392
3393 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3394 ;;
3395esac
3396fi
3397CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003398if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003399 { echo "$as_me:$LINENO: result: $CXX" >&5
3400echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003401else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003402 { echo "$as_me:$LINENO: result: no" >&5
3403echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003405
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003406 ;;
3407 esac
3408 if test "$CXX" = "notfound"
3409 then
3410 CXX=""
3411 fi
3412fi
3413if test -z "$CXX"
3414then
3415 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3416do
3417 # Extract the first word of "$ac_prog", so it can be a program name with args.
3418set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003419{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3420echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003421if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003422 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003423else
3424 if test -n "$CXX"; then
3425 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3426else
3427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428for as_dir in $PATH
3429do
3430 IFS=$as_save_IFS
3431 test -z "$as_dir" && as_dir=.
3432 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433 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 +00003434 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003435 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003436 break 2
3437 fi
3438done
3439done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003440IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003441
3442fi
3443fi
3444CXX=$ac_cv_prog_CXX
3445if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003446 { echo "$as_me:$LINENO: result: $CXX" >&5
3447echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 { echo "$as_me:$LINENO: result: no" >&5
3450echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003451fi
3452
Martin v. Löwiseba40652007-08-30 20:10:57 +00003453
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454 test -n "$CXX" && break
3455done
3456test -n "$CXX" || CXX="notfound"
3457
3458 if test "$CXX" = "notfound"
3459 then
3460 CXX=""
3461 fi
3462fi
3463if test "$preset_cxx" != "$CXX"
3464then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003465 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003466
3467 By default, distutils will build C++ extension modules with \"$CXX\".
3468 If this is not intended, then set CXX on the configure command line.
3469 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003470echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003471
3472 By default, distutils will build C++ extension modules with \"$CXX\".
3473 If this is not intended, then set CXX on the configure command line.
3474 " >&2;}
3475fi
3476
3477
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003478# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003479
3480ac_ext=c
3481ac_cpp='$CPP $CPPFLAGS'
3482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3484ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003485{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3486echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003487# On Suns, sometimes $CPP names a directory.
3488if test -n "$CPP" && test -d "$CPP"; then
3489 CPP=
3490fi
3491if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003493 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003494else
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 # Double quotes because CPP needs to be expanded
3496 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3497 do
3498 ac_preproc_ok=false
3499for ac_c_preproc_warn_flag in '' yes
3500do
3501 # Use a header file that comes with gcc, so configuring glibc
3502 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003503 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3504 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003505 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # not just through cpp. "Syntax error" is here to catch this case.
3507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003508/* confdefs.h. */
3509_ACEOF
3510cat confdefs.h >>conftest.$ac_ext
3511cat >>conftest.$ac_ext <<_ACEOF
3512/* end confdefs.h. */
3513#ifdef __STDC__
3514# include <limits.h>
3515#else
3516# include <assert.h>
3517#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003518 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003519_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003520if { (ac_try="$ac_cpp conftest.$ac_ext"
3521case "(($ac_try" in
3522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3523 *) ac_try_echo=$ac_try;;
3524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003527 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003528 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 rm -f conftest.er1
3530 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532 (exit $ac_status); } >/dev/null && {
3533 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3534 test ! -s conftest.err
3535 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003536 :
3537else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003539sed 's/^/| /' conftest.$ac_ext >&5
3540
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 # Broken: fails on valid input.
3542continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003544
Martin v. Löwis11437992002-04-12 09:54:03 +00003545rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003546
Martin v. Löwiseba40652007-08-30 20:10:57 +00003547 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # can be detected and how.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003555#include <ac_nonexistent.h>
3556_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003557if { (ac_try="$ac_cpp conftest.$ac_ext"
3558case "(($ac_try" in
3559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560 *) ac_try_echo=$ac_try;;
3561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003563 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003564 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003565 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003566 rm -f conftest.er1
3567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003569 (exit $ac_status); } >/dev/null && {
3570 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3571 test ! -s conftest.err
3572 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 # Broken: success on invalid input.
3574continue
3575else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003577sed 's/^/| /' conftest.$ac_ext >&5
3578
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 # Passes both tests.
3580ac_preproc_ok=:
3581break
3582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584rm -f conftest.err conftest.$ac_ext
3585
3586done
3587# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3588rm -f conftest.err conftest.$ac_ext
3589if $ac_preproc_ok; then
3590 break
3591fi
3592
3593 done
3594 ac_cv_prog_CPP=$CPP
3595
3596fi
3597 CPP=$ac_cv_prog_CPP
3598else
3599 ac_cv_prog_CPP=$CPP
3600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003601{ echo "$as_me:$LINENO: result: $CPP" >&5
3602echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_preproc_ok=false
3604for ac_c_preproc_warn_flag in '' yes
3605do
3606 # Use a header file that comes with gcc, so configuring glibc
3607 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003608 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3609 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 # On the NeXT, cc -E runs the code through the compiler's parser,
3611 # not just through cpp. "Syntax error" is here to catch this case.
3612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003613/* confdefs.h. */
3614_ACEOF
3615cat confdefs.h >>conftest.$ac_ext
3616cat >>conftest.$ac_ext <<_ACEOF
3617/* end confdefs.h. */
3618#ifdef __STDC__
3619# include <limits.h>
3620#else
3621# include <assert.h>
3622#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003623 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625if { (ac_try="$ac_cpp conftest.$ac_ext"
3626case "(($ac_try" in
3627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3628 *) ac_try_echo=$ac_try;;
3629esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003634 rm -f conftest.er1
3635 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003637 (exit $ac_status); } >/dev/null && {
3638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3639 test ! -s conftest.err
3640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 :
3642else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003644sed 's/^/| /' conftest.$ac_ext >&5
3645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 # Broken: fails on valid input.
3647continue
3648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003649
Martin v. Löwis11437992002-04-12 09:54:03 +00003650rm -f conftest.err conftest.$ac_ext
3651
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003653 # can be detected and how.
3654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003655/* confdefs.h. */
3656_ACEOF
3657cat confdefs.h >>conftest.$ac_ext
3658cat >>conftest.$ac_ext <<_ACEOF
3659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003660#include <ac_nonexistent.h>
3661_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003662if { (ac_try="$ac_cpp conftest.$ac_ext"
3663case "(($ac_try" in
3664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3665 *) ac_try_echo=$ac_try;;
3666esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003667eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003670 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003671 rm -f conftest.er1
3672 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003674 (exit $ac_status); } >/dev/null && {
3675 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3676 test ! -s conftest.err
3677 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 # Broken: success on invalid input.
3679continue
3680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003682sed 's/^/| /' conftest.$ac_ext >&5
3683
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 # Passes both tests.
3685ac_preproc_ok=:
3686break
3687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003688
Martin v. Löwis11437992002-04-12 09:54:03 +00003689rm -f conftest.err conftest.$ac_ext
3690
3691done
3692# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3693rm -f conftest.err conftest.$ac_ext
3694if $ac_preproc_ok; then
3695 :
3696else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003697 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003698See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003700See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003701 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702fi
3703
3704ac_ext=c
3705ac_cpp='$CPP $CPPFLAGS'
3706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3708ac_compiler_gnu=$ac_cv_c_compiler_gnu
3709
3710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003711{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3712echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003713if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003715else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003716 # Extract the first word of "grep ggrep" to use in msg output
3717if test -z "$GREP"; then
3718set dummy grep ggrep; ac_prog_name=$2
3719if test "${ac_cv_path_GREP+set}" = set; then
3720 echo $ECHO_N "(cached) $ECHO_C" >&6
3721else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003723# Loop through the user's path and test for each of PROGNAME-LIST
3724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
3729 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
3731 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3732 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3733 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734 # Check for GNU $ac_path_GREP
3735case `"$ac_path_GREP" --version 2>&1` in
3736*GNU*)
3737 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3738*)
3739 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003740 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003741 while :
3742 do
3743 cat "conftest.in" "conftest.in" >"conftest.tmp"
3744 mv "conftest.tmp" "conftest.in"
3745 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003747 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3748 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3749 ac_count=`expr $ac_count + 1`
3750 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3751 # Best one so far, save it but keep looking for a better one
3752 ac_cv_path_GREP="$ac_path_GREP"
3753 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003754 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003755 # 10*(2^10) chars as input seems more than enough
3756 test $ac_count -gt 10 && break
3757 done
3758 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3759esac
3760
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003761
3762 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763 done
3764done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003765
3766done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003767IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003768
3769
3770fi
3771
3772GREP="$ac_cv_path_GREP"
3773if test -z "$GREP"; then
3774 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3775echo "$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 +00003776 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777fi
3778
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779else
3780 ac_cv_path_GREP=$GREP
3781fi
3782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003783
Martin v. Löwiseba40652007-08-30 20:10:57 +00003784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003785{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3786echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003787 GREP="$ac_cv_path_GREP"
3788
3789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003790{ echo "$as_me:$LINENO: checking for egrep" >&5
3791echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794else
3795 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3796 then ac_cv_path_EGREP="$GREP -E"
3797 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003798 # Extract the first word of "egrep" to use in msg output
3799if test -z "$EGREP"; then
3800set dummy egrep; ac_prog_name=$2
3801if test "${ac_cv_path_EGREP+set}" = set; then
3802 echo $ECHO_N "(cached) $ECHO_C" >&6
3803else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003805# Loop through the user's path and test for each of PROGNAME-LIST
3806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003807for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3808do
3809 IFS=$as_save_IFS
3810 test -z "$as_dir" && as_dir=.
3811 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812 for ac_exec_ext in '' $ac_executable_extensions; do
3813 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3814 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3815 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816 # Check for GNU $ac_path_EGREP
3817case `"$ac_path_EGREP" --version 2>&1` in
3818*GNU*)
3819 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3820*)
3821 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003822 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003823 while :
3824 do
3825 cat "conftest.in" "conftest.in" >"conftest.tmp"
3826 mv "conftest.tmp" "conftest.in"
3827 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003828 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3830 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3831 ac_count=`expr $ac_count + 1`
3832 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3833 # Best one so far, save it but keep looking for a better one
3834 ac_cv_path_EGREP="$ac_path_EGREP"
3835 ac_path_EGREP_max=$ac_count
3836 fi
3837 # 10*(2^10) chars as input seems more than enough
3838 test $ac_count -gt 10 && break
3839 done
3840 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3841esac
3842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003843
3844 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845 done
3846done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003847
3848done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003849IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003850
3851
3852fi
3853
3854EGREP="$ac_cv_path_EGREP"
3855if test -z "$EGREP"; then
3856 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3857echo "$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 +00003858 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003859fi
3860
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861else
3862 ac_cv_path_EGREP=$EGREP
3863fi
3864
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003865
Martin v. Löwiseba40652007-08-30 20:10:57 +00003866 fi
3867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003868{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3869echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003871
3872
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003873
3874{ echo "$as_me:$LINENO: checking for AIX" >&5
3875echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3876cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003877/* confdefs.h. */
3878_ACEOF
3879cat confdefs.h >>conftest.$ac_ext
3880cat >>conftest.$ac_ext <<_ACEOF
3881/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003882#ifdef _AIX
3883 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003884#endif
3885
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003886_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3888 $EGREP "yes" >/dev/null 2>&1; then
3889 { echo "$as_me:$LINENO: result: yes" >&5
3890echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003891cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003892#define _ALL_SOURCE 1
3893_ACEOF
3894
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003895else
3896 { echo "$as_me:$LINENO: result: no" >&5
3897echo "${ECHO_T}no" >&6; }
3898fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003899rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900
3901
3902
3903# Check for unsupported systems
3904case $ac_sys_system/$ac_sys_release in
3905atheos*|Linux*/1*)
3906 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3907 echo See README for details.
3908 exit 1;;
3909esac
3910
3911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3913echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003914
3915# Check whether --with-suffix was given.
3916if test "${with_suffix+set}" = set; then
3917 withval=$with_suffix;
3918 case $withval in
3919 no) EXEEXT=;;
3920 yes) EXEEXT=.exe;;
3921 *) EXEEXT=$withval;;
3922 esac
3923fi
3924
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003925{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3926echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003927
3928# Test whether we're running on a non-case-sensitive system, in which
3929# case we give a warning if no ext is given
3930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003931{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3932echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003933if test ! -d CaseSensitiveTestDir; then
3934mkdir CaseSensitiveTestDir
3935fi
3936
3937if test -d casesensitivetestdir
3938then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003939 { echo "$as_me:$LINENO: result: yes" >&5
3940echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003941 BUILDEXEEXT=.exe
3942else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003943 { echo "$as_me:$LINENO: result: no" >&5
3944echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003945 BUILDEXEEXT=$EXEEXT
3946fi
3947rmdir CaseSensitiveTestDir
3948
3949case $MACHDEP in
3950bsdos*)
3951 case $CC in
3952 gcc) CC="$CC -D_HAVE_BSDI";;
3953 esac;;
3954esac
3955
3956case $ac_sys_system in
3957hp*|HP*)
3958 case $CC in
3959 cc|*/cc) CC="$CC -Ae";;
3960 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003961SunOS*)
3962 # Some functions have a prototype only with that define, e.g. confstr
3963
3964cat >>confdefs.h <<\_ACEOF
3965#define __EXTENSIONS__ 1
3966_ACEOF
3967
3968 ;;
3969esac
3970
3971
3972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003973{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3974echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003975if test -z "$LIBRARY"
3976then
3977 LIBRARY='libpython$(VERSION).a'
3978fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003979{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3980echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003981
3982# LDLIBRARY is the name of the library to link against (as opposed to the
3983# name of the library into which to insert object files). BLDLIBRARY is also
3984# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3985# is blank as the main program is not linked directly against LDLIBRARY.
3986# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3987# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3988# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3989# DLLLIBRARY is the shared (i.e., DLL) library.
3990#
3991# RUNSHARED is used to run shared python without installed libraries
3992#
3993# INSTSONAME is the name of the shared library that will be use to install
3994# on the system - some systems like version suffix, others don't
3995
3996
3997
3998
3999
4000
4001LDLIBRARY="$LIBRARY"
4002BLDLIBRARY='$(LDLIBRARY)'
4003INSTSONAME='$(LDLIBRARY)'
4004DLLLIBRARY=''
4005LDLIBRARYDIR=''
4006RUNSHARED=''
4007
4008# LINKCC is the command that links the python executable -- default is $(CC).
4009# If CXX is set, and if it is needed to link a main function that was
4010# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4011# python might then depend on the C++ runtime
4012# This is altered for AIX in order to build the export list before
4013# linking.
4014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004015{ echo "$as_me:$LINENO: checking LINKCC" >&5
4016echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004017if test -z "$LINKCC"
4018then
4019 LINKCC='$(PURIFY) $(MAINCC)'
4020 case $ac_sys_system in
4021 AIX*)
4022 exp_extra="\"\""
4023 if test $ac_sys_release -ge 5 -o \
4024 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4025 exp_extra="."
4026 fi
4027 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004028 QNX*)
4029 # qcc must be used because the other compilers do not
4030 # support -N.
4031 LINKCC=qcc;;
4032 esac
4033fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004034{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4035echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004036
4037# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4038# make sure we default having it set to "no": this is used by
4039# distutils.unixccompiler to know if it should add --enable-new-dtags
4040# to linker command lines, and failing to detect GNU ld simply results
4041# in the same bahaviour as before.
4042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004043{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4044echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004045ac_prog=ld
4046if test "$GCC" = yes; then
4047 ac_prog=`$CC -print-prog-name=ld`
4048fi
4049case `"$ac_prog" -V 2>&1 < /dev/null` in
4050 *GNU*)
4051 GNULD=yes;;
4052 *)
4053 GNULD=no;;
4054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004055{ echo "$as_me:$LINENO: result: $GNULD" >&5
4056echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004057
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004058{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4059echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004060# Check whether --enable-shared was given.
4061if test "${enable_shared+set}" = set; then
4062 enableval=$enable_shared;
4063fi
4064
4065
4066if test -z "$enable_shared"
4067then
4068 case $ac_sys_system in
4069 CYGWIN* | atheos*)
4070 enable_shared="yes";;
4071 *)
4072 enable_shared="no";;
4073 esac
4074fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004075{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4076echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004077
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4079echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004080# Check whether --enable-profiling was given.
4081if test "${enable_profiling+set}" = set; then
4082 enableval=$enable_profiling; ac_save_cc="$CC"
4083 CC="$CC -pg"
4084 if test "$cross_compiling" = yes; then
4085 ac_enable_profiling="no"
4086else
4087 cat >conftest.$ac_ext <<_ACEOF
4088/* confdefs.h. */
4089_ACEOF
4090cat confdefs.h >>conftest.$ac_ext
4091cat >>conftest.$ac_ext <<_ACEOF
4092/* end confdefs.h. */
4093int main() { return 0; }
4094_ACEOF
4095rm -f conftest$ac_exeext
4096if { (ac_try="$ac_link"
4097case "(($ac_try" in
4098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4099 *) ac_try_echo=$ac_try;;
4100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004102 (eval "$ac_link") 2>&5
4103 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4106 { (case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004111 (eval "$ac_try") 2>&5
4112 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004114 (exit $ac_status); }; }; then
4115 ac_enable_profiling="yes"
4116else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004117 echo "$as_me: program exited with status $ac_status" >&5
4118echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004119sed 's/^/| /' conftest.$ac_ext >&5
4120
4121( exit $ac_status )
4122ac_enable_profiling="no"
4123fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4125fi
4126
4127
4128 CC="$ac_save_cc"
4129fi
4130
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004131{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4132echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004133
4134case "$ac_enable_profiling" in
4135 "yes")
4136 BASECFLAGS="-pg $BASECFLAGS"
4137 LDFLAGS="-pg $LDFLAGS"
4138 ;;
4139esac
4140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004141{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4142echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004143
4144# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4145# library that we build, but we do not want to link against it (we
4146# will find it with a -framework option). For this reason there is an
4147# extra variable BLDLIBRARY against which Python and the extension
4148# modules are linked, BLDLIBRARY. This is normally the same as
4149# LDLIBRARY, but empty for MacOSX framework builds.
4150if test "$enable_framework"
4151then
4152 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4153 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4154 BLDLIBRARY=''
4155else
4156 BLDLIBRARY='$(LDLIBRARY)'
4157fi
4158
4159# Other platforms follow
4160if test $enable_shared = "yes"; then
4161
4162cat >>confdefs.h <<\_ACEOF
4163#define Py_ENABLE_SHARED 1
4164_ACEOF
4165
4166 case $ac_sys_system in
4167 BeOS*)
4168 LDLIBRARY='libpython$(VERSION).so'
4169 ;;
4170 CYGWIN*)
4171 LDLIBRARY='libpython$(VERSION).dll.a'
4172 DLLLIBRARY='libpython$(VERSION).dll'
4173 ;;
4174 SunOS*)
4175 LDLIBRARY='libpython$(VERSION).so'
4176 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4177 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4178 INSTSONAME="$LDLIBRARY".$SOVERSION
4179 ;;
4180 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4181 LDLIBRARY='libpython$(VERSION).so'
4182 BLDLIBRARY='-L. -lpython$(VERSION)'
4183 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4184 case $ac_sys_system in
4185 FreeBSD*)
4186 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4187 ;;
4188 esac
4189 INSTSONAME="$LDLIBRARY".$SOVERSION
4190 ;;
4191 hp*|HP*)
4192 case `uname -m` in
4193 ia64)
4194 LDLIBRARY='libpython$(VERSION).so'
4195 ;;
4196 *)
4197 LDLIBRARY='libpython$(VERSION).sl'
4198 ;;
4199 esac
4200 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4201 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4202 ;;
4203 OSF*)
4204 LDLIBRARY='libpython$(VERSION).so'
4205 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4206 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4207 ;;
4208 atheos*)
4209 LDLIBRARY='libpython$(VERSION).so'
4210 BLDLIBRARY='-L. -lpython$(VERSION)'
4211 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4212 ;;
4213 Darwin*)
4214 LDLIBRARY='libpython$(VERSION).dylib'
4215 BLDLIBRARY='-L. -lpython$(VERSION)'
4216 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4217 ;;
4218
4219 esac
4220else # shared is disabled
4221 case $ac_sys_system in
4222 CYGWIN*)
4223 BLDLIBRARY='$(LIBRARY)'
4224 LDLIBRARY='libpython$(VERSION).dll.a'
4225 ;;
4226 esac
4227fi
4228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004229{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4230echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004231
4232if test -n "$ac_tool_prefix"; then
4233 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4234set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004235{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4236echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004237if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004238 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004239else
4240 if test -n "$RANLIB"; then
4241 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4242else
4243as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244for as_dir in $PATH
4245do
4246 IFS=$as_save_IFS
4247 test -z "$as_dir" && as_dir=.
4248 for ac_exec_ext in '' $ac_executable_extensions; do
4249 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4250 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004251 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004252 break 2
4253 fi
4254done
4255done
4256IFS=$as_save_IFS
4257
4258fi
4259fi
4260RANLIB=$ac_cv_prog_RANLIB
4261if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004262 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4263echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004265 { echo "$as_me:$LINENO: result: no" >&5
4266echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004267fi
4268
4269
4270fi
4271if test -z "$ac_cv_prog_RANLIB"; then
4272 ac_ct_RANLIB=$RANLIB
4273 # Extract the first word of "ranlib", so it can be a program name with args.
4274set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004275{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4276echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004277if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004278 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004279else
4280 if test -n "$ac_ct_RANLIB"; then
4281 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4282else
4283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284for as_dir in $PATH
4285do
4286 IFS=$as_save_IFS
4287 test -z "$as_dir" && as_dir=.
4288 for ac_exec_ext in '' $ac_executable_extensions; do
4289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4290 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004291 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004292 break 2
4293 fi
4294done
4295done
4296IFS=$as_save_IFS
4297
4298fi
4299fi
4300ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4301if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004302 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4303echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004304else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004305 { echo "$as_me:$LINENO: result: no" >&5
4306echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004307fi
4308
4309 if test "x$ac_ct_RANLIB" = x; then
4310 RANLIB=":"
4311 else
4312 case $cross_compiling:$ac_tool_warned in
4313yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004314{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4315whose name does not start with the host triplet. If you think this
4316configuration is useful to you, please write to autoconf@gnu.org." >&5
4317echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4318whose name does not start with the host triplet. If you think this
4319configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004320ac_tool_warned=yes ;;
4321esac
4322 RANLIB=$ac_ct_RANLIB
4323 fi
4324else
4325 RANLIB="$ac_cv_prog_RANLIB"
4326fi
4327
4328
4329for ac_prog in ar aal
4330do
4331 # Extract the first word of "$ac_prog", so it can be a program name with args.
4332set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004333{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004335if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004336 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004337else
4338 if test -n "$AR"; then
4339 ac_cv_prog_AR="$AR" # Let the user override the test.
4340else
4341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4342for as_dir in $PATH
4343do
4344 IFS=$as_save_IFS
4345 test -z "$as_dir" && as_dir=.
4346 for ac_exec_ext in '' $ac_executable_extensions; do
4347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4348 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004349 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350 break 2
4351 fi
4352done
4353done
4354IFS=$as_save_IFS
4355
4356fi
4357fi
4358AR=$ac_cv_prog_AR
4359if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004360 { echo "$as_me:$LINENO: result: $AR" >&5
4361echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004363 { echo "$as_me:$LINENO: result: no" >&5
4364echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365fi
4366
4367
4368 test -n "$AR" && break
4369done
4370test -n "$AR" || AR="ar"
4371
4372
4373# tweak ARFLAGS only if the user didn't set it on the command line
4374
4375if test -z "$ARFLAGS"
4376then
4377 ARFLAGS="rc"
4378fi
4379
4380
4381# Extract the first word of "svnversion", so it can be a program name with args.
4382set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004385if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004386 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004387else
4388 if test -n "$SVNVERSION"; then
4389 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4390else
4391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4392for as_dir in $PATH
4393do
4394 IFS=$as_save_IFS
4395 test -z "$as_dir" && as_dir=.
4396 for ac_exec_ext in '' $ac_executable_extensions; do
4397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4398 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004399 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004400 break 2
4401 fi
4402done
4403done
4404IFS=$as_save_IFS
4405
4406 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4407fi
4408fi
4409SVNVERSION=$ac_cv_prog_SVNVERSION
4410if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004411 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4412echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004413else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004414 { echo "$as_me:$LINENO: result: no" >&5
4415echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004416fi
4417
4418
4419if test $SVNVERSION = found
4420then
4421 SVNVERSION="svnversion \$(srcdir)"
4422else
4423 SVNVERSION="echo Unversioned directory"
4424fi
4425
4426case $MACHDEP in
4427bsdos*|hp*|HP*)
4428 # install -d does not work on BSDI or HP-UX
4429 if test -z "$INSTALL"
4430 then
4431 INSTALL="${srcdir}/install-sh -c"
4432 fi
4433esac
4434ac_aux_dir=
4435for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4436 if test -f "$ac_dir/install-sh"; then
4437 ac_aux_dir=$ac_dir
4438 ac_install_sh="$ac_aux_dir/install-sh -c"
4439 break
4440 elif test -f "$ac_dir/install.sh"; then
4441 ac_aux_dir=$ac_dir
4442 ac_install_sh="$ac_aux_dir/install.sh -c"
4443 break
4444 elif test -f "$ac_dir/shtool"; then
4445 ac_aux_dir=$ac_dir
4446 ac_install_sh="$ac_aux_dir/shtool install -c"
4447 break
4448 fi
4449done
4450if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004451 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4452echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004453 { (exit 1); exit 1; }; }
4454fi
4455
4456# These three variables are undocumented and unsupported,
4457# and are intended to be withdrawn in a future Autoconf release.
4458# They can cause serious problems if a builder's source tree is in a directory
4459# whose full name contains unusual characters.
4460ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4461ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4462ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4463
4464
4465# Find a good install program. We prefer a C program (faster),
4466# so one script is as good as another. But avoid the broken or
4467# incompatible versions:
4468# SysV /etc/install, /usr/sbin/install
4469# SunOS /usr/etc/install
4470# IRIX /sbin/install
4471# AIX /bin/install
4472# AmigaOS /C/install, which installs bootblocks on floppy discs
4473# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4474# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4475# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4476# OS/2's system install, which has a completely different semantic
4477# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004478{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4479echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004480if test -z "$INSTALL"; then
4481if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004482 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004483else
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in $PATH
4486do
4487 IFS=$as_save_IFS
4488 test -z "$as_dir" && as_dir=.
4489 # Account for people who put trailing slashes in PATH elements.
4490case $as_dir/ in
4491 ./ | .// | /cC/* | \
4492 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4493 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4494 /usr/ucb/* ) ;;
4495 *)
4496 # OSF1 and SCO ODT 3.0 have their own names for install.
4497 # Don't use installbsd from OSF since it installs stuff as root
4498 # by default.
4499 for ac_prog in ginstall scoinst install; do
4500 for ac_exec_ext in '' $ac_executable_extensions; do
4501 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4502 if test $ac_prog = install &&
4503 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4504 # AIX install. It has an incompatible calling convention.
4505 :
4506 elif test $ac_prog = install &&
4507 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4508 # program-specific install script used by HP pwplus--don't use.
4509 :
4510 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004511 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4512 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004513 fi
4514 fi
4515 done
4516 done
4517 ;;
4518esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004519done
4520IFS=$as_save_IFS
4521
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004522
4523fi
4524 if test "${ac_cv_path_install+set}" = set; then
4525 INSTALL=$ac_cv_path_install
4526 else
4527 # As a last resort, use the slow shell script. Don't cache a
4528 # value for INSTALL within a source directory, because that will
4529 # break other packages using the cache if that directory is
4530 # removed, or if the value is a relative name.
4531 INSTALL=$ac_install_sh
4532 fi
4533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4535echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004536
4537# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4538# It thinks the first close brace ends the variable substitution.
4539test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4540
4541test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4542
4543test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4544
4545
4546# Not every filesystem supports hard links
4547
4548if test -z "$LN" ; then
4549 case $ac_sys_system in
4550 BeOS*) LN="ln -s";;
4551 CYGWIN*) LN="ln -s";;
4552 atheos*) LN="ln -s";;
4553 *) LN=ln;;
4554 esac
4555fi
4556
4557# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004558{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4559echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004560
4561# Check whether --with-pydebug was given.
4562if test "${with_pydebug+set}" = set; then
4563 withval=$with_pydebug;
4564if test "$withval" != no
4565then
4566
4567cat >>confdefs.h <<\_ACEOF
4568#define Py_DEBUG 1
4569_ACEOF
4570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004571 { echo "$as_me:$LINENO: result: yes" >&5
4572echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004573 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004574else { echo "$as_me:$LINENO: result: no" >&5
4575echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004576fi
4577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004578 { echo "$as_me:$LINENO: result: no" >&5
4579echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004580fi
4581
4582
4583# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4584# merged with this chunk of code?
4585
4586# Optimizer/debugger flags
4587# ------------------------
4588# (The following bit of code is complicated enough - please keep things
4589# indented properly. Just pretend you're editing Python code. ;-)
4590
4591# There are two parallel sets of case statements below, one that checks to
4592# see if OPT was set and one that does BASECFLAGS setting based upon
4593# compiler and platform. BASECFLAGS tweaks need to be made even if the
4594# user set OPT.
4595
4596# tweak OPT based on compiler and platform, only if the user didn't set
4597# it on the command line
4598
4599if test -z "$OPT"
4600then
4601 case $GCC in
4602 yes)
4603 if test "$CC" != 'g++' ; then
4604 STRICT_PROTO="-Wstrict-prototypes"
4605 fi
4606 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4607 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4608 WRAP="-fwrapv"
4609 fi
4610 case $ac_cv_prog_cc_g in
4611 yes)
4612 if test "$Py_DEBUG" = 'true' ; then
4613 # Optimization messes up debuggers, so turn it off for
4614 # debug builds.
4615 OPT="-g -Wall $STRICT_PROTO"
4616 else
4617 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4618 fi
4619 ;;
4620 *)
4621 OPT="-O3 -Wall $STRICT_PROTO"
4622 ;;
4623 esac
4624 case $ac_sys_system in
4625 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4626 ;;
4627 esac
4628 ;;
4629
4630 *)
4631 OPT="-O"
4632 ;;
4633 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004634fi
4635
4636
4637
4638# The -arch flags for universal builds on OSX
4639UNIVERSAL_ARCH_FLAGS=
4640
4641
4642# tweak BASECFLAGS based on compiler and platform
4643case $GCC in
4644yes)
4645 # Python violates C99 rules, by casting between incompatible
4646 # pointer types. GCC may generate bad code as a result of that,
4647 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004648 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4649echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650 ac_save_cc="$CC"
4651 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004652 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4653 echo $ECHO_N "(cached) $ECHO_C" >&6
4654else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004655 cat >conftest.$ac_ext <<_ACEOF
4656/* confdefs.h. */
4657_ACEOF
4658cat confdefs.h >>conftest.$ac_ext
4659cat >>conftest.$ac_ext <<_ACEOF
4660/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004661
4662int
4663main ()
4664{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004665int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004666 ;
4667 return 0;
4668}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004669_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004670rm -f conftest.$ac_objext
4671if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004672case "(($ac_try" in
4673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4674 *) ac_try_echo=$ac_try;;
4675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004677 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004678 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004679 grep -v '^ *+' conftest.er1 >conftest.err
4680 rm -f conftest.er1
4681 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004683 (exit $ac_status); } && {
4684 test -z "$ac_c_werror_flag" ||
4685 test ! -s conftest.err
4686 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004687 ac_cv_no_strict_aliasing_ok=yes
4688else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004689 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004690sed 's/^/| /' conftest.$ac_ext >&5
4691
Gregory P. Smith373469a2009-11-01 21:03:38 +00004692 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004693fi
4694
Gregory P. Smith373469a2009-11-01 21:03:38 +00004695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004696fi
4697
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004698 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004699 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4700echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 if test $ac_cv_no_strict_aliasing_ok = yes
4702 then
4703 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4704 fi
4705
4706 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4707 # support. Without this, treatment of subnormals doesn't follow
4708 # the standard.
4709 case $ac_sys_machine in
4710 alpha*)
4711 BASECFLAGS="$BASECFLAGS -mieee"
4712 ;;
4713 esac
4714
4715 case $ac_sys_system in
4716 SCO_SV*)
4717 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4718 ;;
4719 # is there any other compiler on Darwin besides gcc?
4720 Darwin*)
4721 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4722 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004723 if test "${CC}" = gcc
4724 then
4725 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4726echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4727 case "${UNIVERSALSDK}" in
4728 */MacOSX10.4u.sdk)
4729 # Build using 10.4 SDK, force usage of gcc when the
4730 # compiler is gcc, otherwise the user will get very
4731 # confusing error messages when building on OSX 10.6
4732 CC=gcc-4.0
4733 CPP=cpp-4.0
4734 ;;
4735 esac
4736 { echo "$as_me:$LINENO: result: $CC" >&5
4737echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004738 fi
4739
4740 # Calculate the right deployment target for this build.
4741 #
4742 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4743 if test ${cur_target} '>' 10.2; then
4744 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004745 if test ${enable_universalsdk}; then
4746 if test "${UNIVERSAL_ARCHS}" = "all"; then
4747 # Ensure that the default platform for a
4748 # 4-way universal build is OSX 10.5,
4749 # that's the first OS release where
4750 # 4-way builds make sense.
4751 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004752
4753 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4754 cur_target='10.5'
4755
4756 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4757 cur_target='10.5'
4758
4759 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4760 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004761 fi
4762 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004763 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004764 # On Intel macs default to a deployment
4765 # target of 10.4, that's the first OSX
4766 # release with Intel support.
4767 cur_target="10.4"
4768 fi
4769 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004770 fi
4771 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4772
4773 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4774 # environment with a value that is the same as what we'll use
4775 # in the Makefile to ensure that we'll get the same compiler
4776 # environment during configure and build time.
4777 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4778 export MACOSX_DEPLOYMENT_TARGET
4779 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4780
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004781 if test "${enable_universalsdk}"; then
4782 UNIVERSAL_ARCH_FLAGS=""
4783 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4784 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4785 ARCH_RUN_32BIT=""
4786 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4787
4788
4789 # You have to use different flags on various versions of
4790 # OSX to extract PPC code from an universal binary, basically
4791 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4792 # newer.
4793 # Because '-arch pp7400' works on OSX 10.5 or higher this
4794 # test is only present in the '32-bit' branch, all other
4795 # branches require OSX 10.5 to compile.
4796
4797 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4798echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4799 FN="test.$$"
4800 cat >${FN}.c <<-EOF
4801 int main() { return 0; }
4802EOF
4803 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4804 if test $? != 0 ; then
4805 rm ${FN} ${FN}.c
4806 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4807echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4808 else
4809 lipo -extract -output "${FN}.out" -arch ppc7400 "${FN}" 2>/dev/null
4810 if test $? != 0 ; then
4811 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4812 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4813echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4814 else
4815 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4816echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4817 fi
4818 rm -f ${FN} ${FN}.c ${FN}.out
4819 fi
4820
4821 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4822 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4823 LIPO_32BIT_FLAGS=""
4824 ARCH_RUN_32BIT="true"
4825
4826 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4827 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4828 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004829 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004830
4831 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4832 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4833 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004834 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004835
4836 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4837 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4838 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004839 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004840
4841 else
4842 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4843echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4844 { (exit 1); exit 1; }; }
4845
4846 fi
4847
4848
4849 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4850 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4851 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4852 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4853 CPPFLAGS="-isysroot ${UNIVERSALSDK}"
4854 fi
4855
4856 fi
4857
4858
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004859 ;;
4860 OSF*)
4861 BASECFLAGS="$BASECFLAGS -mieee"
4862 ;;
4863 esac
4864 ;;
4865
4866*)
4867 case $ac_sys_system in
4868 OpenUNIX*|UnixWare*)
4869 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4870 ;;
4871 OSF*)
4872 BASECFLAGS="$BASECFLAGS -ieee -std"
4873 ;;
4874 SCO_SV*)
4875 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4876 ;;
4877 esac
4878 ;;
4879esac
4880
4881if test "$Py_DEBUG" = 'true'; then
4882 :
4883else
4884 OPT="-DNDEBUG $OPT"
4885fi
4886
4887if test "$ac_arch_flags"
4888then
4889 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4890fi
4891
4892# disable check for icc since it seems to pass, but generates a warning
4893if test "$CC" = icc
4894then
4895 ac_cv_opt_olimit_ok=no
4896fi
4897
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004898{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4899echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004900if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004901 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004902else
4903 ac_save_cc="$CC"
4904CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004905cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004911
4912int
4913main ()
4914{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004916 ;
4917 return 0;
4918}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004919_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920rm -f conftest.$ac_objext
4921if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004922case "(($ac_try" in
4923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4924 *) ac_try_echo=$ac_try;;
4925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004927 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004928 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004929 grep -v '^ *+' conftest.er1 >conftest.err
4930 rm -f conftest.er1
4931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004933 (exit $ac_status); } && {
4934 test -z "$ac_c_werror_flag" ||
4935 test ! -s conftest.err
4936 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004937 ac_cv_opt_olimit_ok=yes
4938else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004939 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004940sed 's/^/| /' conftest.$ac_ext >&5
4941
Gregory P. Smith373469a2009-11-01 21:03:38 +00004942 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004943fi
4944
Gregory P. Smith373469a2009-11-01 21:03:38 +00004945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004946CC="$ac_save_cc"
4947fi
4948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004949{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4950echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004951if test $ac_cv_opt_olimit_ok = yes; then
4952 case $ac_sys_system in
4953 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4954 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4955 # environment?
4956 Darwin*)
4957 ;;
4958 *)
4959 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4960 ;;
4961 esac
4962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004963 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4964echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004965 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004966 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004967else
4968 ac_save_cc="$CC"
4969 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970 cat >conftest.$ac_ext <<_ACEOF
4971/* confdefs.h. */
4972_ACEOF
4973cat confdefs.h >>conftest.$ac_ext
4974cat >>conftest.$ac_ext <<_ACEOF
4975/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004976
4977int
4978main ()
4979{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004981 ;
4982 return 0;
4983}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004984_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004985rm -f conftest.$ac_objext
4986if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987case "(($ac_try" in
4988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4989 *) ac_try_echo=$ac_try;;
4990esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004992 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004993 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004994 grep -v '^ *+' conftest.er1 >conftest.err
4995 rm -f conftest.er1
4996 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004998 (exit $ac_status); } && {
4999 test -z "$ac_c_werror_flag" ||
5000 test ! -s conftest.err
5001 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002 ac_cv_olimit_ok=yes
5003else
Gregory P. Smith373469a2009-11-01 21:03:38 +00005004 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005005sed 's/^/| /' conftest.$ac_ext >&5
5006
Gregory P. Smith373469a2009-11-01 21:03:38 +00005007 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005008fi
5009
Gregory P. Smith373469a2009-11-01 21:03:38 +00005010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005011 CC="$ac_save_cc"
5012fi
5013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005014 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5015echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005016 if test $ac_cv_olimit_ok = yes; then
5017 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5018 fi
5019fi
5020
5021# Check whether GCC supports PyArg_ParseTuple format
5022if test "$GCC" = "yes"
5023then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005024 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5025echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005026 save_CFLAGS=$CFLAGS
5027 CFLAGS="$CFLAGS -Werror"
5028 cat >conftest.$ac_ext <<_ACEOF
5029/* confdefs.h. */
5030_ACEOF
5031cat confdefs.h >>conftest.$ac_ext
5032cat >>conftest.$ac_ext <<_ACEOF
5033/* end confdefs.h. */
5034
5035 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5036
5037int
5038main ()
5039{
5040
5041 ;
5042 return 0;
5043}
5044_ACEOF
5045rm -f conftest.$ac_objext
5046if { (ac_try="$ac_compile"
5047case "(($ac_try" in
5048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5049 *) ac_try_echo=$ac_try;;
5050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005052 (eval "$ac_compile") 2>conftest.er1
5053 ac_status=$?
5054 grep -v '^ *+' conftest.er1 >conftest.err
5055 rm -f conftest.er1
5056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005058 (exit $ac_status); } && {
5059 test -z "$ac_c_werror_flag" ||
5060 test ! -s conftest.err
5061 } && test -s conftest.$ac_objext; then
5062
5063cat >>confdefs.h <<\_ACEOF
5064#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5065_ACEOF
5066
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005067 { echo "$as_me:$LINENO: result: yes" >&5
5068echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005070 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071sed 's/^/| /' conftest.$ac_ext >&5
5072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005073 { echo "$as_me:$LINENO: result: no" >&5
5074echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005075
5076fi
5077
5078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5079 CFLAGS=$save_CFLAGS
5080fi
5081
5082# On some compilers, pthreads are available without further options
5083# (e.g. MacOS X). On some of these systems, the compiler will not
5084# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5085# So we have to see first whether pthreads are available without
5086# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005087{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5088echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005090 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005091else
5092 if test "$cross_compiling" = yes; then
5093 ac_cv_pthread_is_default=no
5094else
5095 cat >conftest.$ac_ext <<_ACEOF
5096/* confdefs.h. */
5097_ACEOF
5098cat confdefs.h >>conftest.$ac_ext
5099cat >>conftest.$ac_ext <<_ACEOF
5100/* end confdefs.h. */
5101
5102#include <pthread.h>
5103
5104void* routine(void* p){return NULL;}
5105
5106int main(){
5107 pthread_t p;
5108 if(pthread_create(&p,NULL,routine,NULL)!=0)
5109 return 1;
5110 (void)pthread_detach(p);
5111 return 0;
5112}
5113
5114_ACEOF
5115rm -f conftest$ac_exeext
5116if { (ac_try="$ac_link"
5117case "(($ac_try" in
5118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5119 *) ac_try_echo=$ac_try;;
5120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005122 (eval "$ac_link") 2>&5
5123 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5126 { (case "(($ac_try" in
5127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5128 *) ac_try_echo=$ac_try;;
5129esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005131 (eval "$ac_try") 2>&5
5132 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005134 (exit $ac_status); }; }; then
5135
5136 ac_cv_pthread_is_default=yes
5137 ac_cv_kthread=no
5138 ac_cv_pthread=no
5139
5140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005141 echo "$as_me: program exited with status $ac_status" >&5
5142echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005143sed 's/^/| /' conftest.$ac_ext >&5
5144
5145( exit $ac_status )
5146ac_cv_pthread_is_default=no
5147fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5149fi
5150
5151
5152
5153fi
5154
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005155{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5156echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157
5158
5159if test $ac_cv_pthread_is_default = yes
5160then
5161 ac_cv_kpthread=no
5162else
5163# -Kpthread, if available, provides the right #defines
5164# and linker options to make pthread_create available
5165# Some compilers won't report that they do not support -Kpthread,
5166# so we need to run a program to see whether it really made the
5167# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005168{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5169echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005170if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005171 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172else
5173 ac_save_cc="$CC"
5174CC="$CC -Kpthread"
5175if test "$cross_compiling" = yes; then
5176 ac_cv_kpthread=no
5177else
5178 cat >conftest.$ac_ext <<_ACEOF
5179/* confdefs.h. */
5180_ACEOF
5181cat confdefs.h >>conftest.$ac_ext
5182cat >>conftest.$ac_ext <<_ACEOF
5183/* end confdefs.h. */
5184
5185#include <pthread.h>
5186
5187void* routine(void* p){return NULL;}
5188
5189int main(){
5190 pthread_t p;
5191 if(pthread_create(&p,NULL,routine,NULL)!=0)
5192 return 1;
5193 (void)pthread_detach(p);
5194 return 0;
5195}
5196
5197_ACEOF
5198rm -f conftest$ac_exeext
5199if { (ac_try="$ac_link"
5200case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205 (eval "$ac_link") 2>&5
5206 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5209 { (case "(($ac_try" in
5210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5211 *) ac_try_echo=$ac_try;;
5212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214 (eval "$ac_try") 2>&5
5215 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217 (exit $ac_status); }; }; then
5218 ac_cv_kpthread=yes
5219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005220 echo "$as_me: program exited with status $ac_status" >&5
5221echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005222sed 's/^/| /' conftest.$ac_ext >&5
5223
5224( exit $ac_status )
5225ac_cv_kpthread=no
5226fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5228fi
5229
5230
5231CC="$ac_save_cc"
5232fi
5233
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005234{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5235echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236fi
5237
5238if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5239then
5240# -Kthread, if available, provides the right #defines
5241# and linker options to make pthread_create available
5242# Some compilers won't report that they do not support -Kthread,
5243# so we need to run a program to see whether it really made the
5244# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005245{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5246echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005247if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005248 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249else
5250 ac_save_cc="$CC"
5251CC="$CC -Kthread"
5252if test "$cross_compiling" = yes; then
5253 ac_cv_kthread=no
5254else
5255 cat >conftest.$ac_ext <<_ACEOF
5256/* confdefs.h. */
5257_ACEOF
5258cat confdefs.h >>conftest.$ac_ext
5259cat >>conftest.$ac_ext <<_ACEOF
5260/* end confdefs.h. */
5261
5262#include <pthread.h>
5263
5264void* routine(void* p){return NULL;}
5265
5266int main(){
5267 pthread_t p;
5268 if(pthread_create(&p,NULL,routine,NULL)!=0)
5269 return 1;
5270 (void)pthread_detach(p);
5271 return 0;
5272}
5273
5274_ACEOF
5275rm -f conftest$ac_exeext
5276if { (ac_try="$ac_link"
5277case "(($ac_try" in
5278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5279 *) ac_try_echo=$ac_try;;
5280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005282 (eval "$ac_link") 2>&5
5283 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5286 { (case "(($ac_try" in
5287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288 *) ac_try_echo=$ac_try;;
5289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291 (eval "$ac_try") 2>&5
5292 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005294 (exit $ac_status); }; }; then
5295 ac_cv_kthread=yes
5296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005297 echo "$as_me: program exited with status $ac_status" >&5
5298echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005299sed 's/^/| /' conftest.$ac_ext >&5
5300
5301( exit $ac_status )
5302ac_cv_kthread=no
5303fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5305fi
5306
5307
5308CC="$ac_save_cc"
5309fi
5310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005311{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5312echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313fi
5314
5315if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5316then
5317# -pthread, if available, provides the right #defines
5318# and linker options to make pthread_create available
5319# Some compilers won't report that they do not support -pthread,
5320# so we need to run a program to see whether it really made the
5321# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005322{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5323echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005325 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326else
5327 ac_save_cc="$CC"
5328CC="$CC -pthread"
5329if test "$cross_compiling" = yes; then
5330 ac_cv_pthread=no
5331else
5332 cat >conftest.$ac_ext <<_ACEOF
5333/* confdefs.h. */
5334_ACEOF
5335cat confdefs.h >>conftest.$ac_ext
5336cat >>conftest.$ac_ext <<_ACEOF
5337/* end confdefs.h. */
5338
5339#include <pthread.h>
5340
5341void* routine(void* p){return NULL;}
5342
5343int main(){
5344 pthread_t p;
5345 if(pthread_create(&p,NULL,routine,NULL)!=0)
5346 return 1;
5347 (void)pthread_detach(p);
5348 return 0;
5349}
5350
5351_ACEOF
5352rm -f conftest$ac_exeext
5353if { (ac_try="$ac_link"
5354case "(($ac_try" in
5355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5356 *) ac_try_echo=$ac_try;;
5357esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359 (eval "$ac_link") 2>&5
5360 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5363 { (case "(($ac_try" in
5364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5365 *) ac_try_echo=$ac_try;;
5366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005368 (eval "$ac_try") 2>&5
5369 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371 (exit $ac_status); }; }; then
5372 ac_cv_pthread=yes
5373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005374 echo "$as_me: program exited with status $ac_status" >&5
5375echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376sed 's/^/| /' conftest.$ac_ext >&5
5377
5378( exit $ac_status )
5379ac_cv_pthread=no
5380fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5382fi
5383
5384
5385CC="$ac_save_cc"
5386fi
5387
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005388{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5389echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390fi
5391
5392# If we have set a CC compiler flag for thread support then
5393# check if it works for CXX, too.
5394ac_cv_cxx_thread=no
5395if test ! -z "$CXX"
5396then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005397{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5398echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399ac_save_cxx="$CXX"
5400
5401if test "$ac_cv_kpthread" = "yes"
5402then
5403 CXX="$CXX -Kpthread"
5404 ac_cv_cxx_thread=yes
5405elif test "$ac_cv_kthread" = "yes"
5406then
5407 CXX="$CXX -Kthread"
5408 ac_cv_cxx_thread=yes
5409elif test "$ac_cv_pthread" = "yes"
5410then
5411 CXX="$CXX -pthread"
5412 ac_cv_cxx_thread=yes
5413fi
5414
5415if test $ac_cv_cxx_thread = yes
5416then
5417 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5418 $CXX -c conftest.$ac_ext 2>&5
5419 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5420 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5421 then
5422 ac_cv_cxx_thread=yes
5423 else
5424 ac_cv_cxx_thread=no
5425 fi
5426 rm -fr conftest*
5427fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005428{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5429echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430fi
5431CXX="$ac_save_cxx"
5432
5433
5434# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005435{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5436echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005438 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439else
5440 cat >conftest.$ac_ext <<_ACEOF
5441/* confdefs.h. */
5442_ACEOF
5443cat confdefs.h >>conftest.$ac_ext
5444cat >>conftest.$ac_ext <<_ACEOF
5445/* end confdefs.h. */
5446#include <stdlib.h>
5447#include <stdarg.h>
5448#include <string.h>
5449#include <float.h>
5450
5451int
5452main ()
5453{
5454
5455 ;
5456 return 0;
5457}
5458_ACEOF
5459rm -f conftest.$ac_objext
5460if { (ac_try="$ac_compile"
5461case "(($ac_try" in
5462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5463 *) ac_try_echo=$ac_try;;
5464esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005466 (eval "$ac_compile") 2>conftest.er1
5467 ac_status=$?
5468 grep -v '^ *+' conftest.er1 >conftest.err
5469 rm -f conftest.er1
5470 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472 (exit $ac_status); } && {
5473 test -z "$ac_c_werror_flag" ||
5474 test ! -s conftest.err
5475 } && test -s conftest.$ac_objext; then
5476 ac_cv_header_stdc=yes
5477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005478 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479sed 's/^/| /' conftest.$ac_ext >&5
5480
5481 ac_cv_header_stdc=no
5482fi
5483
5484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5485
5486if test $ac_cv_header_stdc = yes; then
5487 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5488 cat >conftest.$ac_ext <<_ACEOF
5489/* confdefs.h. */
5490_ACEOF
5491cat confdefs.h >>conftest.$ac_ext
5492cat >>conftest.$ac_ext <<_ACEOF
5493/* end confdefs.h. */
5494#include <string.h>
5495
5496_ACEOF
5497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5498 $EGREP "memchr" >/dev/null 2>&1; then
5499 :
5500else
5501 ac_cv_header_stdc=no
5502fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005503rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504
5505fi
5506
5507if test $ac_cv_header_stdc = yes; then
5508 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5509 cat >conftest.$ac_ext <<_ACEOF
5510/* confdefs.h. */
5511_ACEOF
5512cat confdefs.h >>conftest.$ac_ext
5513cat >>conftest.$ac_ext <<_ACEOF
5514/* end confdefs.h. */
5515#include <stdlib.h>
5516
5517_ACEOF
5518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5519 $EGREP "free" >/dev/null 2>&1; then
5520 :
5521else
5522 ac_cv_header_stdc=no
5523fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00005524rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525
5526fi
5527
5528if test $ac_cv_header_stdc = yes; then
5529 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5530 if test "$cross_compiling" = yes; then
5531 :
5532else
5533 cat >conftest.$ac_ext <<_ACEOF
5534/* confdefs.h. */
5535_ACEOF
5536cat confdefs.h >>conftest.$ac_ext
5537cat >>conftest.$ac_ext <<_ACEOF
5538/* end confdefs.h. */
5539#include <ctype.h>
5540#include <stdlib.h>
5541#if ((' ' & 0x0FF) == 0x020)
5542# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5543# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5544#else
5545# define ISLOWER(c) \
5546 (('a' <= (c) && (c) <= 'i') \
5547 || ('j' <= (c) && (c) <= 'r') \
5548 || ('s' <= (c) && (c) <= 'z'))
5549# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5550#endif
5551
5552#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5553int
5554main ()
5555{
5556 int i;
5557 for (i = 0; i < 256; i++)
5558 if (XOR (islower (i), ISLOWER (i))
5559 || toupper (i) != TOUPPER (i))
5560 return 2;
5561 return 0;
5562}
5563_ACEOF
5564rm -f conftest$ac_exeext
5565if { (ac_try="$ac_link"
5566case "(($ac_try" in
5567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5568 *) ac_try_echo=$ac_try;;
5569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005571 (eval "$ac_link") 2>&5
5572 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5575 { (case "(($ac_try" in
5576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5577 *) ac_try_echo=$ac_try;;
5578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005580 (eval "$ac_try") 2>&5
5581 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005583 (exit $ac_status); }; }; then
5584 :
5585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005586 echo "$as_me: program exited with status $ac_status" >&5
5587echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005588sed 's/^/| /' conftest.$ac_ext >&5
5589
5590( exit $ac_status )
5591ac_cv_header_stdc=no
5592fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5594fi
5595
5596
5597fi
5598fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005599{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5600echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005601if test $ac_cv_header_stdc = yes; then
5602
5603cat >>confdefs.h <<\_ACEOF
5604#define STDC_HEADERS 1
5605_ACEOF
5606
5607fi
5608
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005609# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5620 inttypes.h stdint.h unistd.h
5621do
5622as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5623{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5624echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5625if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5626 echo $ECHO_N "(cached) $ECHO_C" >&6
5627else
5628 cat >conftest.$ac_ext <<_ACEOF
5629/* confdefs.h. */
5630_ACEOF
5631cat confdefs.h >>conftest.$ac_ext
5632cat >>conftest.$ac_ext <<_ACEOF
5633/* end confdefs.h. */
5634$ac_includes_default
5635
5636#include <$ac_header>
5637_ACEOF
5638rm -f conftest.$ac_objext
5639if { (ac_try="$ac_compile"
5640case "(($ac_try" in
5641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5642 *) ac_try_echo=$ac_try;;
5643esac
5644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5645 (eval "$ac_compile") 2>conftest.er1
5646 ac_status=$?
5647 grep -v '^ *+' conftest.er1 >conftest.err
5648 rm -f conftest.er1
5649 cat conftest.err >&5
5650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651 (exit $ac_status); } && {
5652 test -z "$ac_c_werror_flag" ||
5653 test ! -s conftest.err
5654 } && test -s conftest.$ac_objext; then
5655 eval "$as_ac_Header=yes"
5656else
5657 echo "$as_me: failed program was:" >&5
5658sed 's/^/| /' conftest.$ac_ext >&5
5659
5660 eval "$as_ac_Header=no"
5661fi
5662
5663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5664fi
5665ac_res=`eval echo '${'$as_ac_Header'}'`
5666 { echo "$as_me:$LINENO: result: $ac_res" >&5
5667echo "${ECHO_T}$ac_res" >&6; }
5668if test `eval echo '${'$as_ac_Header'}'` = yes; then
5669 cat >>confdefs.h <<_ACEOF
5670#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5671_ACEOF
5672
5673fi
5674
5675done
5676
5677
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005678
Martin v. Löwis11437992002-04-12 09:54:03 +00005679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
Anthony Baxter8a560de2004-10-13 15:30:56 +00005714
Martin v. Löwisc3001752005-01-23 09:27:24 +00005715
Martin v. Löwis11017b12006-01-14 18:12:57 +00005716
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005717
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005718
5719
5720
5721
5722
5723
5724
5725
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005726
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005727
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005728
5729
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005730
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005731
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005732
5733
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005734for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5735fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005736ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005737shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005738unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005739sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5740sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005741sys/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 +00005742sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005743sys/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 +00005744sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005745bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005746do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005747as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005749 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5750echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005751if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005752 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005754ac_res=`eval echo '${'$as_ac_Header'}'`
5755 { echo "$as_me:$LINENO: result: $ac_res" >&5
5756echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005757else
Martin v. Löwis11437992002-04-12 09:54:03 +00005758 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005759{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5760echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005762/* confdefs.h. */
5763_ACEOF
5764cat confdefs.h >>conftest.$ac_ext
5765cat >>conftest.$ac_ext <<_ACEOF
5766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005767$ac_includes_default
5768#include <$ac_header>
5769_ACEOF
5770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005771if { (ac_try="$ac_compile"
5772case "(($ac_try" in
5773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774 *) ac_try_echo=$ac_try;;
5775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 grep -v '^ *+' conftest.er1 >conftest.err
5780 rm -f conftest.er1
5781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783 (exit $ac_status); } && {
5784 test -z "$ac_c_werror_flag" ||
5785 test ! -s conftest.err
5786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005787 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005790sed 's/^/| /' conftest.$ac_ext >&5
5791
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005794
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005796{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5797echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005798
5799# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005800{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5801echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005808#include <$ac_header>
5809_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810if { (ac_try="$ac_cpp conftest.$ac_ext"
5811case "(($ac_try" in
5812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5813 *) ac_try_echo=$ac_try;;
5814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005816 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005818 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005819 rm -f conftest.er1
5820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005822 (exit $ac_status); } >/dev/null && {
5823 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5824 test ! -s conftest.err
5825 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005826 ac_header_preproc=yes
5827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005829sed 's/^/| /' conftest.$ac_ext >&5
5830
Martin v. Löwis11437992002-04-12 09:54:03 +00005831 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833
Martin v. Löwis11437992002-04-12 09:54:03 +00005834rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005835{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5836echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005837
5838# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005839case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5840 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005841 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5842echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5843 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5844echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005846 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005847 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005848 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5849echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5850 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5851echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5852 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5853echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5854 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5855echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5856 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5857echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5858 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5859echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005861## -------------------------------------- ##
5862## Report this to http://bugs.python.org/ ##
5863## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005864_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005865 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005866 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005867esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005868{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5869echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005871 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005872else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005873 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005875ac_res=`eval echo '${'$as_ac_Header'}'`
5876 { echo "$as_me:$LINENO: result: $ac_res" >&5
5877echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005878
5879fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005880if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005881 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005882#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005883_ACEOF
5884
5885fi
5886
Guido van Rossum627b2d71993-12-24 10:39:16 +00005887done
5888
Martin v. Löwis11437992002-04-12 09:54:03 +00005889
5890
5891
5892
5893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005894ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005895for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005896 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5897{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5898echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005899if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005901else
Martin v. Löwis11437992002-04-12 09:54:03 +00005902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005908#include <sys/types.h>
5909#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005910
Martin v. Löwis11437992002-04-12 09:54:03 +00005911int
5912main ()
5913{
5914if ((DIR *) 0)
5915return 0;
5916 ;
5917 return 0;
5918}
5919_ACEOF
5920rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005921if { (ac_try="$ac_compile"
5922case "(($ac_try" in
5923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5924 *) ac_try_echo=$ac_try;;
5925esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005929 grep -v '^ *+' conftest.er1 >conftest.err
5930 rm -f conftest.er1
5931 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005933 (exit $ac_status); } && {
5934 test -z "$ac_c_werror_flag" ||
5935 test ! -s conftest.err
5936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005937 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005938else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005939 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005940sed 's/^/| /' conftest.$ac_ext >&5
5941
Martin v. Löwiseba40652007-08-30 20:10:57 +00005942 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944
5945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005946fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005947ac_res=`eval echo '${'$as_ac_Header'}'`
5948 { echo "$as_me:$LINENO: result: $ac_res" >&5
5949echo "${ECHO_T}$ac_res" >&6; }
5950if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005951 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005952#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005953_ACEOF
5954
5955ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005956fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005957
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958done
5959# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5960if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005961 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5962echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005963if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005965else
Martin v. Löwis11437992002-04-12 09:54:03 +00005966 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005968/* confdefs.h. */
5969_ACEOF
5970cat confdefs.h >>conftest.$ac_ext
5971cat >>conftest.$ac_ext <<_ACEOF
5972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005973
Martin v. Löwiseba40652007-08-30 20:10:57 +00005974/* Override any GCC internal prototype to avoid an error.
5975 Use char because int might match the return type of a GCC
5976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005977#ifdef __cplusplus
5978extern "C"
5979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005980char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005981int
5982main ()
5983{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 ;
5986 return 0;
5987}
5988_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989for ac_lib in '' dir; do
5990 if test -z "$ac_lib"; then
5991 ac_res="none required"
5992 else
5993 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995 fi
5996 rm -f conftest.$ac_objext conftest$ac_exeext
5997if { (ac_try="$ac_link"
5998case "(($ac_try" in
5999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6000 *) ac_try_echo=$ac_try;;
6001esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006003 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006004 ac_status=$?
6005 grep -v '^ *+' conftest.er1 >conftest.err
6006 rm -f conftest.er1
6007 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006009 (exit $ac_status); } && {
6010 test -z "$ac_c_werror_flag" ||
6011 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006012 } && test -s conftest$ac_exeext &&
6013 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006014 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006016 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006017sed 's/^/| /' conftest.$ac_ext >&5
6018
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019
Brett Cannon19fab762007-06-02 03:02:29 +00006020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021
6022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6023 conftest$ac_exeext
6024 if test "${ac_cv_search_opendir+set}" = set; then
6025 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006027done
6028if test "${ac_cv_search_opendir+set}" = set; then
6029 :
6030else
6031 ac_cv_search_opendir=no
6032fi
6033rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006034LIBS=$ac_func_search_save_LIBS
6035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006036{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6037echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006038ac_res=$ac_cv_search_opendir
6039if test "$ac_res" != no; then
6040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006043
Michael W. Hudson54241132001-12-07 15:38:26 +00006044else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006045 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6046echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006047if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006048 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006049else
6050 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006051cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006052/* confdefs.h. */
6053_ACEOF
6054cat confdefs.h >>conftest.$ac_ext
6055cat >>conftest.$ac_ext <<_ACEOF
6056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006057
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058/* Override any GCC internal prototype to avoid an error.
6059 Use char because int might match the return type of a GCC
6060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006061#ifdef __cplusplus
6062extern "C"
6063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006064char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006065int
6066main ()
6067{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006069 ;
6070 return 0;
6071}
6072_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073for ac_lib in '' x; do
6074 if test -z "$ac_lib"; then
6075 ac_res="none required"
6076 else
6077 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006078 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006079 fi
6080 rm -f conftest.$ac_objext conftest$ac_exeext
6081if { (ac_try="$ac_link"
6082case "(($ac_try" in
6083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6084 *) ac_try_echo=$ac_try;;
6085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006087 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006088 ac_status=$?
6089 grep -v '^ *+' conftest.er1 >conftest.err
6090 rm -f conftest.er1
6091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006093 (exit $ac_status); } && {
6094 test -z "$ac_c_werror_flag" ||
6095 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006096 } && test -s conftest$ac_exeext &&
6097 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006100 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006101sed 's/^/| /' conftest.$ac_ext >&5
6102
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103
Brett Cannon19fab762007-06-02 03:02:29 +00006104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105
6106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6107 conftest$ac_exeext
6108 if test "${ac_cv_search_opendir+set}" = set; then
6109 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006111done
6112if test "${ac_cv_search_opendir+set}" = set; then
6113 :
6114else
6115 ac_cv_search_opendir=no
6116fi
6117rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006118LIBS=$ac_func_search_save_LIBS
6119fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006120{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6121echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122ac_res=$ac_cv_search_opendir
6123if test "$ac_res" != no; then
6124 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126fi
6127
6128fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006129
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006130{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6131echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006133 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134else
6135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006136/* confdefs.h. */
6137_ACEOF
6138cat confdefs.h >>conftest.$ac_ext
6139cat >>conftest.$ac_ext <<_ACEOF
6140/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142int
6143main ()
6144{
6145return makedev(0, 0);
6146 ;
6147 return 0;
6148}
6149_ACEOF
6150rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006151if { (ac_try="$ac_link"
6152case "(($ac_try" in
6153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6154 *) ac_try_echo=$ac_try;;
6155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006157 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
6160 rm -f conftest.er1
6161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163 (exit $ac_status); } && {
6164 test -z "$ac_c_werror_flag" ||
6165 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006166 } && test -s conftest$ac_exeext &&
6167 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168 ac_cv_header_sys_types_h_makedev=yes
6169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006171sed 's/^/| /' conftest.$ac_ext >&5
6172
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006175
6176rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006177 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178
6179fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006180{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6181echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182
6183if test $ac_cv_header_sys_types_h_makedev = no; then
6184if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006185 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6186echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006190{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6191echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006192else
6193 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006194{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6195echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006197/* confdefs.h. */
6198_ACEOF
6199cat confdefs.h >>conftest.$ac_ext
6200cat >>conftest.$ac_ext <<_ACEOF
6201/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202$ac_includes_default
6203#include <sys/mkdev.h>
6204_ACEOF
6205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206if { (ac_try="$ac_compile"
6207case "(($ac_try" in
6208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6209 *) ac_try_echo=$ac_try;;
6210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006214 grep -v '^ *+' conftest.er1 >conftest.err
6215 rm -f conftest.er1
6216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006218 (exit $ac_status); } && {
6219 test -z "$ac_c_werror_flag" ||
6220 test ! -s conftest.err
6221 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222 ac_header_compiler=yes
6223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006225sed 's/^/| /' conftest.$ac_ext >&5
6226
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006229
6230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006231{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6232echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233
6234# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006235{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6236echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006238/* confdefs.h. */
6239_ACEOF
6240cat confdefs.h >>conftest.$ac_ext
6241cat >>conftest.$ac_ext <<_ACEOF
6242/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243#include <sys/mkdev.h>
6244_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245if { (ac_try="$ac_cpp conftest.$ac_ext"
6246case "(($ac_try" in
6247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6248 *) ac_try_echo=$ac_try;;
6249esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006251 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006253 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254 rm -f conftest.er1
6255 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006257 (exit $ac_status); } >/dev/null && {
6258 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6259 test ! -s conftest.err
6260 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261 ac_header_preproc=yes
6262else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006264sed 's/^/| /' conftest.$ac_ext >&5
6265
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266 ac_header_preproc=no
6267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006268
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006270{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6271echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272
6273# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006274case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6275 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006276 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6277echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6279echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006280 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006281 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006282 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006283 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6284echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6285 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6286echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6287 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6288echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6289 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6290echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6291 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6292echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6293 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6294echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006296## -------------------------------------- ##
6297## Report this to http://bugs.python.org/ ##
6298## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006299_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006300 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006301 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006303{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6304echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006305if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006306 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307else
6308 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6309fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006310{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6311echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006312
6313fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006314if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315
6316cat >>confdefs.h <<\_ACEOF
6317#define MAJOR_IN_MKDEV 1
6318_ACEOF
6319
6320fi
6321
6322
6323
6324 if test $ac_cv_header_sys_mkdev_h = no; then
6325 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006326 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6327echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006328if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006331{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6332echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006333else
6334 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006335{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6336echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006338/* confdefs.h. */
6339_ACEOF
6340cat confdefs.h >>conftest.$ac_ext
6341cat >>conftest.$ac_ext <<_ACEOF
6342/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343$ac_includes_default
6344#include <sys/sysmacros.h>
6345_ACEOF
6346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006347if { (ac_try="$ac_compile"
6348case "(($ac_try" in
6349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6350 *) ac_try_echo=$ac_try;;
6351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006355 grep -v '^ *+' conftest.er1 >conftest.err
6356 rm -f conftest.er1
6357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006359 (exit $ac_status); } && {
6360 test -z "$ac_c_werror_flag" ||
6361 test ! -s conftest.err
6362 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006363 ac_header_compiler=yes
6364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006366sed 's/^/| /' conftest.$ac_ext >&5
6367
Martin v. Löwiseba40652007-08-30 20:10:57 +00006368 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006370
6371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006372{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6373echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006374
6375# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006376{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6377echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006379/* confdefs.h. */
6380_ACEOF
6381cat confdefs.h >>conftest.$ac_ext
6382cat >>conftest.$ac_ext <<_ACEOF
6383/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384#include <sys/sysmacros.h>
6385_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { (ac_try="$ac_cpp conftest.$ac_ext"
6387case "(($ac_try" in
6388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6389 *) ac_try_echo=$ac_try;;
6390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006392 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006393 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006394 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006395 rm -f conftest.er1
6396 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006398 (exit $ac_status); } >/dev/null && {
6399 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6400 test ! -s conftest.err
6401 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006402 ac_header_preproc=yes
6403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006405sed 's/^/| /' conftest.$ac_ext >&5
6406
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006407 ac_header_preproc=no
6408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006409
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006411{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6412echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006413
6414# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006415case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6416 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006417 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6418echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6419 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6420echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006421 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006422 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006423 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006424 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6425echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6426 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6427echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6428 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6429echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6430 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6431echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6432 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6433echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6434 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6435echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006437## -------------------------------------- ##
6438## Report this to http://bugs.python.org/ ##
6439## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006440_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006441 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006442 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006444{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6445echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006446if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006448else
6449 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6450fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006451{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6452echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006453
6454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006455if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006456
6457cat >>confdefs.h <<\_ACEOF
6458#define MAJOR_IN_SYSMACROS 1
6459_ACEOF
6460
6461fi
6462
6463
6464 fi
6465fi
6466
Michael W. Hudson54241132001-12-07 15:38:26 +00006467
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006468# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006469
6470for ac_header in term.h
6471do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006472as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6473{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6474echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006475if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006476 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006477else
6478 cat >conftest.$ac_ext <<_ACEOF
6479/* confdefs.h. */
6480_ACEOF
6481cat confdefs.h >>conftest.$ac_ext
6482cat >>conftest.$ac_ext <<_ACEOF
6483/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006484
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006485#ifdef HAVE_CURSES_H
6486#include <curses.h>
6487#endif
6488
6489
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006490#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006491_ACEOF
6492rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493if { (ac_try="$ac_compile"
6494case "(($ac_try" in
6495 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6496 *) ac_try_echo=$ac_try;;
6497esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006498eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006500 ac_status=$?
6501 grep -v '^ *+' conftest.er1 >conftest.err
6502 rm -f conftest.er1
6503 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006505 (exit $ac_status); } && {
6506 test -z "$ac_c_werror_flag" ||
6507 test ! -s conftest.err
6508 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006509 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006511 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006512sed 's/^/| /' conftest.$ac_ext >&5
6513
Martin v. Löwiseba40652007-08-30 20:10:57 +00006514 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006516
6517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006518fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006519ac_res=`eval echo '${'$as_ac_Header'}'`
6520 { echo "$as_me:$LINENO: result: $ac_res" >&5
6521echo "${ECHO_T}$ac_res" >&6; }
6522if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006523 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006524#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006525_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006526
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006527fi
6528
6529done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006530
6531
Martin v. Löwis11017b12006-01-14 18:12:57 +00006532# On Linux, netlink.h requires asm/types.h
6533
6534for ac_header in linux/netlink.h
6535do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006536as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6537{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6538echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006539if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006540 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006541else
6542 cat >conftest.$ac_ext <<_ACEOF
6543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
6548
6549#ifdef HAVE_ASM_TYPES_H
6550#include <asm/types.h>
6551#endif
6552#ifdef HAVE_SYS_SOCKET_H
6553#include <sys/socket.h>
6554#endif
6555
6556
6557#include <$ac_header>
6558_ACEOF
6559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006560if { (ac_try="$ac_compile"
6561case "(($ac_try" in
6562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6563 *) ac_try_echo=$ac_try;;
6564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006567 ac_status=$?
6568 grep -v '^ *+' conftest.er1 >conftest.err
6569 rm -f conftest.er1
6570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006572 (exit $ac_status); } && {
6573 test -z "$ac_c_werror_flag" ||
6574 test ! -s conftest.err
6575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006576 eval "$as_ac_Header=yes"
6577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006578 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006579sed 's/^/| /' conftest.$ac_ext >&5
6580
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006583
6584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006585fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006586ac_res=`eval echo '${'$as_ac_Header'}'`
6587 { echo "$as_me:$LINENO: result: $ac_res" >&5
6588echo "${ECHO_T}$ac_res" >&6; }
6589if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006590 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006591#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006592_ACEOF
6593
6594fi
6595
6596done
6597
6598
Guido van Rossum627b2d71993-12-24 10:39:16 +00006599# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006600was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006601{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6602echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006604/* confdefs.h. */
6605_ACEOF
6606cat confdefs.h >>conftest.$ac_ext
6607cat >>conftest.$ac_ext <<_ACEOF
6608/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006610
6611_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006613 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006614 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006615else
Martin v. Löwis11437992002-04-12 09:54:03 +00006616
6617
6618cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006619#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006620_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006622
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00006624rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006626{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6627echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006628
Neal Norwitz11690112002-07-30 01:08:28 +00006629# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006630{ echo "$as_me:$LINENO: checking for makedev" >&5
6631echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006633/* confdefs.h. */
6634_ACEOF
6635cat confdefs.h >>conftest.$ac_ext
6636cat >>conftest.$ac_ext <<_ACEOF
6637/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006638#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006639int
6640main ()
6641{
6642 makedev(0, 0)
6643 ;
6644 return 0;
6645}
6646_ACEOF
6647rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006648if { (ac_try="$ac_link"
6649case "(($ac_try" in
6650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6651 *) ac_try_echo=$ac_try;;
6652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006654 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006656 grep -v '^ *+' conftest.er1 >conftest.err
6657 rm -f conftest.er1
6658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006660 (exit $ac_status); } && {
6661 test -z "$ac_c_werror_flag" ||
6662 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006663 } && test -s conftest$ac_exeext &&
6664 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006665 ac_cv_has_makedev=yes
6666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006668sed 's/^/| /' conftest.$ac_ext >&5
6669
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672
6673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006675if test "$ac_cv_has_makedev" = "no"; then
6676 # we didn't link, try if _OSF_SOURCE will allow us to link
6677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006678/* confdefs.h. */
6679_ACEOF
6680cat confdefs.h >>conftest.$ac_ext
6681cat >>conftest.$ac_ext <<_ACEOF
6682/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006683
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006684#define _OSF_SOURCE 1
6685#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006686
Neal Norwitz11690112002-07-30 01:08:28 +00006687int
6688main ()
6689{
6690 makedev(0, 0)
6691 ;
6692 return 0;
6693}
6694_ACEOF
6695rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006696if { (ac_try="$ac_link"
6697case "(($ac_try" in
6698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6699 *) ac_try_echo=$ac_try;;
6700esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006702 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006704 grep -v '^ *+' conftest.er1 >conftest.err
6705 rm -f conftest.er1
6706 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006708 (exit $ac_status); } && {
6709 test -z "$ac_c_werror_flag" ||
6710 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006711 } && test -s conftest$ac_exeext &&
6712 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006713 ac_cv_has_makedev=yes
6714else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006716sed 's/^/| /' conftest.$ac_ext >&5
6717
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006720
6721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006722 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006723 if test "$ac_cv_has_makedev" = "yes"; then
6724
6725cat >>confdefs.h <<\_ACEOF
6726#define _OSF_SOURCE 1
6727_ACEOF
6728
6729 fi
6730fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006731{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6732echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006733if test "$ac_cv_has_makedev" = "yes"; then
6734
6735cat >>confdefs.h <<\_ACEOF
6736#define HAVE_MAKEDEV 1
6737_ACEOF
6738
6739fi
6740
Martin v. Löwis399a6892002-10-04 10:22:02 +00006741# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6742# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6743# defined, but the compiler does not support pragma redefine_extname,
6744# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6745# structures (such as rlimit64) without declaring them. As a
6746# work-around, disable LFS on such configurations
6747
6748use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006749{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6750echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006752/* confdefs.h. */
6753_ACEOF
6754cat confdefs.h >>conftest.$ac_ext
6755cat >>conftest.$ac_ext <<_ACEOF
6756/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006757
6758#define _LARGEFILE_SOURCE 1
6759#define _FILE_OFFSET_BITS 64
6760#include <sys/resource.h>
6761
Martin v. Löwis399a6892002-10-04 10:22:02 +00006762int
6763main ()
6764{
6765struct rlimit foo;
6766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006771if { (ac_try="$ac_compile"
6772case "(($ac_try" in
6773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6774 *) ac_try_echo=$ac_try;;
6775esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006779 grep -v '^ *+' conftest.er1 >conftest.err
6780 rm -f conftest.er1
6781 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006783 (exit $ac_status); } && {
6784 test -z "$ac_c_werror_flag" ||
6785 test ! -s conftest.err
6786 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006787 sol_lfs_bug=no
6788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006790sed 's/^/| /' conftest.$ac_ext >&5
6791
Martin v. Löwiseba40652007-08-30 20:10:57 +00006792 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006794
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006796{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6797echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006798if test "$sol_lfs_bug" = "yes"; then
6799 use_lfs=no
6800fi
6801
6802if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006803# Two defines needed to enable largefile support on various platforms
6804# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806cat >>confdefs.h <<\_ACEOF
6807#define _LARGEFILE_SOURCE 1
6808_ACEOF
6809
6810
6811cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006812#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006813_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006814
Martin v. Löwis399a6892002-10-04 10:22:02 +00006815fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006816
Guido van Rossum84e7b241996-08-19 21:59:00 +00006817# Add some code to confdefs.h so that the test for off_t works on SCO
6818cat >> confdefs.h <<\EOF
6819#if defined(SCO_DS)
6820#undef _OFF_T
6821#endif
6822EOF
6823
Guido van Rossumef2255b2000-03-10 22:30:29 +00006824# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006825{ echo "$as_me:$LINENO: checking for mode_t" >&5
6826echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006827if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006829else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830 cat >conftest.$ac_ext <<_ACEOF
6831/* confdefs.h. */
6832_ACEOF
6833cat confdefs.h >>conftest.$ac_ext
6834cat >>conftest.$ac_ext <<_ACEOF
6835/* end confdefs.h. */
6836$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006837typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006838int
6839main ()
6840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006841if ((ac__type_new_ *) 0)
6842 return 0;
6843if (sizeof (ac__type_new_))
6844 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006845 ;
6846 return 0;
6847}
6848_ACEOF
6849rm -f conftest.$ac_objext
6850if { (ac_try="$ac_compile"
6851case "(($ac_try" in
6852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6853 *) ac_try_echo=$ac_try;;
6854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006856 (eval "$ac_compile") 2>conftest.er1
6857 ac_status=$?
6858 grep -v '^ *+' conftest.er1 >conftest.err
6859 rm -f conftest.er1
6860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862 (exit $ac_status); } && {
6863 test -z "$ac_c_werror_flag" ||
6864 test ! -s conftest.err
6865 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006866 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006869sed 's/^/| /' conftest.$ac_ext >&5
6870
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006871 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006873
6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006876{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6877echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6878if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006880else
Martin v. Löwis11437992002-04-12 09:54:03 +00006881
6882cat >>confdefs.h <<_ACEOF
6883#define mode_t int
6884_ACEOF
6885
6886fi
6887
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006888{ echo "$as_me:$LINENO: checking for off_t" >&5
6889echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006890if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006892else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006893 cat >conftest.$ac_ext <<_ACEOF
6894/* confdefs.h. */
6895_ACEOF
6896cat confdefs.h >>conftest.$ac_ext
6897cat >>conftest.$ac_ext <<_ACEOF
6898/* end confdefs.h. */
6899$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006900typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006901int
6902main ()
6903{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006904if ((ac__type_new_ *) 0)
6905 return 0;
6906if (sizeof (ac__type_new_))
6907 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006908 ;
6909 return 0;
6910}
6911_ACEOF
6912rm -f conftest.$ac_objext
6913if { (ac_try="$ac_compile"
6914case "(($ac_try" in
6915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6916 *) ac_try_echo=$ac_try;;
6917esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006919 (eval "$ac_compile") 2>conftest.er1
6920 ac_status=$?
6921 grep -v '^ *+' conftest.er1 >conftest.err
6922 rm -f conftest.er1
6923 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006925 (exit $ac_status); } && {
6926 test -z "$ac_c_werror_flag" ||
6927 test ! -s conftest.err
6928 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006929 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006930else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006932sed 's/^/| /' conftest.$ac_ext >&5
6933
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006934 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006936
6937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006938fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006939{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6940echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6941if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006943else
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
6945cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006946#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006947_ACEOF
6948
6949fi
6950
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006951{ echo "$as_me:$LINENO: checking for pid_t" >&5
6952echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006953if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006955else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006956 cat >conftest.$ac_ext <<_ACEOF
6957/* confdefs.h. */
6958_ACEOF
6959cat confdefs.h >>conftest.$ac_ext
6960cat >>conftest.$ac_ext <<_ACEOF
6961/* end confdefs.h. */
6962$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006963typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006964int
6965main ()
6966{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006967if ((ac__type_new_ *) 0)
6968 return 0;
6969if (sizeof (ac__type_new_))
6970 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
6976if { (ac_try="$ac_compile"
6977case "(($ac_try" in
6978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6979 *) ac_try_echo=$ac_try;;
6980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982 (eval "$ac_compile") 2>conftest.er1
6983 ac_status=$?
6984 grep -v '^ *+' conftest.er1 >conftest.err
6985 rm -f conftest.er1
6986 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988 (exit $ac_status); } && {
6989 test -z "$ac_c_werror_flag" ||
6990 test ! -s conftest.err
6991 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006992 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006995sed 's/^/| /' conftest.$ac_ext >&5
6996
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006997 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006999
7000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007001fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007002{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7003echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
7004if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006else
Martin v. Löwis11437992002-04-12 09:54:03 +00007007
7008cat >>confdefs.h <<_ACEOF
7009#define pid_t int
7010_ACEOF
7011
7012fi
7013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007014{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7015echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007016if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007018else
7019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007020/* confdefs.h. */
7021_ACEOF
7022cat confdefs.h >>conftest.$ac_ext
7023cat >>conftest.$ac_ext <<_ACEOF
7024/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025#include <sys/types.h>
7026#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007027
Martin v. Löwis11437992002-04-12 09:54:03 +00007028int
7029main ()
7030{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 ;
7033 return 0;
7034}
7035_ACEOF
7036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037if { (ac_try="$ac_compile"
7038case "(($ac_try" in
7039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7040 *) ac_try_echo=$ac_try;;
7041esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007045 grep -v '^ *+' conftest.er1 >conftest.err
7046 rm -f conftest.er1
7047 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007049 (exit $ac_status); } && {
7050 test -z "$ac_c_werror_flag" ||
7051 test ! -s conftest.err
7052 } && test -s conftest.$ac_objext; then
7053 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007056sed 's/^/| /' conftest.$ac_ext >&5
7057
Martin v. Löwiseba40652007-08-30 20:10:57 +00007058 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007060
7061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007063{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7064echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007068_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007069
Michael W. Hudson54241132001-12-07 15:38:26 +00007070
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007071{ echo "$as_me:$LINENO: checking for size_t" >&5
7072echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007073if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007074 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007076 cat >conftest.$ac_ext <<_ACEOF
7077/* confdefs.h. */
7078_ACEOF
7079cat confdefs.h >>conftest.$ac_ext
7080cat >>conftest.$ac_ext <<_ACEOF
7081/* end confdefs.h. */
7082$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007083typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007084int
7085main ()
7086{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007087if ((ac__type_new_ *) 0)
7088 return 0;
7089if (sizeof (ac__type_new_))
7090 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007091 ;
7092 return 0;
7093}
7094_ACEOF
7095rm -f conftest.$ac_objext
7096if { (ac_try="$ac_compile"
7097case "(($ac_try" in
7098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7099 *) ac_try_echo=$ac_try;;
7100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007102 (eval "$ac_compile") 2>conftest.er1
7103 ac_status=$?
7104 grep -v '^ *+' conftest.er1 >conftest.err
7105 rm -f conftest.er1
7106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007108 (exit $ac_status); } && {
7109 test -z "$ac_c_werror_flag" ||
7110 test ! -s conftest.err
7111 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007112 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007113else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007114 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007115sed 's/^/| /' conftest.$ac_ext >&5
7116
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007117 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007119
7120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007121fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007122{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7123echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7124if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007126else
Martin v. Löwis11437992002-04-12 09:54:03 +00007127
7128cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007130_ACEOF
7131
7132fi
7133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007134{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7135echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007136if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007137 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
7139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007140/* confdefs.h. */
7141_ACEOF
7142cat confdefs.h >>conftest.$ac_ext
7143cat >>conftest.$ac_ext <<_ACEOF
7144/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007145#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007146
7147_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007149 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150 ac_cv_type_uid_t=yes
7151else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152 ac_cv_type_uid_t=no
7153fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00007154rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007157{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7158echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007159if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007160
Martin v. Löwis11437992002-04-12 09:54:03 +00007161cat >>confdefs.h <<\_ACEOF
7162#define uid_t int
7163_ACEOF
7164
7165
7166cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007169
7170fi
7171
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007172
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007173 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7174echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007175if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007176 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007177else
7178 ac_cv_c_uint32_t=no
7179 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7180 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7181 cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
7186/* end confdefs.h. */
7187$ac_includes_default
7188int
7189main ()
7190{
7191static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7192test_array [0] = 0
7193
7194 ;
7195 return 0;
7196}
7197_ACEOF
7198rm -f conftest.$ac_objext
7199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007205 (eval "$ac_compile") 2>conftest.er1
7206 ac_status=$?
7207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
7215 case $ac_type in
7216 uint32_t) ac_cv_c_uint32_t=yes ;;
7217 *) ac_cv_c_uint32_t=$ac_type ;;
7218esac
7219
7220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007221 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007222sed 's/^/| /' conftest.$ac_ext >&5
7223
7224
7225fi
7226
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7228 test "$ac_cv_c_uint32_t" != no && break
7229 done
7230fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007231{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7232echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007233 case $ac_cv_c_uint32_t in #(
7234 no|yes) ;; #(
7235 *)
7236
7237cat >>confdefs.h <<\_ACEOF
7238#define _UINT32_T 1
7239_ACEOF
7240
7241
7242cat >>confdefs.h <<_ACEOF
7243#define uint32_t $ac_cv_c_uint32_t
7244_ACEOF
7245;;
7246 esac
7247
7248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007249 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7250echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007251if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007252 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007253else
7254 ac_cv_c_uint64_t=no
7255 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7256 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7257 cat >conftest.$ac_ext <<_ACEOF
7258/* confdefs.h. */
7259_ACEOF
7260cat confdefs.h >>conftest.$ac_ext
7261cat >>conftest.$ac_ext <<_ACEOF
7262/* end confdefs.h. */
7263$ac_includes_default
7264int
7265main ()
7266{
7267static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7268test_array [0] = 0
7269
7270 ;
7271 return 0;
7272}
7273_ACEOF
7274rm -f conftest.$ac_objext
7275if { (ac_try="$ac_compile"
7276case "(($ac_try" in
7277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7278 *) ac_try_echo=$ac_try;;
7279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007281 (eval "$ac_compile") 2>conftest.er1
7282 ac_status=$?
7283 grep -v '^ *+' conftest.er1 >conftest.err
7284 rm -f conftest.er1
7285 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007287 (exit $ac_status); } && {
7288 test -z "$ac_c_werror_flag" ||
7289 test ! -s conftest.err
7290 } && test -s conftest.$ac_objext; then
7291 case $ac_type in
7292 uint64_t) ac_cv_c_uint64_t=yes ;;
7293 *) ac_cv_c_uint64_t=$ac_type ;;
7294esac
7295
7296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007297 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007298sed 's/^/| /' conftest.$ac_ext >&5
7299
7300
7301fi
7302
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304 test "$ac_cv_c_uint64_t" != no && break
7305 done
7306fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007307{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7308echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007309 case $ac_cv_c_uint64_t in #(
7310 no|yes) ;; #(
7311 *)
7312
7313cat >>confdefs.h <<\_ACEOF
7314#define _UINT64_T 1
7315_ACEOF
7316
7317
7318cat >>confdefs.h <<_ACEOF
7319#define uint64_t $ac_cv_c_uint64_t
7320_ACEOF
7321;;
7322 esac
7323
7324
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007325 { echo "$as_me:$LINENO: checking for int32_t" >&5
7326echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007327if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007328 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007329else
7330 ac_cv_c_int32_t=no
7331 for ac_type in 'int32_t' 'int' 'long int' \
7332 'long long int' 'short int' 'signed char'; do
7333 cat >conftest.$ac_ext <<_ACEOF
7334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
7339$ac_includes_default
7340int
7341main ()
7342{
7343static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7344test_array [0] = 0
7345
7346 ;
7347 return 0;
7348}
7349_ACEOF
7350rm -f conftest.$ac_objext
7351if { (ac_try="$ac_compile"
7352case "(($ac_try" in
7353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7354 *) ac_try_echo=$ac_try;;
7355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007357 (eval "$ac_compile") 2>conftest.er1
7358 ac_status=$?
7359 grep -v '^ *+' conftest.er1 >conftest.err
7360 rm -f conftest.er1
7361 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007363 (exit $ac_status); } && {
7364 test -z "$ac_c_werror_flag" ||
7365 test ! -s conftest.err
7366 } && test -s conftest.$ac_objext; then
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 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007378 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007379test_array [0] = 0
7380
7381 ;
7382 return 0;
7383}
7384_ACEOF
7385rm -f conftest.$ac_objext
7386if { (ac_try="$ac_compile"
7387case "(($ac_try" in
7388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7389 *) ac_try_echo=$ac_try;;
7390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007392 (eval "$ac_compile") 2>conftest.er1
7393 ac_status=$?
7394 grep -v '^ *+' conftest.er1 >conftest.err
7395 rm -f conftest.er1
7396 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007398 (exit $ac_status); } && {
7399 test -z "$ac_c_werror_flag" ||
7400 test ! -s conftest.err
7401 } && test -s conftest.$ac_objext; then
7402 :
7403else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007404 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007405sed 's/^/| /' conftest.$ac_ext >&5
7406
7407 case $ac_type in
7408 int32_t) ac_cv_c_int32_t=yes ;;
7409 *) ac_cv_c_int32_t=$ac_type ;;
7410esac
7411
7412fi
7413
7414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7415else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007416 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007417sed 's/^/| /' conftest.$ac_ext >&5
7418
7419
7420fi
7421
7422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7423 test "$ac_cv_c_int32_t" != no && break
7424 done
7425fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007426{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7427echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007428 case $ac_cv_c_int32_t in #(
7429 no|yes) ;; #(
7430 *)
7431
7432cat >>confdefs.h <<_ACEOF
7433#define int32_t $ac_cv_c_int32_t
7434_ACEOF
7435;;
7436 esac
7437
7438
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007439 { echo "$as_me:$LINENO: checking for int64_t" >&5
7440echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007441if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007442 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007443else
7444 ac_cv_c_int64_t=no
7445 for ac_type in 'int64_t' 'int' 'long int' \
7446 'long long int' 'short int' 'signed char'; do
7447 cat >conftest.$ac_ext <<_ACEOF
7448/* confdefs.h. */
7449_ACEOF
7450cat confdefs.h >>conftest.$ac_ext
7451cat >>conftest.$ac_ext <<_ACEOF
7452/* end confdefs.h. */
7453$ac_includes_default
7454int
7455main ()
7456{
7457static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7458test_array [0] = 0
7459
7460 ;
7461 return 0;
7462}
7463_ACEOF
7464rm -f conftest.$ac_objext
7465if { (ac_try="$ac_compile"
7466case "(($ac_try" in
7467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7468 *) ac_try_echo=$ac_try;;
7469esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007471 (eval "$ac_compile") 2>conftest.er1
7472 ac_status=$?
7473 grep -v '^ *+' conftest.er1 >conftest.err
7474 rm -f conftest.er1
7475 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007477 (exit $ac_status); } && {
7478 test -z "$ac_c_werror_flag" ||
7479 test ! -s conftest.err
7480 } && test -s conftest.$ac_objext; then
7481 cat >conftest.$ac_ext <<_ACEOF
7482/* confdefs.h. */
7483_ACEOF
7484cat confdefs.h >>conftest.$ac_ext
7485cat >>conftest.$ac_ext <<_ACEOF
7486/* end confdefs.h. */
7487$ac_includes_default
7488int
7489main ()
7490{
7491static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007493test_array [0] = 0
7494
7495 ;
7496 return 0;
7497}
7498_ACEOF
7499rm -f conftest.$ac_objext
7500if { (ac_try="$ac_compile"
7501case "(($ac_try" in
7502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7503 *) ac_try_echo=$ac_try;;
7504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007506 (eval "$ac_compile") 2>conftest.er1
7507 ac_status=$?
7508 grep -v '^ *+' conftest.er1 >conftest.err
7509 rm -f conftest.er1
7510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007512 (exit $ac_status); } && {
7513 test -z "$ac_c_werror_flag" ||
7514 test ! -s conftest.err
7515 } && test -s conftest.$ac_objext; then
7516 :
7517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007518 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007519sed 's/^/| /' conftest.$ac_ext >&5
7520
7521 case $ac_type in
7522 int64_t) ac_cv_c_int64_t=yes ;;
7523 *) ac_cv_c_int64_t=$ac_type ;;
7524esac
7525
7526fi
7527
7528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007530 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007531sed 's/^/| /' conftest.$ac_ext >&5
7532
7533
7534fi
7535
7536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7537 test "$ac_cv_c_int64_t" != no && break
7538 done
7539fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007540{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7541echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007542 case $ac_cv_c_int64_t in #(
7543 no|yes) ;; #(
7544 *)
7545
7546cat >>confdefs.h <<_ACEOF
7547#define int64_t $ac_cv_c_int64_t
7548_ACEOF
7549;;
7550 esac
7551
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007552{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7553echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007554if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007556else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007557 cat >conftest.$ac_ext <<_ACEOF
7558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
7563$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007564typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007565int
7566main ()
7567{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007568if ((ac__type_new_ *) 0)
7569 return 0;
7570if (sizeof (ac__type_new_))
7571 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007572 ;
7573 return 0;
7574}
7575_ACEOF
7576rm -f conftest.$ac_objext
7577if { (ac_try="$ac_compile"
7578case "(($ac_try" in
7579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7580 *) ac_try_echo=$ac_try;;
7581esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007583 (eval "$ac_compile") 2>conftest.er1
7584 ac_status=$?
7585 grep -v '^ *+' conftest.er1 >conftest.err
7586 rm -f conftest.er1
7587 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007589 (exit $ac_status); } && {
7590 test -z "$ac_c_werror_flag" ||
7591 test ! -s conftest.err
7592 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007593 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007594else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007595 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007596sed 's/^/| /' conftest.$ac_ext >&5
7597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007598 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007602fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007603{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7604echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7605if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007606
7607cat >>confdefs.h <<\_ACEOF
7608#define HAVE_SSIZE_T 1
7609_ACEOF
7610
7611fi
7612
Jack Jansendd19cf82001-12-06 22:36:17 +00007613
Michael W. Hudson54241132001-12-07 15:38:26 +00007614# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007615# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007616{ echo "$as_me:$LINENO: checking for int" >&5
7617echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7618if test "${ac_cv_type_int+set}" = set; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
7620else
7621 cat >conftest.$ac_ext <<_ACEOF
7622/* confdefs.h. */
7623_ACEOF
7624cat confdefs.h >>conftest.$ac_ext
7625cat >>conftest.$ac_ext <<_ACEOF
7626/* end confdefs.h. */
7627$ac_includes_default
7628typedef int ac__type_new_;
7629int
7630main ()
7631{
7632if ((ac__type_new_ *) 0)
7633 return 0;
7634if (sizeof (ac__type_new_))
7635 return 0;
7636 ;
7637 return 0;
7638}
7639_ACEOF
7640rm -f conftest.$ac_objext
7641if { (ac_try="$ac_compile"
7642case "(($ac_try" in
7643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7644 *) ac_try_echo=$ac_try;;
7645esac
7646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7647 (eval "$ac_compile") 2>conftest.er1
7648 ac_status=$?
7649 grep -v '^ *+' conftest.er1 >conftest.err
7650 rm -f conftest.er1
7651 cat conftest.err >&5
7652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7653 (exit $ac_status); } && {
7654 test -z "$ac_c_werror_flag" ||
7655 test ! -s conftest.err
7656 } && test -s conftest.$ac_objext; then
7657 ac_cv_type_int=yes
7658else
7659 echo "$as_me: failed program was:" >&5
7660sed 's/^/| /' conftest.$ac_ext >&5
7661
7662 ac_cv_type_int=no
7663fi
7664
7665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7666fi
7667{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7668echo "${ECHO_T}$ac_cv_type_int" >&6; }
7669
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670# The cast to long int works around a bug in the HP C Compiler
7671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7673# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007674{ echo "$as_me:$LINENO: checking size of int" >&5
7675echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007676if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007678else
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 if test "$cross_compiling" = yes; then
7680 # Depending upon the size, compute the lo and hi bounds.
7681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007682/* confdefs.h. */
7683_ACEOF
7684cat confdefs.h >>conftest.$ac_ext
7685cat >>conftest.$ac_ext <<_ACEOF
7686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007687$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007688 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007689int
7690main ()
7691{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007693test_array [0] = 0
7694
7695 ;
7696 return 0;
7697}
7698_ACEOF
7699rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700if { (ac_try="$ac_compile"
7701case "(($ac_try" in
7702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7703 *) ac_try_echo=$ac_try;;
7704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007708 grep -v '^ *+' conftest.er1 >conftest.err
7709 rm -f conftest.er1
7710 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712 (exit $ac_status); } && {
7713 test -z "$ac_c_werror_flag" ||
7714 test ! -s conftest.err
7715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 ac_lo=0 ac_mid=0
7717 while :; do
7718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007719/* confdefs.h. */
7720_ACEOF
7721cat confdefs.h >>conftest.$ac_ext
7722cat >>conftest.$ac_ext <<_ACEOF
7723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007724$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007725 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007726int
7727main ()
7728{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007730test_array [0] = 0
7731
7732 ;
7733 return 0;
7734}
7735_ACEOF
7736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737if { (ac_try="$ac_compile"
7738case "(($ac_try" in
7739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7740 *) ac_try_echo=$ac_try;;
7741esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007745 grep -v '^ *+' conftest.er1 >conftest.err
7746 rm -f conftest.er1
7747 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007749 (exit $ac_status); } && {
7750 test -z "$ac_c_werror_flag" ||
7751 test ! -s conftest.err
7752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_hi=$ac_mid; break
7754else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007756sed 's/^/| /' conftest.$ac_ext >&5
7757
Martin v. Löwiseba40652007-08-30 20:10:57 +00007758 ac_lo=`expr $ac_mid + 1`
7759 if test $ac_lo -le $ac_mid; then
7760 ac_lo= ac_hi=
7761 break
7762 fi
7763 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765
7766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 done
7768else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007770sed 's/^/| /' conftest.$ac_ext >&5
7771
Martin v. Löwiseba40652007-08-30 20:10:57 +00007772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007773/* confdefs.h. */
7774_ACEOF
7775cat confdefs.h >>conftest.$ac_ext
7776cat >>conftest.$ac_ext <<_ACEOF
7777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007778$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007779 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007780int
7781main ()
7782{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007784test_array [0] = 0
7785
7786 ;
7787 return 0;
7788}
7789_ACEOF
7790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007791if { (ac_try="$ac_compile"
7792case "(($ac_try" in
7793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7794 *) ac_try_echo=$ac_try;;
7795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007799 grep -v '^ *+' conftest.er1 >conftest.err
7800 rm -f conftest.er1
7801 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803 (exit $ac_status); } && {
7804 test -z "$ac_c_werror_flag" ||
7805 test ! -s conftest.err
7806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_hi=-1 ac_mid=-1
7808 while :; do
7809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007810/* confdefs.h. */
7811_ACEOF
7812cat confdefs.h >>conftest.$ac_ext
7813cat >>conftest.$ac_ext <<_ACEOF
7814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007816 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007817int
7818main ()
7819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007821test_array [0] = 0
7822
7823 ;
7824 return 0;
7825}
7826_ACEOF
7827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828if { (ac_try="$ac_compile"
7829case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007836 grep -v '^ *+' conftest.er1 >conftest.err
7837 rm -f conftest.er1
7838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007840 (exit $ac_status); } && {
7841 test -z "$ac_c_werror_flag" ||
7842 test ! -s conftest.err
7843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 ac_lo=$ac_mid; break
7845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007847sed 's/^/| /' conftest.$ac_ext >&5
7848
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849 ac_hi=`expr '(' $ac_mid ')' - 1`
7850 if test $ac_mid -le $ac_hi; then
7851 ac_lo= ac_hi=
7852 break
7853 fi
7854 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856
7857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 done
7859else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007861sed 's/^/| /' conftest.$ac_ext >&5
7862
Martin v. Löwiseba40652007-08-30 20:10:57 +00007863 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007865
7866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868
7869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007870# Binary search between lo and hi bounds.
7871while test "x$ac_lo" != "x$ac_hi"; do
7872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007874/* confdefs.h. */
7875_ACEOF
7876cat confdefs.h >>conftest.$ac_ext
7877cat >>conftest.$ac_ext <<_ACEOF
7878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007879$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007880 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007885test_array [0] = 0
7886
7887 ;
7888 return 0;
7889}
7890_ACEOF
7891rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892if { (ac_try="$ac_compile"
7893case "(($ac_try" in
7894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7895 *) ac_try_echo=$ac_try;;
7896esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007900 grep -v '^ *+' conftest.er1 >conftest.err
7901 rm -f conftest.er1
7902 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904 (exit $ac_status); } && {
7905 test -z "$ac_c_werror_flag" ||
7906 test ! -s conftest.err
7907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 ac_hi=$ac_mid
7909else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007911sed 's/^/| /' conftest.$ac_ext >&5
7912
Martin v. Löwiseba40652007-08-30 20:10:57 +00007913 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007915
7916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007917done
7918case $ac_lo in
7919?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007921 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007922See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007923echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007924See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007925 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926 else
7927 ac_cv_sizeof_int=0
7928 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007929esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007930else
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* confdefs.h. */
7933_ACEOF
7934cat confdefs.h >>conftest.$ac_ext
7935cat >>conftest.$ac_ext <<_ACEOF
7936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007938 typedef int ac__type_sizeof_;
7939static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7940static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007942#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007943int
7944main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007945{
Martin v. Löwis11437992002-04-12 09:54:03 +00007946
7947 FILE *f = fopen ("conftest.val", "w");
7948 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007950 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007952 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007953 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007955 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 }
7957 else
7958 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007959 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007960 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007962 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
7966 ;
7967 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007968}
Martin v. Löwis11437992002-04-12 09:54:03 +00007969_ACEOF
7970rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007971if { (ac_try="$ac_link"
7972case "(($ac_try" in
7973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7974 *) ac_try_echo=$ac_try;;
7975esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007977 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 { (case "(($ac_try" in
7982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7983 *) ac_try_echo=$ac_try;;
7984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 (exit $ac_status); }; }; then
7990 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007992 echo "$as_me: program exited with status $ac_status" >&5
7993echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007994sed 's/^/| /' conftest.$ac_ext >&5
7995
Martin v. Löwis11437992002-04-12 09:54:03 +00007996( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007997if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007999See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008000echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008001See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008002 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 else
8004 ac_cv_sizeof_int=0
8005 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008007rm -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 +00008008fi
8009rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008010fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008011{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8012echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008013
8014
8015
Martin v. Löwis11437992002-04-12 09:54:03 +00008016cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008017#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008018_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008019
8020
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008021{ echo "$as_me:$LINENO: checking for long" >&5
8022echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8023if test "${ac_cv_type_long+set}" = set; then
8024 echo $ECHO_N "(cached) $ECHO_C" >&6
8025else
8026 cat >conftest.$ac_ext <<_ACEOF
8027/* confdefs.h. */
8028_ACEOF
8029cat confdefs.h >>conftest.$ac_ext
8030cat >>conftest.$ac_ext <<_ACEOF
8031/* end confdefs.h. */
8032$ac_includes_default
8033typedef long ac__type_new_;
8034int
8035main ()
8036{
8037if ((ac__type_new_ *) 0)
8038 return 0;
8039if (sizeof (ac__type_new_))
8040 return 0;
8041 ;
8042 return 0;
8043}
8044_ACEOF
8045rm -f conftest.$ac_objext
8046if { (ac_try="$ac_compile"
8047case "(($ac_try" in
8048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8049 *) ac_try_echo=$ac_try;;
8050esac
8051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8052 (eval "$ac_compile") 2>conftest.er1
8053 ac_status=$?
8054 grep -v '^ *+' conftest.er1 >conftest.err
8055 rm -f conftest.er1
8056 cat conftest.err >&5
8057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8058 (exit $ac_status); } && {
8059 test -z "$ac_c_werror_flag" ||
8060 test ! -s conftest.err
8061 } && test -s conftest.$ac_objext; then
8062 ac_cv_type_long=yes
8063else
8064 echo "$as_me: failed program was:" >&5
8065sed 's/^/| /' conftest.$ac_ext >&5
8066
8067 ac_cv_type_long=no
8068fi
8069
8070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8071fi
8072{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8073echo "${ECHO_T}$ac_cv_type_long" >&6; }
8074
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075# The cast to long int works around a bug in the HP C Compiler
8076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8078# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008079{ echo "$as_me:$LINENO: checking size of long" >&5
8080echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008081if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008082 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008083else
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 if test "$cross_compiling" = yes; then
8085 # Depending upon the size, compute the lo and hi bounds.
8086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008087/* confdefs.h. */
8088_ACEOF
8089cat confdefs.h >>conftest.$ac_ext
8090cat >>conftest.$ac_ext <<_ACEOF
8091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008092$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008093 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008094int
8095main ()
8096{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008097static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008098test_array [0] = 0
8099
8100 ;
8101 return 0;
8102}
8103_ACEOF
8104rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105if { (ac_try="$ac_compile"
8106case "(($ac_try" in
8107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8108 *) ac_try_echo=$ac_try;;
8109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008113 grep -v '^ *+' conftest.er1 >conftest.err
8114 rm -f conftest.er1
8115 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117 (exit $ac_status); } && {
8118 test -z "$ac_c_werror_flag" ||
8119 test ! -s conftest.err
8120 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008121 ac_lo=0 ac_mid=0
8122 while :; do
8123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008124/* confdefs.h. */
8125_ACEOF
8126cat confdefs.h >>conftest.$ac_ext
8127cat >>conftest.$ac_ext <<_ACEOF
8128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008129$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008130 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008131int
8132main ()
8133{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008135test_array [0] = 0
8136
8137 ;
8138 return 0;
8139}
8140_ACEOF
8141rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142if { (ac_try="$ac_compile"
8143case "(($ac_try" in
8144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8145 *) ac_try_echo=$ac_try;;
8146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008150 grep -v '^ *+' conftest.er1 >conftest.err
8151 rm -f conftest.er1
8152 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008154 (exit $ac_status); } && {
8155 test -z "$ac_c_werror_flag" ||
8156 test ! -s conftest.err
8157 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_hi=$ac_mid; break
8159else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008161sed 's/^/| /' conftest.$ac_ext >&5
8162
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163 ac_lo=`expr $ac_mid + 1`
8164 if test $ac_lo -le $ac_mid; then
8165 ac_lo= ac_hi=
8166 break
8167 fi
8168 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170
8171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 done
8173else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008175sed 's/^/| /' conftest.$ac_ext >&5
8176
Martin v. Löwiseba40652007-08-30 20:10:57 +00008177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008178/* confdefs.h. */
8179_ACEOF
8180cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008183$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008184 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008185int
8186main ()
8187{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008189test_array [0] = 0
8190
8191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008196if { (ac_try="$ac_compile"
8197case "(($ac_try" in
8198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8199 *) ac_try_echo=$ac_try;;
8200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008204 grep -v '^ *+' conftest.er1 >conftest.err
8205 rm -f conftest.er1
8206 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008208 (exit $ac_status); } && {
8209 test -z "$ac_c_werror_flag" ||
8210 test ! -s conftest.err
8211 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 ac_hi=-1 ac_mid=-1
8213 while :; do
8214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008215/* confdefs.h. */
8216_ACEOF
8217cat confdefs.h >>conftest.$ac_ext
8218cat >>conftest.$ac_ext <<_ACEOF
8219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008220$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008221 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008222int
8223main ()
8224{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008225static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008226test_array [0] = 0
8227
8228 ;
8229 return 0;
8230}
8231_ACEOF
8232rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233if { (ac_try="$ac_compile"
8234case "(($ac_try" in
8235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8236 *) ac_try_echo=$ac_try;;
8237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008239 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008241 grep -v '^ *+' conftest.er1 >conftest.err
8242 rm -f conftest.er1
8243 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245 (exit $ac_status); } && {
8246 test -z "$ac_c_werror_flag" ||
8247 test ! -s conftest.err
8248 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 ac_lo=$ac_mid; break
8250else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008252sed 's/^/| /' conftest.$ac_ext >&5
8253
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254 ac_hi=`expr '(' $ac_mid ')' - 1`
8255 if test $ac_mid -le $ac_hi; then
8256 ac_lo= ac_hi=
8257 break
8258 fi
8259 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261
8262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 done
8264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008265 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008266sed 's/^/| /' conftest.$ac_ext >&5
8267
Martin v. Löwiseba40652007-08-30 20:10:57 +00008268 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008270
8271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273
8274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008275# Binary search between lo and hi bounds.
8276while test "x$ac_lo" != "x$ac_hi"; do
8277 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008279/* confdefs.h. */
8280_ACEOF
8281cat confdefs.h >>conftest.$ac_ext
8282cat >>conftest.$ac_ext <<_ACEOF
8283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008284$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008285 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008286int
8287main ()
8288{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008290test_array [0] = 0
8291
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297if { (ac_try="$ac_compile"
8298case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008305 grep -v '^ *+' conftest.er1 >conftest.err
8306 rm -f conftest.er1
8307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309 (exit $ac_status); } && {
8310 test -z "$ac_c_werror_flag" ||
8311 test ! -s conftest.err
8312 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 ac_hi=$ac_mid
8314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008316sed 's/^/| /' conftest.$ac_ext >&5
8317
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008320
8321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008322done
8323case $ac_lo in
8324?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008326 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008327See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008328echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008329See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008330 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331 else
8332 ac_cv_sizeof_long=0
8333 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008335else
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008337/* confdefs.h. */
8338_ACEOF
8339cat confdefs.h >>conftest.$ac_ext
8340cat >>conftest.$ac_ext <<_ACEOF
8341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008342$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008343 typedef long ac__type_sizeof_;
8344static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8345static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008346#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008347#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008348int
8349main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008350{
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
8352 FILE *f = fopen ("conftest.val", "w");
8353 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008355 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008357 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008358 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008359 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008360 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 }
8362 else
8363 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008365 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008367 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008368 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008369 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008370
8371 ;
8372 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008373}
Martin v. Löwis11437992002-04-12 09:54:03 +00008374_ACEOF
8375rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008376if { (ac_try="$ac_link"
8377case "(($ac_try" in
8378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8379 *) ac_try_echo=$ac_try;;
8380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 { (case "(($ac_try" in
8387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8388 *) ac_try_echo=$ac_try;;
8389esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 (exit $ac_status); }; }; then
8395 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008397 echo "$as_me: program exited with status $ac_status" >&5
8398echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008399sed 's/^/| /' conftest.$ac_ext >&5
8400
Martin v. Löwis11437992002-04-12 09:54:03 +00008401( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008402if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008403 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008404See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008405echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008406See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008407 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008408 else
8409 ac_cv_sizeof_long=0
8410 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008412rm -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 +00008413fi
8414rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008416{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8417echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418
8419
8420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008422#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008423_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008424
8425
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008426{ echo "$as_me:$LINENO: checking for void *" >&5
8427echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8428if test "${ac_cv_type_void_p+set}" = set; then
8429 echo $ECHO_N "(cached) $ECHO_C" >&6
8430else
8431 cat >conftest.$ac_ext <<_ACEOF
8432/* confdefs.h. */
8433_ACEOF
8434cat confdefs.h >>conftest.$ac_ext
8435cat >>conftest.$ac_ext <<_ACEOF
8436/* end confdefs.h. */
8437$ac_includes_default
8438typedef void * ac__type_new_;
8439int
8440main ()
8441{
8442if ((ac__type_new_ *) 0)
8443 return 0;
8444if (sizeof (ac__type_new_))
8445 return 0;
8446 ;
8447 return 0;
8448}
8449_ACEOF
8450rm -f conftest.$ac_objext
8451if { (ac_try="$ac_compile"
8452case "(($ac_try" in
8453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8454 *) ac_try_echo=$ac_try;;
8455esac
8456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8457 (eval "$ac_compile") 2>conftest.er1
8458 ac_status=$?
8459 grep -v '^ *+' conftest.er1 >conftest.err
8460 rm -f conftest.er1
8461 cat conftest.err >&5
8462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8463 (exit $ac_status); } && {
8464 test -z "$ac_c_werror_flag" ||
8465 test ! -s conftest.err
8466 } && test -s conftest.$ac_objext; then
8467 ac_cv_type_void_p=yes
8468else
8469 echo "$as_me: failed program was:" >&5
8470sed 's/^/| /' conftest.$ac_ext >&5
8471
8472 ac_cv_type_void_p=no
8473fi
8474
8475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8476fi
8477{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8478echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8479
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480# The cast to long int works around a bug in the HP C Compiler
8481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8483# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008484{ echo "$as_me:$LINENO: checking size of void *" >&5
8485echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008486if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008487 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008488else
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 if test "$cross_compiling" = yes; then
8490 # Depending upon the size, compute the lo and hi bounds.
8491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008492/* confdefs.h. */
8493_ACEOF
8494cat confdefs.h >>conftest.$ac_ext
8495cat >>conftest.$ac_ext <<_ACEOF
8496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008497$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008498 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008499int
8500main ()
8501{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008503test_array [0] = 0
8504
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510if { (ac_try="$ac_compile"
8511case "(($ac_try" in
8512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8513 *) ac_try_echo=$ac_try;;
8514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008518 grep -v '^ *+' conftest.er1 >conftest.err
8519 rm -f conftest.er1
8520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008522 (exit $ac_status); } && {
8523 test -z "$ac_c_werror_flag" ||
8524 test ! -s conftest.err
8525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_lo=0 ac_mid=0
8527 while :; do
8528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008529/* confdefs.h. */
8530_ACEOF
8531cat confdefs.h >>conftest.$ac_ext
8532cat >>conftest.$ac_ext <<_ACEOF
8533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008534$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008535 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008536int
8537main ()
8538{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008539static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008540test_array [0] = 0
8541
8542 ;
8543 return 0;
8544}
8545_ACEOF
8546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547if { (ac_try="$ac_compile"
8548case "(($ac_try" in
8549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8550 *) ac_try_echo=$ac_try;;
8551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008555 grep -v '^ *+' conftest.er1 >conftest.err
8556 rm -f conftest.er1
8557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008559 (exit $ac_status); } && {
8560 test -z "$ac_c_werror_flag" ||
8561 test ! -s conftest.err
8562 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_hi=$ac_mid; break
8564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008566sed 's/^/| /' conftest.$ac_ext >&5
8567
Martin v. Löwiseba40652007-08-30 20:10:57 +00008568 ac_lo=`expr $ac_mid + 1`
8569 if test $ac_lo -le $ac_mid; then
8570 ac_lo= ac_hi=
8571 break
8572 fi
8573 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575
8576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 done
8578else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008580sed 's/^/| /' conftest.$ac_ext >&5
8581
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008583/* confdefs.h. */
8584_ACEOF
8585cat confdefs.h >>conftest.$ac_ext
8586cat >>conftest.$ac_ext <<_ACEOF
8587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008588$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008589 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008590int
8591main ()
8592{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008593static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008594test_array [0] = 0
8595
8596 ;
8597 return 0;
8598}
8599_ACEOF
8600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008601if { (ac_try="$ac_compile"
8602case "(($ac_try" in
8603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8604 *) ac_try_echo=$ac_try;;
8605esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008609 grep -v '^ *+' conftest.er1 >conftest.err
8610 rm -f conftest.er1
8611 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008613 (exit $ac_status); } && {
8614 test -z "$ac_c_werror_flag" ||
8615 test ! -s conftest.err
8616 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_hi=-1 ac_mid=-1
8618 while :; do
8619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* confdefs.h. */
8621_ACEOF
8622cat confdefs.h >>conftest.$ac_ext
8623cat >>conftest.$ac_ext <<_ACEOF
8624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008626 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008627int
8628main ()
8629{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008630static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008631test_array [0] = 0
8632
8633 ;
8634 return 0;
8635}
8636_ACEOF
8637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638if { (ac_try="$ac_compile"
8639case "(($ac_try" in
8640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8641 *) ac_try_echo=$ac_try;;
8642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008646 grep -v '^ *+' conftest.er1 >conftest.err
8647 rm -f conftest.er1
8648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008650 (exit $ac_status); } && {
8651 test -z "$ac_c_werror_flag" ||
8652 test ! -s conftest.err
8653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_lo=$ac_mid; break
8655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008657sed 's/^/| /' conftest.$ac_ext >&5
8658
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659 ac_hi=`expr '(' $ac_mid ')' - 1`
8660 if test $ac_mid -le $ac_hi; then
8661 ac_lo= ac_hi=
8662 break
8663 fi
8664 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666
8667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 done
8669else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008670 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008671sed 's/^/| /' conftest.$ac_ext >&5
8672
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008675
8676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678
8679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008680# Binary search between lo and hi bounds.
8681while test "x$ac_lo" != "x$ac_hi"; do
8682 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008684/* confdefs.h. */
8685_ACEOF
8686cat confdefs.h >>conftest.$ac_ext
8687cat >>conftest.$ac_ext <<_ACEOF
8688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008689$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008690 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008691int
8692main ()
8693{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008694static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008695test_array [0] = 0
8696
8697 ;
8698 return 0;
8699}
8700_ACEOF
8701rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702if { (ac_try="$ac_compile"
8703case "(($ac_try" in
8704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8705 *) ac_try_echo=$ac_try;;
8706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008710 grep -v '^ *+' conftest.er1 >conftest.err
8711 rm -f conftest.er1
8712 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714 (exit $ac_status); } && {
8715 test -z "$ac_c_werror_flag" ||
8716 test ! -s conftest.err
8717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 ac_hi=$ac_mid
8719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008721sed 's/^/| /' conftest.$ac_ext >&5
8722
Martin v. Löwiseba40652007-08-30 20:10:57 +00008723 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008725
8726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008727done
8728case $ac_lo in
8729?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008731 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008732See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008733echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008734See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008735 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736 else
8737 ac_cv_sizeof_void_p=0
8738 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008740else
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008742/* confdefs.h. */
8743_ACEOF
8744cat confdefs.h >>conftest.$ac_ext
8745cat >>conftest.$ac_ext <<_ACEOF
8746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008747$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008748 typedef void * ac__type_sizeof_;
8749static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8750static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008751#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008752#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008753int
8754main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008755{
Martin v. Löwis11437992002-04-12 09:54:03 +00008756
8757 FILE *f = fopen ("conftest.val", "w");
8758 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008760 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008763 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008765 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 }
8767 else
8768 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008769 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008770 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008772 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008775
8776 ;
8777 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008778}
Martin v. Löwis11437992002-04-12 09:54:03 +00008779_ACEOF
8780rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781if { (ac_try="$ac_link"
8782case "(($ac_try" in
8783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8784 *) ac_try_echo=$ac_try;;
8785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 { (case "(($ac_try" in
8792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8793 *) ac_try_echo=$ac_try;;
8794esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 (exit $ac_status); }; }; then
8800 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008801else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008802 echo "$as_me: program exited with status $ac_status" >&5
8803echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008804sed 's/^/| /' conftest.$ac_ext >&5
8805
Martin v. Löwis11437992002-04-12 09:54:03 +00008806( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008808 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008809See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008810echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008811See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008812 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813 else
8814 ac_cv_sizeof_void_p=0
8815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008817rm -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 +00008818fi
8819rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008820fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008821{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8822echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008823
8824
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008827#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008828_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008829
8830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008831{ echo "$as_me:$LINENO: checking for short" >&5
8832echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8833if test "${ac_cv_type_short+set}" = set; then
8834 echo $ECHO_N "(cached) $ECHO_C" >&6
8835else
8836 cat >conftest.$ac_ext <<_ACEOF
8837/* confdefs.h. */
8838_ACEOF
8839cat confdefs.h >>conftest.$ac_ext
8840cat >>conftest.$ac_ext <<_ACEOF
8841/* end confdefs.h. */
8842$ac_includes_default
8843typedef short ac__type_new_;
8844int
8845main ()
8846{
8847if ((ac__type_new_ *) 0)
8848 return 0;
8849if (sizeof (ac__type_new_))
8850 return 0;
8851 ;
8852 return 0;
8853}
8854_ACEOF
8855rm -f conftest.$ac_objext
8856if { (ac_try="$ac_compile"
8857case "(($ac_try" in
8858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8859 *) ac_try_echo=$ac_try;;
8860esac
8861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8862 (eval "$ac_compile") 2>conftest.er1
8863 ac_status=$?
8864 grep -v '^ *+' conftest.er1 >conftest.err
8865 rm -f conftest.er1
8866 cat conftest.err >&5
8867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868 (exit $ac_status); } && {
8869 test -z "$ac_c_werror_flag" ||
8870 test ! -s conftest.err
8871 } && test -s conftest.$ac_objext; then
8872 ac_cv_type_short=yes
8873else
8874 echo "$as_me: failed program was:" >&5
8875sed 's/^/| /' conftest.$ac_ext >&5
8876
8877 ac_cv_type_short=no
8878fi
8879
8880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8881fi
8882{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8883echo "${ECHO_T}$ac_cv_type_short" >&6; }
8884
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885# The cast to long int works around a bug in the HP C Compiler
8886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8888# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008889{ echo "$as_me:$LINENO: checking size of short" >&5
8890echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008891if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008892 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008893else
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 if test "$cross_compiling" = yes; then
8895 # Depending upon the size, compute the lo and hi bounds.
8896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008897/* confdefs.h. */
8898_ACEOF
8899cat confdefs.h >>conftest.$ac_ext
8900cat >>conftest.$ac_ext <<_ACEOF
8901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008902$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008903 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008904int
8905main ()
8906{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008907static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008908test_array [0] = 0
8909
8910 ;
8911 return 0;
8912}
8913_ACEOF
8914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915if { (ac_try="$ac_compile"
8916case "(($ac_try" in
8917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8918 *) ac_try_echo=$ac_try;;
8919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008923 grep -v '^ *+' conftest.er1 >conftest.err
8924 rm -f conftest.er1
8925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927 (exit $ac_status); } && {
8928 test -z "$ac_c_werror_flag" ||
8929 test ! -s conftest.err
8930 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 ac_lo=0 ac_mid=0
8932 while :; do
8933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008934/* confdefs.h. */
8935_ACEOF
8936cat confdefs.h >>conftest.$ac_ext
8937cat >>conftest.$ac_ext <<_ACEOF
8938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008940 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008941int
8942main ()
8943{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008945test_array [0] = 0
8946
8947 ;
8948 return 0;
8949}
8950_ACEOF
8951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952if { (ac_try="$ac_compile"
8953case "(($ac_try" in
8954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8955 *) ac_try_echo=$ac_try;;
8956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008960 grep -v '^ *+' conftest.er1 >conftest.err
8961 rm -f conftest.er1
8962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964 (exit $ac_status); } && {
8965 test -z "$ac_c_werror_flag" ||
8966 test ! -s conftest.err
8967 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_hi=$ac_mid; break
8969else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008971sed 's/^/| /' conftest.$ac_ext >&5
8972
Martin v. Löwiseba40652007-08-30 20:10:57 +00008973 ac_lo=`expr $ac_mid + 1`
8974 if test $ac_lo -le $ac_mid; then
8975 ac_lo= ac_hi=
8976 break
8977 fi
8978 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980
8981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 done
8983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008985sed 's/^/| /' conftest.$ac_ext >&5
8986
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* confdefs.h. */
8989_ACEOF
8990cat confdefs.h >>conftest.$ac_ext
8991cat >>conftest.$ac_ext <<_ACEOF
8992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008993$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008994 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008995int
8996main ()
8997{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008999test_array [0] = 0
9000
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009006if { (ac_try="$ac_compile"
9007case "(($ac_try" in
9008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9009 *) ac_try_echo=$ac_try;;
9010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009014 grep -v '^ *+' conftest.er1 >conftest.err
9015 rm -f conftest.er1
9016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009018 (exit $ac_status); } && {
9019 test -z "$ac_c_werror_flag" ||
9020 test ! -s conftest.err
9021 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_hi=-1 ac_mid=-1
9023 while :; do
9024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* confdefs.h. */
9026_ACEOF
9027cat confdefs.h >>conftest.$ac_ext
9028cat >>conftest.$ac_ext <<_ACEOF
9029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009031 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032int
9033main ()
9034{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009035static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009036test_array [0] = 0
9037
9038 ;
9039 return 0;
9040}
9041_ACEOF
9042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043if { (ac_try="$ac_compile"
9044case "(($ac_try" in
9045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9046 *) ac_try_echo=$ac_try;;
9047esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009051 grep -v '^ *+' conftest.er1 >conftest.err
9052 rm -f conftest.er1
9053 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055 (exit $ac_status); } && {
9056 test -z "$ac_c_werror_flag" ||
9057 test ! -s conftest.err
9058 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 ac_lo=$ac_mid; break
9060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009062sed 's/^/| /' conftest.$ac_ext >&5
9063
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 ac_hi=`expr '(' $ac_mid ')' - 1`
9065 if test $ac_mid -le $ac_hi; then
9066 ac_lo= ac_hi=
9067 break
9068 fi
9069 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071
9072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 done
9074else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009076sed 's/^/| /' conftest.$ac_ext >&5
9077
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009079fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009080
9081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083
9084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009085# Binary search between lo and hi bounds.
9086while test "x$ac_lo" != "x$ac_hi"; do
9087 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009089/* confdefs.h. */
9090_ACEOF
9091cat confdefs.h >>conftest.$ac_ext
9092cat >>conftest.$ac_ext <<_ACEOF
9093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009094$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009095 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009096int
9097main ()
9098{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009099static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009100test_array [0] = 0
9101
9102 ;
9103 return 0;
9104}
9105_ACEOF
9106rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107if { (ac_try="$ac_compile"
9108case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119 (exit $ac_status); } && {
9120 test -z "$ac_c_werror_flag" ||
9121 test ! -s conftest.err
9122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 ac_hi=$ac_mid
9124else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009126sed 's/^/| /' conftest.$ac_ext >&5
9127
Martin v. Löwiseba40652007-08-30 20:10:57 +00009128 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009130
9131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009132done
9133case $ac_lo in
9134?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009136 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009137See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009138echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009139See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009140 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009141 else
9142 ac_cv_sizeof_short=0
9143 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009145else
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009147/* confdefs.h. */
9148_ACEOF
9149cat confdefs.h >>conftest.$ac_ext
9150cat >>conftest.$ac_ext <<_ACEOF
9151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009152$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009153 typedef short ac__type_sizeof_;
9154static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9155static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009156#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009157#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009158int
9159main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009160{
Martin v. Löwis11437992002-04-12 09:54:03 +00009161
9162 FILE *f = fopen ("conftest.val", "w");
9163 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009165 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009167 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009168 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009169 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009170 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 }
9172 else
9173 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009174 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009175 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009177 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009178 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009179 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009180
9181 ;
9182 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009183}
Martin v. Löwis11437992002-04-12 09:54:03 +00009184_ACEOF
9185rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009186if { (ac_try="$ac_link"
9187case "(($ac_try" in
9188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9189 *) ac_try_echo=$ac_try;;
9190esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009192 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 { (case "(($ac_try" in
9197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9198 *) ac_try_echo=$ac_try;;
9199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 (exit $ac_status); }; }; then
9205 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009207 echo "$as_me: program exited with status $ac_status" >&5
9208echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009209sed 's/^/| /' conftest.$ac_ext >&5
9210
Martin v. Löwis11437992002-04-12 09:54:03 +00009211( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009212if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009213 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009214See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009215echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009216See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009217 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218 else
9219 ac_cv_sizeof_short=0
9220 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009222rm -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 +00009223fi
9224rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009226{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9227echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009228
9229
9230
Martin v. Löwis11437992002-04-12 09:54:03 +00009231cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009232#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009234
9235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009236{ echo "$as_me:$LINENO: checking for float" >&5
9237echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9238if test "${ac_cv_type_float+set}" = set; then
9239 echo $ECHO_N "(cached) $ECHO_C" >&6
9240else
9241 cat >conftest.$ac_ext <<_ACEOF
9242/* confdefs.h. */
9243_ACEOF
9244cat confdefs.h >>conftest.$ac_ext
9245cat >>conftest.$ac_ext <<_ACEOF
9246/* end confdefs.h. */
9247$ac_includes_default
9248typedef float ac__type_new_;
9249int
9250main ()
9251{
9252if ((ac__type_new_ *) 0)
9253 return 0;
9254if (sizeof (ac__type_new_))
9255 return 0;
9256 ;
9257 return 0;
9258}
9259_ACEOF
9260rm -f conftest.$ac_objext
9261if { (ac_try="$ac_compile"
9262case "(($ac_try" in
9263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9264 *) ac_try_echo=$ac_try;;
9265esac
9266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9267 (eval "$ac_compile") 2>conftest.er1
9268 ac_status=$?
9269 grep -v '^ *+' conftest.er1 >conftest.err
9270 rm -f conftest.er1
9271 cat conftest.err >&5
9272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9273 (exit $ac_status); } && {
9274 test -z "$ac_c_werror_flag" ||
9275 test ! -s conftest.err
9276 } && test -s conftest.$ac_objext; then
9277 ac_cv_type_float=yes
9278else
9279 echo "$as_me: failed program was:" >&5
9280sed 's/^/| /' conftest.$ac_ext >&5
9281
9282 ac_cv_type_float=no
9283fi
9284
9285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9286fi
9287{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9288echo "${ECHO_T}$ac_cv_type_float" >&6; }
9289
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290# The cast to long int works around a bug in the HP C Compiler
9291# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9292# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9293# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009294{ echo "$as_me:$LINENO: checking size of float" >&5
9295echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009296if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009297 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009298else
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 if test "$cross_compiling" = yes; then
9300 # Depending upon the size, compute the lo and hi bounds.
9301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009302/* confdefs.h. */
9303_ACEOF
9304cat confdefs.h >>conftest.$ac_ext
9305cat >>conftest.$ac_ext <<_ACEOF
9306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009307$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009308 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009309int
9310main ()
9311{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009312static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009313test_array [0] = 0
9314
9315 ;
9316 return 0;
9317}
9318_ACEOF
9319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320if { (ac_try="$ac_compile"
9321case "(($ac_try" in
9322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9323 *) ac_try_echo=$ac_try;;
9324esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009328 grep -v '^ *+' conftest.er1 >conftest.err
9329 rm -f conftest.er1
9330 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332 (exit $ac_status); } && {
9333 test -z "$ac_c_werror_flag" ||
9334 test ! -s conftest.err
9335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 ac_lo=0 ac_mid=0
9337 while :; do
9338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009339/* confdefs.h. */
9340_ACEOF
9341cat confdefs.h >>conftest.$ac_ext
9342cat >>conftest.$ac_ext <<_ACEOF
9343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009344$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009345 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009346int
9347main ()
9348{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009350test_array [0] = 0
9351
9352 ;
9353 return 0;
9354}
9355_ACEOF
9356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357if { (ac_try="$ac_compile"
9358case "(($ac_try" in
9359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9360 *) ac_try_echo=$ac_try;;
9361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009365 grep -v '^ *+' conftest.er1 >conftest.err
9366 rm -f conftest.er1
9367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009369 (exit $ac_status); } && {
9370 test -z "$ac_c_werror_flag" ||
9371 test ! -s conftest.err
9372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ac_hi=$ac_mid; break
9374else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009376sed 's/^/| /' conftest.$ac_ext >&5
9377
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378 ac_lo=`expr $ac_mid + 1`
9379 if test $ac_lo -le $ac_mid; then
9380 ac_lo= ac_hi=
9381 break
9382 fi
9383 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385
9386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 done
9388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009390sed 's/^/| /' conftest.$ac_ext >&5
9391
Martin v. Löwiseba40652007-08-30 20:10:57 +00009392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009393/* confdefs.h. */
9394_ACEOF
9395cat confdefs.h >>conftest.$ac_ext
9396cat >>conftest.$ac_ext <<_ACEOF
9397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009398$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009399 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
9402{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009404test_array [0] = 0
9405
9406 ;
9407 return 0;
9408}
9409_ACEOF
9410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009411if { (ac_try="$ac_compile"
9412case "(($ac_try" in
9413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9414 *) ac_try_echo=$ac_try;;
9415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009419 grep -v '^ *+' conftest.er1 >conftest.err
9420 rm -f conftest.er1
9421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423 (exit $ac_status); } && {
9424 test -z "$ac_c_werror_flag" ||
9425 test ! -s conftest.err
9426 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ac_hi=-1 ac_mid=-1
9428 while :; do
9429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009430/* confdefs.h. */
9431_ACEOF
9432cat confdefs.h >>conftest.$ac_ext
9433cat >>conftest.$ac_ext <<_ACEOF
9434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009435$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009436 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009437int
9438main ()
9439{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009440static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009441test_array [0] = 0
9442
9443 ;
9444 return 0;
9445}
9446_ACEOF
9447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448if { (ac_try="$ac_compile"
9449case "(($ac_try" in
9450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9451 *) ac_try_echo=$ac_try;;
9452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009456 grep -v '^ *+' conftest.er1 >conftest.err
9457 rm -f conftest.er1
9458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009460 (exit $ac_status); } && {
9461 test -z "$ac_c_werror_flag" ||
9462 test ! -s conftest.err
9463 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009464 ac_lo=$ac_mid; break
9465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009467sed 's/^/| /' conftest.$ac_ext >&5
9468
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469 ac_hi=`expr '(' $ac_mid ')' - 1`
9470 if test $ac_mid -le $ac_hi; then
9471 ac_lo= ac_hi=
9472 break
9473 fi
9474 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009475fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476
9477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 done
9479else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009481sed 's/^/| /' conftest.$ac_ext >&5
9482
Martin v. Löwiseba40652007-08-30 20:10:57 +00009483 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009485
9486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488
9489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009490# Binary search between lo and hi bounds.
9491while test "x$ac_lo" != "x$ac_hi"; do
9492 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009494/* confdefs.h. */
9495_ACEOF
9496cat confdefs.h >>conftest.$ac_ext
9497cat >>conftest.$ac_ext <<_ACEOF
9498/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009499$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009500 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009501int
9502main ()
9503{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009504static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009505test_array [0] = 0
9506
9507 ;
9508 return 0;
9509}
9510_ACEOF
9511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512if { (ac_try="$ac_compile"
9513case "(($ac_try" in
9514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9515 *) ac_try_echo=$ac_try;;
9516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009520 grep -v '^ *+' conftest.er1 >conftest.err
9521 rm -f conftest.er1
9522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524 (exit $ac_status); } && {
9525 test -z "$ac_c_werror_flag" ||
9526 test ! -s conftest.err
9527 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 ac_hi=$ac_mid
9529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009531sed 's/^/| /' conftest.$ac_ext >&5
9532
Martin v. Löwiseba40652007-08-30 20:10:57 +00009533 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009535
9536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537done
9538case $ac_lo in
9539?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009541 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009542See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009543echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009544See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009545 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009546 else
9547 ac_cv_sizeof_float=0
9548 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009549esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009550else
Martin v. Löwis11437992002-04-12 09:54:03 +00009551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* confdefs.h. */
9553_ACEOF
9554cat confdefs.h >>conftest.$ac_ext
9555cat >>conftest.$ac_ext <<_ACEOF
9556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009558 typedef float ac__type_sizeof_;
9559static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9560static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009561#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009562#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009563int
9564main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009565{
Martin v. Löwis11437992002-04-12 09:54:03 +00009566
9567 FILE *f = fopen ("conftest.val", "w");
9568 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009570 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009572 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009573 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009574 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009575 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 }
9577 else
9578 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009580 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009582 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009583 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009584 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009585
9586 ;
9587 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009588}
Martin v. Löwis11437992002-04-12 09:54:03 +00009589_ACEOF
9590rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591if { (ac_try="$ac_link"
9592case "(($ac_try" in
9593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9594 *) ac_try_echo=$ac_try;;
9595esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 { (case "(($ac_try" in
9602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9603 *) ac_try_echo=$ac_try;;
9604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 (exit $ac_status); }; }; then
9610 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009612 echo "$as_me: program exited with status $ac_status" >&5
9613echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009614sed 's/^/| /' conftest.$ac_ext >&5
9615
Martin v. Löwis11437992002-04-12 09:54:03 +00009616( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009618 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009619See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009620echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009621See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009622 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623 else
9624 ac_cv_sizeof_float=0
9625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009627rm -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 +00009628fi
9629rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009630fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009631{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9632echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009633
9634
9635
Martin v. Löwis11437992002-04-12 09:54:03 +00009636cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009637#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009638_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009639
9640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009641{ echo "$as_me:$LINENO: checking for double" >&5
9642echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9643if test "${ac_cv_type_double+set}" = set; then
9644 echo $ECHO_N "(cached) $ECHO_C" >&6
9645else
9646 cat >conftest.$ac_ext <<_ACEOF
9647/* confdefs.h. */
9648_ACEOF
9649cat confdefs.h >>conftest.$ac_ext
9650cat >>conftest.$ac_ext <<_ACEOF
9651/* end confdefs.h. */
9652$ac_includes_default
9653typedef double ac__type_new_;
9654int
9655main ()
9656{
9657if ((ac__type_new_ *) 0)
9658 return 0;
9659if (sizeof (ac__type_new_))
9660 return 0;
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665rm -f conftest.$ac_objext
9666if { (ac_try="$ac_compile"
9667case "(($ac_try" in
9668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9669 *) ac_try_echo=$ac_try;;
9670esac
9671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9672 (eval "$ac_compile") 2>conftest.er1
9673 ac_status=$?
9674 grep -v '^ *+' conftest.er1 >conftest.err
9675 rm -f conftest.er1
9676 cat conftest.err >&5
9677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9678 (exit $ac_status); } && {
9679 test -z "$ac_c_werror_flag" ||
9680 test ! -s conftest.err
9681 } && test -s conftest.$ac_objext; then
9682 ac_cv_type_double=yes
9683else
9684 echo "$as_me: failed program was:" >&5
9685sed 's/^/| /' conftest.$ac_ext >&5
9686
9687 ac_cv_type_double=no
9688fi
9689
9690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9691fi
9692{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9693echo "${ECHO_T}$ac_cv_type_double" >&6; }
9694
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695# The cast to long int works around a bug in the HP C Compiler
9696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9698# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009699{ echo "$as_me:$LINENO: checking size of double" >&5
9700echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009701if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009702 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 if test "$cross_compiling" = yes; then
9705 # Depending upon the size, compute the lo and hi bounds.
9706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* confdefs.h. */
9708_ACEOF
9709cat confdefs.h >>conftest.$ac_ext
9710cat >>conftest.$ac_ext <<_ACEOF
9711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009713 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009714int
9715main ()
9716{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009718test_array [0] = 0
9719
9720 ;
9721 return 0;
9722}
9723_ACEOF
9724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725if { (ac_try="$ac_compile"
9726case "(($ac_try" in
9727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9728 *) ac_try_echo=$ac_try;;
9729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009733 grep -v '^ *+' conftest.er1 >conftest.err
9734 rm -f conftest.er1
9735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737 (exit $ac_status); } && {
9738 test -z "$ac_c_werror_flag" ||
9739 test ! -s conftest.err
9740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_lo=0 ac_mid=0
9742 while :; do
9743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009744/* confdefs.h. */
9745_ACEOF
9746cat confdefs.h >>conftest.$ac_ext
9747cat >>conftest.$ac_ext <<_ACEOF
9748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009749$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009750 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009751int
9752main ()
9753{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009754static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009755test_array [0] = 0
9756
9757 ;
9758 return 0;
9759}
9760_ACEOF
9761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762if { (ac_try="$ac_compile"
9763case "(($ac_try" in
9764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9765 *) ac_try_echo=$ac_try;;
9766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009770 grep -v '^ *+' conftest.er1 >conftest.err
9771 rm -f conftest.er1
9772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774 (exit $ac_status); } && {
9775 test -z "$ac_c_werror_flag" ||
9776 test ! -s conftest.err
9777 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_hi=$ac_mid; break
9779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009781sed 's/^/| /' conftest.$ac_ext >&5
9782
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783 ac_lo=`expr $ac_mid + 1`
9784 if test $ac_lo -le $ac_mid; then
9785 ac_lo= ac_hi=
9786 break
9787 fi
9788 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790
9791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 done
9793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009795sed 's/^/| /' conftest.$ac_ext >&5
9796
Martin v. Löwiseba40652007-08-30 20:10:57 +00009797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009798/* confdefs.h. */
9799_ACEOF
9800cat confdefs.h >>conftest.$ac_ext
9801cat >>conftest.$ac_ext <<_ACEOF
9802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009803$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009804 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009809test_array [0] = 0
9810
9811 ;
9812 return 0;
9813}
9814_ACEOF
9815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009816if { (ac_try="$ac_compile"
9817case "(($ac_try" in
9818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9819 *) ac_try_echo=$ac_try;;
9820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009824 grep -v '^ *+' conftest.er1 >conftest.err
9825 rm -f conftest.er1
9826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009828 (exit $ac_status); } && {
9829 test -z "$ac_c_werror_flag" ||
9830 test ! -s conftest.err
9831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ac_hi=-1 ac_mid=-1
9833 while :; do
9834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* confdefs.h. */
9836_ACEOF
9837cat confdefs.h >>conftest.$ac_ext
9838cat >>conftest.$ac_ext <<_ACEOF
9839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009840$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009841 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009842int
9843main ()
9844{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009845static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009846test_array [0] = 0
9847
9848 ;
9849 return 0;
9850}
9851_ACEOF
9852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853if { (ac_try="$ac_compile"
9854case "(($ac_try" in
9855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9856 *) ac_try_echo=$ac_try;;
9857esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009861 grep -v '^ *+' conftest.er1 >conftest.err
9862 rm -f conftest.er1
9863 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865 (exit $ac_status); } && {
9866 test -z "$ac_c_werror_flag" ||
9867 test ! -s conftest.err
9868 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_lo=$ac_mid; break
9870else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009872sed 's/^/| /' conftest.$ac_ext >&5
9873
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874 ac_hi=`expr '(' $ac_mid ')' - 1`
9875 if test $ac_mid -le $ac_hi; then
9876 ac_lo= ac_hi=
9877 break
9878 fi
9879 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881
9882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 done
9884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009886sed 's/^/| /' conftest.$ac_ext >&5
9887
Martin v. Löwiseba40652007-08-30 20:10:57 +00009888 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009890
9891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893
9894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009895# Binary search between lo and hi bounds.
9896while test "x$ac_lo" != "x$ac_hi"; do
9897 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009899/* confdefs.h. */
9900_ACEOF
9901cat confdefs.h >>conftest.$ac_ext
9902cat >>conftest.$ac_ext <<_ACEOF
9903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009904$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009905 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009906int
9907main ()
9908{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009910test_array [0] = 0
9911
9912 ;
9913 return 0;
9914}
9915_ACEOF
9916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917if { (ac_try="$ac_compile"
9918case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009925 grep -v '^ *+' conftest.er1 >conftest.err
9926 rm -f conftest.er1
9927 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929 (exit $ac_status); } && {
9930 test -z "$ac_c_werror_flag" ||
9931 test ! -s conftest.err
9932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_hi=$ac_mid
9934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009936sed 's/^/| /' conftest.$ac_ext >&5
9937
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009940
9941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009942done
9943case $ac_lo in
9944?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009946 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009947See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009948echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009949See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009950 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009951 else
9952 ac_cv_sizeof_double=0
9953 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009954esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009955else
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* confdefs.h. */
9958_ACEOF
9959cat confdefs.h >>conftest.$ac_ext
9960cat >>conftest.$ac_ext <<_ACEOF
9961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009962$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009963 typedef double ac__type_sizeof_;
9964static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9965static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009966#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009967#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009970{
Martin v. Löwis11437992002-04-12 09:54:03 +00009971
9972 FILE *f = fopen ("conftest.val", "w");
9973 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009975 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009978 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009980 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 }
9982 else
9983 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009984 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009985 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009987 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009989 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
9991 ;
9992 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009993}
Martin v. Löwis11437992002-04-12 09:54:03 +00009994_ACEOF
9995rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009996if { (ac_try="$ac_link"
9997case "(($ac_try" in
9998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9999 *) ac_try_echo=$ac_try;;
10000esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 { (case "(($ac_try" in
10007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10008 *) ac_try_echo=$ac_try;;
10009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 (exit $ac_status); }; }; then
10015 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010016else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010017 echo "$as_me: program exited with status $ac_status" >&5
10018echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010019sed 's/^/| /' conftest.$ac_ext >&5
10020
Martin v. Löwis11437992002-04-12 09:54:03 +000010021( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010022if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010023 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010024See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010025echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010026See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010027 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028 else
10029 ac_cv_sizeof_double=0
10030 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010031fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010032rm -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 +000010033fi
10034rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010035fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010036{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10037echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010038
10039
10040
Martin v. Löwis11437992002-04-12 09:54:03 +000010041cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010042#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010043_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010044
10045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010046{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10047echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10048if test "${ac_cv_type_fpos_t+set}" = set; then
10049 echo $ECHO_N "(cached) $ECHO_C" >&6
10050else
10051 cat >conftest.$ac_ext <<_ACEOF
10052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
10057$ac_includes_default
10058typedef fpos_t ac__type_new_;
10059int
10060main ()
10061{
10062if ((ac__type_new_ *) 0)
10063 return 0;
10064if (sizeof (ac__type_new_))
10065 return 0;
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070rm -f conftest.$ac_objext
10071if { (ac_try="$ac_compile"
10072case "(($ac_try" in
10073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10074 *) ac_try_echo=$ac_try;;
10075esac
10076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10077 (eval "$ac_compile") 2>conftest.er1
10078 ac_status=$?
10079 grep -v '^ *+' conftest.er1 >conftest.err
10080 rm -f conftest.er1
10081 cat conftest.err >&5
10082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10083 (exit $ac_status); } && {
10084 test -z "$ac_c_werror_flag" ||
10085 test ! -s conftest.err
10086 } && test -s conftest.$ac_objext; then
10087 ac_cv_type_fpos_t=yes
10088else
10089 echo "$as_me: failed program was:" >&5
10090sed 's/^/| /' conftest.$ac_ext >&5
10091
10092 ac_cv_type_fpos_t=no
10093fi
10094
10095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10096fi
10097{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10098echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10099
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100# The cast to long int works around a bug in the HP C Compiler
10101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10103# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010104{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10105echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010106if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010107 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 if test "$cross_compiling" = yes; then
10110 # Depending upon the size, compute the lo and hi bounds.
10111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* confdefs.h. */
10113_ACEOF
10114cat confdefs.h >>conftest.$ac_ext
10115cat >>conftest.$ac_ext <<_ACEOF
10116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010117$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010118 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010119int
10120main ()
10121{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010123test_array [0] = 0
10124
10125 ;
10126 return 0;
10127}
10128_ACEOF
10129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130if { (ac_try="$ac_compile"
10131case "(($ac_try" in
10132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10133 *) ac_try_echo=$ac_try;;
10134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010138 grep -v '^ *+' conftest.er1 >conftest.err
10139 rm -f conftest.er1
10140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010142 (exit $ac_status); } && {
10143 test -z "$ac_c_werror_flag" ||
10144 test ! -s conftest.err
10145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_lo=0 ac_mid=0
10147 while :; do
10148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010149/* confdefs.h. */
10150_ACEOF
10151cat confdefs.h >>conftest.$ac_ext
10152cat >>conftest.$ac_ext <<_ACEOF
10153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010154$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010155 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010156int
10157main ()
10158{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010160test_array [0] = 0
10161
10162 ;
10163 return 0;
10164}
10165_ACEOF
10166rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167if { (ac_try="$ac_compile"
10168case "(($ac_try" in
10169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10170 *) ac_try_echo=$ac_try;;
10171esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010175 grep -v '^ *+' conftest.er1 >conftest.err
10176 rm -f conftest.er1
10177 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010179 (exit $ac_status); } && {
10180 test -z "$ac_c_werror_flag" ||
10181 test ! -s conftest.err
10182 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_hi=$ac_mid; break
10184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010186sed 's/^/| /' conftest.$ac_ext >&5
10187
Martin v. Löwiseba40652007-08-30 20:10:57 +000010188 ac_lo=`expr $ac_mid + 1`
10189 if test $ac_lo -le $ac_mid; then
10190 ac_lo= ac_hi=
10191 break
10192 fi
10193 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195
10196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 done
10198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010200sed 's/^/| /' conftest.$ac_ext >&5
10201
Martin v. Löwiseba40652007-08-30 20:10:57 +000010202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* confdefs.h. */
10204_ACEOF
10205cat confdefs.h >>conftest.$ac_ext
10206cat >>conftest.$ac_ext <<_ACEOF
10207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010209 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010210int
10211main ()
10212{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010213static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010214test_array [0] = 0
10215
10216 ;
10217 return 0;
10218}
10219_ACEOF
10220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010221if { (ac_try="$ac_compile"
10222case "(($ac_try" in
10223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10224 *) ac_try_echo=$ac_try;;
10225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010229 grep -v '^ *+' conftest.er1 >conftest.err
10230 rm -f conftest.er1
10231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233 (exit $ac_status); } && {
10234 test -z "$ac_c_werror_flag" ||
10235 test ! -s conftest.err
10236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_hi=-1 ac_mid=-1
10238 while :; do
10239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010240/* confdefs.h. */
10241_ACEOF
10242cat confdefs.h >>conftest.$ac_ext
10243cat >>conftest.$ac_ext <<_ACEOF
10244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010245$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010246 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010247int
10248main ()
10249{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010251test_array [0] = 0
10252
10253 ;
10254 return 0;
10255}
10256_ACEOF
10257rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258if { (ac_try="$ac_compile"
10259case "(($ac_try" in
10260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261 *) ac_try_echo=$ac_try;;
10262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010266 grep -v '^ *+' conftest.er1 >conftest.err
10267 rm -f conftest.er1
10268 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010270 (exit $ac_status); } && {
10271 test -z "$ac_c_werror_flag" ||
10272 test ! -s conftest.err
10273 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010274 ac_lo=$ac_mid; break
10275else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010277sed 's/^/| /' conftest.$ac_ext >&5
10278
Martin v. Löwiseba40652007-08-30 20:10:57 +000010279 ac_hi=`expr '(' $ac_mid ')' - 1`
10280 if test $ac_mid -le $ac_hi; then
10281 ac_lo= ac_hi=
10282 break
10283 fi
10284 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286
10287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 done
10289else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010291sed 's/^/| /' conftest.$ac_ext >&5
10292
Martin v. Löwiseba40652007-08-30 20:10:57 +000010293 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295
10296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010298
10299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010300# Binary search between lo and hi bounds.
10301while test "x$ac_lo" != "x$ac_hi"; do
10302 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010304/* confdefs.h. */
10305_ACEOF
10306cat confdefs.h >>conftest.$ac_ext
10307cat >>conftest.$ac_ext <<_ACEOF
10308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010310 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010311int
10312main ()
10313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010315test_array [0] = 0
10316
10317 ;
10318 return 0;
10319}
10320_ACEOF
10321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322if { (ac_try="$ac_compile"
10323case "(($ac_try" in
10324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10325 *) ac_try_echo=$ac_try;;
10326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010330 grep -v '^ *+' conftest.er1 >conftest.err
10331 rm -f conftest.er1
10332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334 (exit $ac_status); } && {
10335 test -z "$ac_c_werror_flag" ||
10336 test ! -s conftest.err
10337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 ac_hi=$ac_mid
10339else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010341sed 's/^/| /' conftest.$ac_ext >&5
10342
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010345
10346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010347done
10348case $ac_lo in
10349?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010351 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010352See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010353echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010354See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010355 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010356 else
10357 ac_cv_sizeof_fpos_t=0
10358 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010359esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010360else
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* confdefs.h. */
10363_ACEOF
10364cat confdefs.h >>conftest.$ac_ext
10365cat >>conftest.$ac_ext <<_ACEOF
10366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010367$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010368 typedef fpos_t ac__type_sizeof_;
10369static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10370static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010371#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010372#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010373int
10374main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010375{
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
10377 FILE *f = fopen ("conftest.val", "w");
10378 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010379 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010380 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010382 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010383 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010384 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010385 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010386 }
10387 else
10388 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010389 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010390 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010391 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010392 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010395
10396 ;
10397 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010398}
Martin v. Löwis11437992002-04-12 09:54:03 +000010399_ACEOF
10400rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401if { (ac_try="$ac_link"
10402case "(($ac_try" in
10403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10404 *) ac_try_echo=$ac_try;;
10405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010407 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411 { (case "(($ac_try" in
10412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10413 *) ac_try_echo=$ac_try;;
10414esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 (exit $ac_status); }; }; then
10420 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010421else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010422 echo "$as_me: program exited with status $ac_status" >&5
10423echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010424sed 's/^/| /' conftest.$ac_ext >&5
10425
Martin v. Löwis11437992002-04-12 09:54:03 +000010426( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010427if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010428 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010429See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010430echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010431See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010432 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433 else
10434 ac_cv_sizeof_fpos_t=0
10435 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010437rm -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 +000010438fi
10439rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010440fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010441{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10442echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010443
10444
10445
Martin v. Löwis11437992002-04-12 09:54:03 +000010446cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010447#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010449
Michael W. Hudson54241132001-12-07 15:38:26 +000010450
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010451{ echo "$as_me:$LINENO: checking for size_t" >&5
10452echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10453if test "${ac_cv_type_size_t+set}" = set; then
10454 echo $ECHO_N "(cached) $ECHO_C" >&6
10455else
10456 cat >conftest.$ac_ext <<_ACEOF
10457/* confdefs.h. */
10458_ACEOF
10459cat confdefs.h >>conftest.$ac_ext
10460cat >>conftest.$ac_ext <<_ACEOF
10461/* end confdefs.h. */
10462$ac_includes_default
10463typedef size_t ac__type_new_;
10464int
10465main ()
10466{
10467if ((ac__type_new_ *) 0)
10468 return 0;
10469if (sizeof (ac__type_new_))
10470 return 0;
10471 ;
10472 return 0;
10473}
10474_ACEOF
10475rm -f conftest.$ac_objext
10476if { (ac_try="$ac_compile"
10477case "(($ac_try" in
10478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10479 *) ac_try_echo=$ac_try;;
10480esac
10481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10482 (eval "$ac_compile") 2>conftest.er1
10483 ac_status=$?
10484 grep -v '^ *+' conftest.er1 >conftest.err
10485 rm -f conftest.er1
10486 cat conftest.err >&5
10487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10488 (exit $ac_status); } && {
10489 test -z "$ac_c_werror_flag" ||
10490 test ! -s conftest.err
10491 } && test -s conftest.$ac_objext; then
10492 ac_cv_type_size_t=yes
10493else
10494 echo "$as_me: failed program was:" >&5
10495sed 's/^/| /' conftest.$ac_ext >&5
10496
10497 ac_cv_type_size_t=no
10498fi
10499
10500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10501fi
10502{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10503echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10504
Martin v. Löwiseba40652007-08-30 20:10:57 +000010505# The cast to long int works around a bug in the HP C Compiler
10506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10508# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010509{ echo "$as_me:$LINENO: checking size of size_t" >&5
10510echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010511if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 if test "$cross_compiling" = yes; then
10515 # Depending upon the size, compute the lo and hi bounds.
10516cat >conftest.$ac_ext <<_ACEOF
10517/* confdefs.h. */
10518_ACEOF
10519cat confdefs.h >>conftest.$ac_ext
10520cat >>conftest.$ac_ext <<_ACEOF
10521/* end confdefs.h. */
10522$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010523 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010524int
10525main ()
10526{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528test_array [0] = 0
10529
10530 ;
10531 return 0;
10532}
10533_ACEOF
10534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010535if { (ac_try="$ac_compile"
10536case "(($ac_try" in
10537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10538 *) ac_try_echo=$ac_try;;
10539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010542 ac_status=$?
10543 grep -v '^ *+' conftest.er1 >conftest.err
10544 rm -f conftest.er1
10545 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010547 (exit $ac_status); } && {
10548 test -z "$ac_c_werror_flag" ||
10549 test ! -s conftest.err
10550 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551 ac_lo=0 ac_mid=0
10552 while :; do
10553 cat >conftest.$ac_ext <<_ACEOF
10554/* confdefs.h. */
10555_ACEOF
10556cat confdefs.h >>conftest.$ac_ext
10557cat >>conftest.$ac_ext <<_ACEOF
10558/* end confdefs.h. */
10559$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010560 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010561int
10562main ()
10563{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010565test_array [0] = 0
10566
10567 ;
10568 return 0;
10569}
10570_ACEOF
10571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572if { (ac_try="$ac_compile"
10573case "(($ac_try" in
10574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10575 *) ac_try_echo=$ac_try;;
10576esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579 ac_status=$?
10580 grep -v '^ *+' conftest.er1 >conftest.err
10581 rm -f conftest.er1
10582 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010584 (exit $ac_status); } && {
10585 test -z "$ac_c_werror_flag" ||
10586 test ! -s conftest.err
10587 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588 ac_hi=$ac_mid; break
10589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010590 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591sed 's/^/| /' conftest.$ac_ext >&5
10592
Martin v. Löwiseba40652007-08-30 20:10:57 +000010593 ac_lo=`expr $ac_mid + 1`
10594 if test $ac_lo -le $ac_mid; then
10595 ac_lo= ac_hi=
10596 break
10597 fi
10598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600
10601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602 done
10603else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010604 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605sed 's/^/| /' conftest.$ac_ext >&5
10606
Martin v. Löwiseba40652007-08-30 20:10:57 +000010607 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608/* confdefs.h. */
10609_ACEOF
10610cat confdefs.h >>conftest.$ac_ext
10611cat >>conftest.$ac_ext <<_ACEOF
10612/* end confdefs.h. */
10613$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010614 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615int
10616main ()
10617{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010619test_array [0] = 0
10620
10621 ;
10622 return 0;
10623}
10624_ACEOF
10625rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626if { (ac_try="$ac_compile"
10627case "(($ac_try" in
10628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10629 *) ac_try_echo=$ac_try;;
10630esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633 ac_status=$?
10634 grep -v '^ *+' conftest.er1 >conftest.err
10635 rm -f conftest.er1
10636 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638 (exit $ac_status); } && {
10639 test -z "$ac_c_werror_flag" ||
10640 test ! -s conftest.err
10641 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010642 ac_hi=-1 ac_mid=-1
10643 while :; do
10644 cat >conftest.$ac_ext <<_ACEOF
10645/* confdefs.h. */
10646_ACEOF
10647cat confdefs.h >>conftest.$ac_ext
10648cat >>conftest.$ac_ext <<_ACEOF
10649/* end confdefs.h. */
10650$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010651 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652int
10653main ()
10654{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656test_array [0] = 0
10657
10658 ;
10659 return 0;
10660}
10661_ACEOF
10662rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663if { (ac_try="$ac_compile"
10664case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010670 ac_status=$?
10671 grep -v '^ *+' conftest.er1 >conftest.err
10672 rm -f conftest.er1
10673 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010675 (exit $ac_status); } && {
10676 test -z "$ac_c_werror_flag" ||
10677 test ! -s conftest.err
10678 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679 ac_lo=$ac_mid; break
10680else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010681 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010682sed 's/^/| /' conftest.$ac_ext >&5
10683
Martin v. Löwiseba40652007-08-30 20:10:57 +000010684 ac_hi=`expr '(' $ac_mid ')' - 1`
10685 if test $ac_mid -le $ac_hi; then
10686 ac_lo= ac_hi=
10687 break
10688 fi
10689 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691
10692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693 done
10694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010695 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696sed 's/^/| /' conftest.$ac_ext >&5
10697
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010700
10701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703
10704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705# Binary search between lo and hi bounds.
10706while test "x$ac_lo" != "x$ac_hi"; do
10707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10708 cat >conftest.$ac_ext <<_ACEOF
10709/* confdefs.h. */
10710_ACEOF
10711cat confdefs.h >>conftest.$ac_ext
10712cat >>conftest.$ac_ext <<_ACEOF
10713/* end confdefs.h. */
10714$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010715 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010716int
10717main ()
10718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010720test_array [0] = 0
10721
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727if { (ac_try="$ac_compile"
10728case "(($ac_try" in
10729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10730 *) ac_try_echo=$ac_try;;
10731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010734 ac_status=$?
10735 grep -v '^ *+' conftest.er1 >conftest.err
10736 rm -f conftest.er1
10737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739 (exit $ac_status); } && {
10740 test -z "$ac_c_werror_flag" ||
10741 test ! -s conftest.err
10742 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743 ac_hi=$ac_mid
10744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010745 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746sed 's/^/| /' conftest.$ac_ext >&5
10747
Martin v. Löwiseba40652007-08-30 20:10:57 +000010748 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750
10751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010752done
10753case $ac_lo in
10754?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010756 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010757See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010758echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010759See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010760 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010761 else
10762 ac_cv_sizeof_size_t=0
10763 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010764esac
10765else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010766 cat >conftest.$ac_ext <<_ACEOF
10767/* confdefs.h. */
10768_ACEOF
10769cat confdefs.h >>conftest.$ac_ext
10770cat >>conftest.$ac_ext <<_ACEOF
10771/* end confdefs.h. */
10772$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010773 typedef size_t ac__type_sizeof_;
10774static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10775static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010776#include <stdio.h>
10777#include <stdlib.h>
10778int
10779main ()
10780{
10781
10782 FILE *f = fopen ("conftest.val", "w");
10783 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010784 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010785 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010786 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010790 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010791 }
10792 else
10793 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010794 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010795 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010796 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010797 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010798 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010800
10801 ;
10802 return 0;
10803}
10804_ACEOF
10805rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806if { (ac_try="$ac_link"
10807case "(($ac_try" in
10808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10809 *) ac_try_echo=$ac_try;;
10810esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010812 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816 { (case "(($ac_try" in
10817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10818 *) ac_try_echo=$ac_try;;
10819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010824 (exit $ac_status); }; }; then
10825 ac_cv_sizeof_size_t=`cat conftest.val`
10826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010827 echo "$as_me: program exited with status $ac_status" >&5
10828echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010829sed 's/^/| /' conftest.$ac_ext >&5
10830
10831( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010832if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010834See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010835echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010836See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010837 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010838 else
10839 ac_cv_sizeof_size_t=0
10840 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010842rm -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 +000010843fi
10844rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010846{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10847echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010848
10849
10850
Martin v. Löwis18e16552006-02-15 17:27:45 +000010851cat >>confdefs.h <<_ACEOF
10852#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10853_ACEOF
10854
10855
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010856{ echo "$as_me:$LINENO: checking for pid_t" >&5
10857echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10858if test "${ac_cv_type_pid_t+set}" = set; then
10859 echo $ECHO_N "(cached) $ECHO_C" >&6
10860else
10861 cat >conftest.$ac_ext <<_ACEOF
10862/* confdefs.h. */
10863_ACEOF
10864cat confdefs.h >>conftest.$ac_ext
10865cat >>conftest.$ac_ext <<_ACEOF
10866/* end confdefs.h. */
10867$ac_includes_default
10868typedef pid_t ac__type_new_;
10869int
10870main ()
10871{
10872if ((ac__type_new_ *) 0)
10873 return 0;
10874if (sizeof (ac__type_new_))
10875 return 0;
10876 ;
10877 return 0;
10878}
10879_ACEOF
10880rm -f conftest.$ac_objext
10881if { (ac_try="$ac_compile"
10882case "(($ac_try" in
10883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10884 *) ac_try_echo=$ac_try;;
10885esac
10886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10887 (eval "$ac_compile") 2>conftest.er1
10888 ac_status=$?
10889 grep -v '^ *+' conftest.er1 >conftest.err
10890 rm -f conftest.er1
10891 cat conftest.err >&5
10892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10893 (exit $ac_status); } && {
10894 test -z "$ac_c_werror_flag" ||
10895 test ! -s conftest.err
10896 } && test -s conftest.$ac_objext; then
10897 ac_cv_type_pid_t=yes
10898else
10899 echo "$as_me: failed program was:" >&5
10900sed 's/^/| /' conftest.$ac_ext >&5
10901
10902 ac_cv_type_pid_t=no
10903fi
10904
10905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10906fi
10907{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10908echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10909
Christian Heimes951cc0f2008-01-31 23:08:23 +000010910# The cast to long int works around a bug in the HP C Compiler
10911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10913# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010914{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10915echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010916if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010917 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010918else
10919 if test "$cross_compiling" = yes; then
10920 # Depending upon the size, compute the lo and hi bounds.
10921cat >conftest.$ac_ext <<_ACEOF
10922/* confdefs.h. */
10923_ACEOF
10924cat confdefs.h >>conftest.$ac_ext
10925cat >>conftest.$ac_ext <<_ACEOF
10926/* end confdefs.h. */
10927$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010928 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010929int
10930main ()
10931{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010933test_array [0] = 0
10934
10935 ;
10936 return 0;
10937}
10938_ACEOF
10939rm -f conftest.$ac_objext
10940if { (ac_try="$ac_compile"
10941case "(($ac_try" in
10942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10943 *) ac_try_echo=$ac_try;;
10944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010946 (eval "$ac_compile") 2>conftest.er1
10947 ac_status=$?
10948 grep -v '^ *+' conftest.er1 >conftest.err
10949 rm -f conftest.er1
10950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010952 (exit $ac_status); } && {
10953 test -z "$ac_c_werror_flag" ||
10954 test ! -s conftest.err
10955 } && test -s conftest.$ac_objext; then
10956 ac_lo=0 ac_mid=0
10957 while :; do
10958 cat >conftest.$ac_ext <<_ACEOF
10959/* confdefs.h. */
10960_ACEOF
10961cat confdefs.h >>conftest.$ac_ext
10962cat >>conftest.$ac_ext <<_ACEOF
10963/* end confdefs.h. */
10964$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010965 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010966int
10967main ()
10968{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010970test_array [0] = 0
10971
10972 ;
10973 return 0;
10974}
10975_ACEOF
10976rm -f conftest.$ac_objext
10977if { (ac_try="$ac_compile"
10978case "(($ac_try" in
10979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10980 *) ac_try_echo=$ac_try;;
10981esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010983 (eval "$ac_compile") 2>conftest.er1
10984 ac_status=$?
10985 grep -v '^ *+' conftest.er1 >conftest.err
10986 rm -f conftest.er1
10987 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010989 (exit $ac_status); } && {
10990 test -z "$ac_c_werror_flag" ||
10991 test ! -s conftest.err
10992 } && test -s conftest.$ac_objext; then
10993 ac_hi=$ac_mid; break
10994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010995 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010996sed 's/^/| /' conftest.$ac_ext >&5
10997
10998 ac_lo=`expr $ac_mid + 1`
10999 if test $ac_lo -le $ac_mid; then
11000 ac_lo= ac_hi=
11001 break
11002 fi
11003 ac_mid=`expr 2 '*' $ac_mid + 1`
11004fi
11005
11006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11007 done
11008else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011009 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011010sed 's/^/| /' conftest.$ac_ext >&5
11011
11012 cat >conftest.$ac_ext <<_ACEOF
11013/* confdefs.h. */
11014_ACEOF
11015cat confdefs.h >>conftest.$ac_ext
11016cat >>conftest.$ac_ext <<_ACEOF
11017/* end confdefs.h. */
11018$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011019 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011020int
11021main ()
11022{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011024test_array [0] = 0
11025
11026 ;
11027 return 0;
11028}
11029_ACEOF
11030rm -f conftest.$ac_objext
11031if { (ac_try="$ac_compile"
11032case "(($ac_try" in
11033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11034 *) ac_try_echo=$ac_try;;
11035esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011037 (eval "$ac_compile") 2>conftest.er1
11038 ac_status=$?
11039 grep -v '^ *+' conftest.er1 >conftest.err
11040 rm -f conftest.er1
11041 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011043 (exit $ac_status); } && {
11044 test -z "$ac_c_werror_flag" ||
11045 test ! -s conftest.err
11046 } && test -s conftest.$ac_objext; then
11047 ac_hi=-1 ac_mid=-1
11048 while :; do
11049 cat >conftest.$ac_ext <<_ACEOF
11050/* confdefs.h. */
11051_ACEOF
11052cat confdefs.h >>conftest.$ac_ext
11053cat >>conftest.$ac_ext <<_ACEOF
11054/* end confdefs.h. */
11055$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011056 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011057int
11058main ()
11059{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011061test_array [0] = 0
11062
11063 ;
11064 return 0;
11065}
11066_ACEOF
11067rm -f conftest.$ac_objext
11068if { (ac_try="$ac_compile"
11069case "(($ac_try" in
11070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11071 *) ac_try_echo=$ac_try;;
11072esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011074 (eval "$ac_compile") 2>conftest.er1
11075 ac_status=$?
11076 grep -v '^ *+' conftest.er1 >conftest.err
11077 rm -f conftest.er1
11078 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011080 (exit $ac_status); } && {
11081 test -z "$ac_c_werror_flag" ||
11082 test ! -s conftest.err
11083 } && test -s conftest.$ac_objext; then
11084 ac_lo=$ac_mid; break
11085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011086 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011087sed 's/^/| /' conftest.$ac_ext >&5
11088
11089 ac_hi=`expr '(' $ac_mid ')' - 1`
11090 if test $ac_mid -le $ac_hi; then
11091 ac_lo= ac_hi=
11092 break
11093 fi
11094 ac_mid=`expr 2 '*' $ac_mid`
11095fi
11096
11097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11098 done
11099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011100 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011101sed 's/^/| /' conftest.$ac_ext >&5
11102
11103 ac_lo= ac_hi=
11104fi
11105
11106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11107fi
11108
11109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11110# Binary search between lo and hi bounds.
11111while test "x$ac_lo" != "x$ac_hi"; do
11112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11113 cat >conftest.$ac_ext <<_ACEOF
11114/* confdefs.h. */
11115_ACEOF
11116cat confdefs.h >>conftest.$ac_ext
11117cat >>conftest.$ac_ext <<_ACEOF
11118/* end confdefs.h. */
11119$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011120 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011121int
11122main ()
11123{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011125test_array [0] = 0
11126
11127 ;
11128 return 0;
11129}
11130_ACEOF
11131rm -f conftest.$ac_objext
11132if { (ac_try="$ac_compile"
11133case "(($ac_try" in
11134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11135 *) ac_try_echo=$ac_try;;
11136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011138 (eval "$ac_compile") 2>conftest.er1
11139 ac_status=$?
11140 grep -v '^ *+' conftest.er1 >conftest.err
11141 rm -f conftest.er1
11142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011144 (exit $ac_status); } && {
11145 test -z "$ac_c_werror_flag" ||
11146 test ! -s conftest.err
11147 } && test -s conftest.$ac_objext; then
11148 ac_hi=$ac_mid
11149else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011150 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011151sed 's/^/| /' conftest.$ac_ext >&5
11152
11153 ac_lo=`expr '(' $ac_mid ')' + 1`
11154fi
11155
11156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11157done
11158case $ac_lo in
11159?*) ac_cv_sizeof_pid_t=$ac_lo;;
11160'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011162See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011163echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011164See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011165 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011166 else
11167 ac_cv_sizeof_pid_t=0
11168 fi ;;
11169esac
11170else
11171 cat >conftest.$ac_ext <<_ACEOF
11172/* confdefs.h. */
11173_ACEOF
11174cat confdefs.h >>conftest.$ac_ext
11175cat >>conftest.$ac_ext <<_ACEOF
11176/* end confdefs.h. */
11177$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011178 typedef pid_t ac__type_sizeof_;
11179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011181#include <stdio.h>
11182#include <stdlib.h>
11183int
11184main ()
11185{
11186
11187 FILE *f = fopen ("conftest.val", "w");
11188 if (! f)
11189 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011191 {
11192 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011194 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011195 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011196 }
11197 else
11198 {
11199 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011201 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011202 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011203 }
11204 return ferror (f) || fclose (f) != 0;
11205
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210rm -f conftest$ac_exeext
11211if { (ac_try="$ac_link"
11212case "(($ac_try" in
11213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11214 *) ac_try_echo=$ac_try;;
11215esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011217 (eval "$ac_link") 2>&5
11218 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11221 { (case "(($ac_try" in
11222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11223 *) ac_try_echo=$ac_try;;
11224esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011226 (eval "$ac_try") 2>&5
11227 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011229 (exit $ac_status); }; }; then
11230 ac_cv_sizeof_pid_t=`cat conftest.val`
11231else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011232 echo "$as_me: program exited with status $ac_status" >&5
11233echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011234sed 's/^/| /' conftest.$ac_ext >&5
11235
11236( exit $ac_status )
11237if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011239See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011240echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011241See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011242 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011243 else
11244 ac_cv_sizeof_pid_t=0
11245 fi
11246fi
11247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11248fi
11249rm -f conftest.val
11250fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11252echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011253
11254
11255
11256cat >>confdefs.h <<_ACEOF
11257#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11258_ACEOF
11259
11260
Michael W. Hudson54241132001-12-07 15:38:26 +000011261
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011262{ echo "$as_me:$LINENO: checking for long long support" >&5
11263echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011264have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011266/* confdefs.h. */
11267_ACEOF
11268cat confdefs.h >>conftest.$ac_ext
11269cat >>conftest.$ac_ext <<_ACEOF
11270/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011271
Martin v. Löwis11437992002-04-12 09:54:03 +000011272int
11273main ()
11274{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011275long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 ;
11277 return 0;
11278}
11279_ACEOF
11280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011281if { (ac_try="$ac_compile"
11282case "(($ac_try" in
11283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11284 *) ac_try_echo=$ac_try;;
11285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011289 grep -v '^ *+' conftest.er1 >conftest.err
11290 rm -f conftest.er1
11291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011293 (exit $ac_status); } && {
11294 test -z "$ac_c_werror_flag" ||
11295 test ! -s conftest.err
11296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011297
11298
11299cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011300#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
11302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011303 have_long_long=yes
11304
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011305else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011307sed 's/^/| /' conftest.$ac_ext >&5
11308
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311
11312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011313{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11314echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011315if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011316{ echo "$as_me:$LINENO: checking for long long" >&5
11317echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11318if test "${ac_cv_type_long_long+set}" = set; then
11319 echo $ECHO_N "(cached) $ECHO_C" >&6
11320else
11321 cat >conftest.$ac_ext <<_ACEOF
11322/* confdefs.h. */
11323_ACEOF
11324cat confdefs.h >>conftest.$ac_ext
11325cat >>conftest.$ac_ext <<_ACEOF
11326/* end confdefs.h. */
11327$ac_includes_default
11328typedef long long ac__type_new_;
11329int
11330main ()
11331{
11332if ((ac__type_new_ *) 0)
11333 return 0;
11334if (sizeof (ac__type_new_))
11335 return 0;
11336 ;
11337 return 0;
11338}
11339_ACEOF
11340rm -f conftest.$ac_objext
11341if { (ac_try="$ac_compile"
11342case "(($ac_try" in
11343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11344 *) ac_try_echo=$ac_try;;
11345esac
11346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11347 (eval "$ac_compile") 2>conftest.er1
11348 ac_status=$?
11349 grep -v '^ *+' conftest.er1 >conftest.err
11350 rm -f conftest.er1
11351 cat conftest.err >&5
11352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11353 (exit $ac_status); } && {
11354 test -z "$ac_c_werror_flag" ||
11355 test ! -s conftest.err
11356 } && test -s conftest.$ac_objext; then
11357 ac_cv_type_long_long=yes
11358else
11359 echo "$as_me: failed program was:" >&5
11360sed 's/^/| /' conftest.$ac_ext >&5
11361
11362 ac_cv_type_long_long=no
11363fi
11364
11365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11366fi
11367{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11368echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11369
Martin v. Löwiseba40652007-08-30 20:10:57 +000011370# The cast to long int works around a bug in the HP C Compiler
11371# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11372# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11373# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011374{ echo "$as_me:$LINENO: checking size of long long" >&5
11375echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011376if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011378else
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 if test "$cross_compiling" = yes; then
11380 # Depending upon the size, compute the lo and hi bounds.
11381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* confdefs.h. */
11383_ACEOF
11384cat confdefs.h >>conftest.$ac_ext
11385cat >>conftest.$ac_ext <<_ACEOF
11386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011387$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011388 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011389int
11390main ()
11391{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011392static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011393test_array [0] = 0
11394
11395 ;
11396 return 0;
11397}
11398_ACEOF
11399rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400if { (ac_try="$ac_compile"
11401case "(($ac_try" in
11402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11403 *) ac_try_echo=$ac_try;;
11404esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011408 grep -v '^ *+' conftest.er1 >conftest.err
11409 rm -f conftest.er1
11410 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011412 (exit $ac_status); } && {
11413 test -z "$ac_c_werror_flag" ||
11414 test ! -s conftest.err
11415 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 ac_lo=0 ac_mid=0
11417 while :; do
11418 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* confdefs.h. */
11420_ACEOF
11421cat confdefs.h >>conftest.$ac_ext
11422cat >>conftest.$ac_ext <<_ACEOF
11423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011424$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011425 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011429static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011430test_array [0] = 0
11431
11432 ;
11433 return 0;
11434}
11435_ACEOF
11436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437if { (ac_try="$ac_compile"
11438case "(($ac_try" in
11439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11440 *) ac_try_echo=$ac_try;;
11441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011445 grep -v '^ *+' conftest.er1 >conftest.err
11446 rm -f conftest.er1
11447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449 (exit $ac_status); } && {
11450 test -z "$ac_c_werror_flag" ||
11451 test ! -s conftest.err
11452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ac_hi=$ac_mid; break
11454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011456sed 's/^/| /' conftest.$ac_ext >&5
11457
Martin v. Löwiseba40652007-08-30 20:10:57 +000011458 ac_lo=`expr $ac_mid + 1`
11459 if test $ac_lo -le $ac_mid; then
11460 ac_lo= ac_hi=
11461 break
11462 fi
11463 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011465
11466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 done
11468else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011470sed 's/^/| /' conftest.$ac_ext >&5
11471
Martin v. Löwiseba40652007-08-30 20:10:57 +000011472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* confdefs.h. */
11474_ACEOF
11475cat confdefs.h >>conftest.$ac_ext
11476cat >>conftest.$ac_ext <<_ACEOF
11477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011478$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011479 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
11482{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011483static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011484test_array [0] = 0
11485
11486 ;
11487 return 0;
11488}
11489_ACEOF
11490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011491if { (ac_try="$ac_compile"
11492case "(($ac_try" in
11493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11494 *) ac_try_echo=$ac_try;;
11495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011499 grep -v '^ *+' conftest.er1 >conftest.err
11500 rm -f conftest.er1
11501 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011503 (exit $ac_status); } && {
11504 test -z "$ac_c_werror_flag" ||
11505 test ! -s conftest.err
11506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_hi=-1 ac_mid=-1
11508 while :; do
11509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011510/* confdefs.h. */
11511_ACEOF
11512cat confdefs.h >>conftest.$ac_ext
11513cat >>conftest.$ac_ext <<_ACEOF
11514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011515$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011516 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011517int
11518main ()
11519{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011521test_array [0] = 0
11522
11523 ;
11524 return 0;
11525}
11526_ACEOF
11527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011528if { (ac_try="$ac_compile"
11529case "(($ac_try" in
11530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11531 *) ac_try_echo=$ac_try;;
11532esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011536 grep -v '^ *+' conftest.er1 >conftest.err
11537 rm -f conftest.er1
11538 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540 (exit $ac_status); } && {
11541 test -z "$ac_c_werror_flag" ||
11542 test ! -s conftest.err
11543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 ac_lo=$ac_mid; break
11545else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011547sed 's/^/| /' conftest.$ac_ext >&5
11548
Martin v. Löwiseba40652007-08-30 20:10:57 +000011549 ac_hi=`expr '(' $ac_mid ')' - 1`
11550 if test $ac_mid -le $ac_hi; then
11551 ac_lo= ac_hi=
11552 break
11553 fi
11554 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556
11557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011558 done
11559else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011561sed 's/^/| /' conftest.$ac_ext >&5
11562
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565
11566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568
11569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011570# Binary search between lo and hi bounds.
11571while test "x$ac_lo" != "x$ac_hi"; do
11572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* confdefs.h. */
11575_ACEOF
11576cat confdefs.h >>conftest.$ac_ext
11577cat >>conftest.$ac_ext <<_ACEOF
11578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011579$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011580 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011581int
11582main ()
11583{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011584static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011585test_array [0] = 0
11586
11587 ;
11588 return 0;
11589}
11590_ACEOF
11591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011592if { (ac_try="$ac_compile"
11593case "(($ac_try" in
11594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11595 *) ac_try_echo=$ac_try;;
11596esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011600 grep -v '^ *+' conftest.er1 >conftest.err
11601 rm -f conftest.er1
11602 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604 (exit $ac_status); } && {
11605 test -z "$ac_c_werror_flag" ||
11606 test ! -s conftest.err
11607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011608 ac_hi=$ac_mid
11609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011611sed 's/^/| /' conftest.$ac_ext >&5
11612
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615
11616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011617done
11618case $ac_lo in
11619?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011620'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011621 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011622See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011623echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011624See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011625 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626 else
11627 ac_cv_sizeof_long_long=0
11628 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011629esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630else
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* confdefs.h. */
11633_ACEOF
11634cat confdefs.h >>conftest.$ac_ext
11635cat >>conftest.$ac_ext <<_ACEOF
11636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011637$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011638 typedef long long ac__type_sizeof_;
11639static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11640static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011641#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011642#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011643int
11644main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011645{
Martin v. Löwis11437992002-04-12 09:54:03 +000011646
11647 FILE *f = fopen ("conftest.val", "w");
11648 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011649 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011650 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011653 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011654 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011655 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 }
11657 else
11658 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011659 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011660 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011661 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011662 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011664 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011665
11666 ;
11667 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011668}
Martin v. Löwis11437992002-04-12 09:54:03 +000011669_ACEOF
11670rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671if { (ac_try="$ac_link"
11672case "(($ac_try" in
11673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11674 *) ac_try_echo=$ac_try;;
11675esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011677 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011681 { (case "(($ac_try" in
11682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11683 *) ac_try_echo=$ac_try;;
11684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 (exit $ac_status); }; }; then
11690 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011692 echo "$as_me: program exited with status $ac_status" >&5
11693echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011694sed 's/^/| /' conftest.$ac_ext >&5
11695
Martin v. Löwis11437992002-04-12 09:54:03 +000011696( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011697if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011698 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011699See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011700echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011701See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011702 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703 else
11704 ac_cv_sizeof_long_long=0
11705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011707rm -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 +000011708fi
11709rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011710fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011711{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11712echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713
11714
11715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011717#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011718_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011719
Michael W. Hudson54241132001-12-07 15:38:26 +000011720
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011721fi
11722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011723{ echo "$as_me:$LINENO: checking for long double support" >&5
11724echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011725have_long_double=no
11726cat >conftest.$ac_ext <<_ACEOF
11727/* confdefs.h. */
11728_ACEOF
11729cat confdefs.h >>conftest.$ac_ext
11730cat >>conftest.$ac_ext <<_ACEOF
11731/* end confdefs.h. */
11732
11733int
11734main ()
11735{
11736long double x; x = (long double)0.;
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (ac_try="$ac_compile"
11743case "(($ac_try" in
11744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11745 *) ac_try_echo=$ac_try;;
11746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011748 (eval "$ac_compile") 2>conftest.er1
11749 ac_status=$?
11750 grep -v '^ *+' conftest.er1 >conftest.err
11751 rm -f conftest.er1
11752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011754 (exit $ac_status); } && {
11755 test -z "$ac_c_werror_flag" ||
11756 test ! -s conftest.err
11757 } && test -s conftest.$ac_objext; then
11758
11759
11760cat >>confdefs.h <<\_ACEOF
11761#define HAVE_LONG_DOUBLE 1
11762_ACEOF
11763
11764 have_long_double=yes
11765
11766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011767 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011768sed 's/^/| /' conftest.$ac_ext >&5
11769
11770
11771fi
11772
11773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011774{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11775echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011776if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011777{ echo "$as_me:$LINENO: checking for long double" >&5
11778echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11779if test "${ac_cv_type_long_double+set}" = set; then
11780 echo $ECHO_N "(cached) $ECHO_C" >&6
11781else
11782 cat >conftest.$ac_ext <<_ACEOF
11783/* confdefs.h. */
11784_ACEOF
11785cat confdefs.h >>conftest.$ac_ext
11786cat >>conftest.$ac_ext <<_ACEOF
11787/* end confdefs.h. */
11788$ac_includes_default
11789typedef long double ac__type_new_;
11790int
11791main ()
11792{
11793if ((ac__type_new_ *) 0)
11794 return 0;
11795if (sizeof (ac__type_new_))
11796 return 0;
11797 ;
11798 return 0;
11799}
11800_ACEOF
11801rm -f conftest.$ac_objext
11802if { (ac_try="$ac_compile"
11803case "(($ac_try" in
11804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11805 *) ac_try_echo=$ac_try;;
11806esac
11807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11808 (eval "$ac_compile") 2>conftest.er1
11809 ac_status=$?
11810 grep -v '^ *+' conftest.er1 >conftest.err
11811 rm -f conftest.er1
11812 cat conftest.err >&5
11813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11814 (exit $ac_status); } && {
11815 test -z "$ac_c_werror_flag" ||
11816 test ! -s conftest.err
11817 } && test -s conftest.$ac_objext; then
11818 ac_cv_type_long_double=yes
11819else
11820 echo "$as_me: failed program was:" >&5
11821sed 's/^/| /' conftest.$ac_ext >&5
11822
11823 ac_cv_type_long_double=no
11824fi
11825
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827fi
11828{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11829echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11830
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011831# The cast to long int works around a bug in the HP C Compiler
11832# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11833# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11834# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011835{ echo "$as_me:$LINENO: checking size of long double" >&5
11836echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011837if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011838 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011839else
11840 if test "$cross_compiling" = yes; then
11841 # Depending upon the size, compute the lo and hi bounds.
11842cat >conftest.$ac_ext <<_ACEOF
11843/* confdefs.h. */
11844_ACEOF
11845cat confdefs.h >>conftest.$ac_ext
11846cat >>conftest.$ac_ext <<_ACEOF
11847/* end confdefs.h. */
11848$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011849 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011850int
11851main ()
11852{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011853static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011854test_array [0] = 0
11855
11856 ;
11857 return 0;
11858}
11859_ACEOF
11860rm -f conftest.$ac_objext
11861if { (ac_try="$ac_compile"
11862case "(($ac_try" in
11863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11864 *) ac_try_echo=$ac_try;;
11865esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011867 (eval "$ac_compile") 2>conftest.er1
11868 ac_status=$?
11869 grep -v '^ *+' conftest.er1 >conftest.err
11870 rm -f conftest.er1
11871 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011873 (exit $ac_status); } && {
11874 test -z "$ac_c_werror_flag" ||
11875 test ! -s conftest.err
11876 } && test -s conftest.$ac_objext; then
11877 ac_lo=0 ac_mid=0
11878 while :; do
11879 cat >conftest.$ac_ext <<_ACEOF
11880/* confdefs.h. */
11881_ACEOF
11882cat confdefs.h >>conftest.$ac_ext
11883cat >>conftest.$ac_ext <<_ACEOF
11884/* end confdefs.h. */
11885$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011886 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011887int
11888main ()
11889{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011890static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011891test_array [0] = 0
11892
11893 ;
11894 return 0;
11895}
11896_ACEOF
11897rm -f conftest.$ac_objext
11898if { (ac_try="$ac_compile"
11899case "(($ac_try" in
11900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11901 *) ac_try_echo=$ac_try;;
11902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011904 (eval "$ac_compile") 2>conftest.er1
11905 ac_status=$?
11906 grep -v '^ *+' conftest.er1 >conftest.err
11907 rm -f conftest.er1
11908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011910 (exit $ac_status); } && {
11911 test -z "$ac_c_werror_flag" ||
11912 test ! -s conftest.err
11913 } && test -s conftest.$ac_objext; then
11914 ac_hi=$ac_mid; break
11915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011916 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011917sed 's/^/| /' conftest.$ac_ext >&5
11918
11919 ac_lo=`expr $ac_mid + 1`
11920 if test $ac_lo -le $ac_mid; then
11921 ac_lo= ac_hi=
11922 break
11923 fi
11924 ac_mid=`expr 2 '*' $ac_mid + 1`
11925fi
11926
11927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928 done
11929else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011930 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011931sed 's/^/| /' conftest.$ac_ext >&5
11932
11933 cat >conftest.$ac_ext <<_ACEOF
11934/* confdefs.h. */
11935_ACEOF
11936cat confdefs.h >>conftest.$ac_ext
11937cat >>conftest.$ac_ext <<_ACEOF
11938/* end confdefs.h. */
11939$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011940 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011941int
11942main ()
11943{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011944static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011945test_array [0] = 0
11946
11947 ;
11948 return 0;
11949}
11950_ACEOF
11951rm -f conftest.$ac_objext
11952if { (ac_try="$ac_compile"
11953case "(($ac_try" in
11954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11955 *) ac_try_echo=$ac_try;;
11956esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011958 (eval "$ac_compile") 2>conftest.er1
11959 ac_status=$?
11960 grep -v '^ *+' conftest.er1 >conftest.err
11961 rm -f conftest.er1
11962 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011964 (exit $ac_status); } && {
11965 test -z "$ac_c_werror_flag" ||
11966 test ! -s conftest.err
11967 } && test -s conftest.$ac_objext; then
11968 ac_hi=-1 ac_mid=-1
11969 while :; do
11970 cat >conftest.$ac_ext <<_ACEOF
11971/* confdefs.h. */
11972_ACEOF
11973cat confdefs.h >>conftest.$ac_ext
11974cat >>conftest.$ac_ext <<_ACEOF
11975/* end confdefs.h. */
11976$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011977 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011978int
11979main ()
11980{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011981static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011982test_array [0] = 0
11983
11984 ;
11985 return 0;
11986}
11987_ACEOF
11988rm -f conftest.$ac_objext
11989if { (ac_try="$ac_compile"
11990case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011995 (eval "$ac_compile") 2>conftest.er1
11996 ac_status=$?
11997 grep -v '^ *+' conftest.er1 >conftest.err
11998 rm -f conftest.er1
11999 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012001 (exit $ac_status); } && {
12002 test -z "$ac_c_werror_flag" ||
12003 test ! -s conftest.err
12004 } && test -s conftest.$ac_objext; then
12005 ac_lo=$ac_mid; break
12006else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012007 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012008sed 's/^/| /' conftest.$ac_ext >&5
12009
12010 ac_hi=`expr '(' $ac_mid ')' - 1`
12011 if test $ac_mid -le $ac_hi; then
12012 ac_lo= ac_hi=
12013 break
12014 fi
12015 ac_mid=`expr 2 '*' $ac_mid`
12016fi
12017
12018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019 done
12020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012021 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012022sed 's/^/| /' conftest.$ac_ext >&5
12023
12024 ac_lo= ac_hi=
12025fi
12026
12027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12028fi
12029
12030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12031# Binary search between lo and hi bounds.
12032while test "x$ac_lo" != "x$ac_hi"; do
12033 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12034 cat >conftest.$ac_ext <<_ACEOF
12035/* confdefs.h. */
12036_ACEOF
12037cat confdefs.h >>conftest.$ac_ext
12038cat >>conftest.$ac_ext <<_ACEOF
12039/* end confdefs.h. */
12040$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012041 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012042int
12043main ()
12044{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012046test_array [0] = 0
12047
12048 ;
12049 return 0;
12050}
12051_ACEOF
12052rm -f conftest.$ac_objext
12053if { (ac_try="$ac_compile"
12054case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012059 (eval "$ac_compile") 2>conftest.er1
12060 ac_status=$?
12061 grep -v '^ *+' conftest.er1 >conftest.err
12062 rm -f conftest.er1
12063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012065 (exit $ac_status); } && {
12066 test -z "$ac_c_werror_flag" ||
12067 test ! -s conftest.err
12068 } && test -s conftest.$ac_objext; then
12069 ac_hi=$ac_mid
12070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012071 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012072sed 's/^/| /' conftest.$ac_ext >&5
12073
12074 ac_lo=`expr '(' $ac_mid ')' + 1`
12075fi
12076
12077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078done
12079case $ac_lo in
12080?*) ac_cv_sizeof_long_double=$ac_lo;;
12081'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012082 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012083See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012084echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012085See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012086 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012087 else
12088 ac_cv_sizeof_long_double=0
12089 fi ;;
12090esac
12091else
12092 cat >conftest.$ac_ext <<_ACEOF
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
12098$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012099 typedef long double ac__type_sizeof_;
12100static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12101static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012102#include <stdio.h>
12103#include <stdlib.h>
12104int
12105main ()
12106{
12107
12108 FILE *f = fopen ("conftest.val", "w");
12109 if (! f)
12110 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012111 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012112 {
12113 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012114 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012115 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012116 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012117 }
12118 else
12119 {
12120 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012121 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012122 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012123 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012124 }
12125 return ferror (f) || fclose (f) != 0;
12126
12127 ;
12128 return 0;
12129}
12130_ACEOF
12131rm -f conftest$ac_exeext
12132if { (ac_try="$ac_link"
12133case "(($ac_try" in
12134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12135 *) ac_try_echo=$ac_try;;
12136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012138 (eval "$ac_link") 2>&5
12139 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12142 { (case "(($ac_try" in
12143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12144 *) ac_try_echo=$ac_try;;
12145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012147 (eval "$ac_try") 2>&5
12148 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012150 (exit $ac_status); }; }; then
12151 ac_cv_sizeof_long_double=`cat conftest.val`
12152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012153 echo "$as_me: program exited with status $ac_status" >&5
12154echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012155sed 's/^/| /' conftest.$ac_ext >&5
12156
12157( exit $ac_status )
12158if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012159 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012160See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012161echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012162See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012163 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012164 else
12165 ac_cv_sizeof_long_double=0
12166 fi
12167fi
12168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12169fi
12170rm -f conftest.val
12171fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012172{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12173echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012174
12175
12176
12177cat >>confdefs.h <<_ACEOF
12178#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12179_ACEOF
12180
12181
12182fi
12183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012184{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12185echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012186have_c99_bool=no
12187cat >conftest.$ac_ext <<_ACEOF
12188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
12193
12194int
12195main ()
12196{
12197_Bool x; x = (_Bool)0;
12198 ;
12199 return 0;
12200}
12201_ACEOF
12202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203if { (ac_try="$ac_compile"
12204case "(($ac_try" in
12205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12206 *) ac_try_echo=$ac_try;;
12207esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012210 ac_status=$?
12211 grep -v '^ *+' conftest.er1 >conftest.err
12212 rm -f conftest.er1
12213 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012215 (exit $ac_status); } && {
12216 test -z "$ac_c_werror_flag" ||
12217 test ! -s conftest.err
12218 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012219
12220
12221cat >>confdefs.h <<\_ACEOF
12222#define HAVE_C99_BOOL 1
12223_ACEOF
12224
12225 have_c99_bool=yes
12226
12227else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012228 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012229sed 's/^/| /' conftest.$ac_ext >&5
12230
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233
12234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012235{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12236echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012237if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012238{ echo "$as_me:$LINENO: checking for _Bool" >&5
12239echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12240if test "${ac_cv_type__Bool+set}" = set; then
12241 echo $ECHO_N "(cached) $ECHO_C" >&6
12242else
12243 cat >conftest.$ac_ext <<_ACEOF
12244/* confdefs.h. */
12245_ACEOF
12246cat confdefs.h >>conftest.$ac_ext
12247cat >>conftest.$ac_ext <<_ACEOF
12248/* end confdefs.h. */
12249$ac_includes_default
12250typedef _Bool ac__type_new_;
12251int
12252main ()
12253{
12254if ((ac__type_new_ *) 0)
12255 return 0;
12256if (sizeof (ac__type_new_))
12257 return 0;
12258 ;
12259 return 0;
12260}
12261_ACEOF
12262rm -f conftest.$ac_objext
12263if { (ac_try="$ac_compile"
12264case "(($ac_try" in
12265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12266 *) ac_try_echo=$ac_try;;
12267esac
12268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12269 (eval "$ac_compile") 2>conftest.er1
12270 ac_status=$?
12271 grep -v '^ *+' conftest.er1 >conftest.err
12272 rm -f conftest.er1
12273 cat conftest.err >&5
12274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12275 (exit $ac_status); } && {
12276 test -z "$ac_c_werror_flag" ||
12277 test ! -s conftest.err
12278 } && test -s conftest.$ac_objext; then
12279 ac_cv_type__Bool=yes
12280else
12281 echo "$as_me: failed program was:" >&5
12282sed 's/^/| /' conftest.$ac_ext >&5
12283
12284 ac_cv_type__Bool=no
12285fi
12286
12287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12288fi
12289{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12290echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12291
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292# The cast to long int works around a bug in the HP C Compiler
12293# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12294# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12295# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012296{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12297echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012298if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012299 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012300else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012301 if test "$cross_compiling" = yes; then
12302 # Depending upon the size, compute the lo and hi bounds.
12303cat >conftest.$ac_ext <<_ACEOF
12304/* confdefs.h. */
12305_ACEOF
12306cat confdefs.h >>conftest.$ac_ext
12307cat >>conftest.$ac_ext <<_ACEOF
12308/* end confdefs.h. */
12309$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012310 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012311int
12312main ()
12313{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012315test_array [0] = 0
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322if { (ac_try="$ac_compile"
12323case "(($ac_try" in
12324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12325 *) ac_try_echo=$ac_try;;
12326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012329 ac_status=$?
12330 grep -v '^ *+' conftest.er1 >conftest.err
12331 rm -f conftest.er1
12332 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012334 (exit $ac_status); } && {
12335 test -z "$ac_c_werror_flag" ||
12336 test ! -s conftest.err
12337 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012338 ac_lo=0 ac_mid=0
12339 while :; do
12340 cat >conftest.$ac_ext <<_ACEOF
12341/* confdefs.h. */
12342_ACEOF
12343cat confdefs.h >>conftest.$ac_ext
12344cat >>conftest.$ac_ext <<_ACEOF
12345/* end confdefs.h. */
12346$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012347 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012348int
12349main ()
12350{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012352test_array [0] = 0
12353
12354 ;
12355 return 0;
12356}
12357_ACEOF
12358rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359if { (ac_try="$ac_compile"
12360case "(($ac_try" in
12361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12362 *) ac_try_echo=$ac_try;;
12363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012365 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366 ac_status=$?
12367 grep -v '^ *+' conftest.er1 >conftest.err
12368 rm -f conftest.er1
12369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012371 (exit $ac_status); } && {
12372 test -z "$ac_c_werror_flag" ||
12373 test ! -s conftest.err
12374 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012375 ac_hi=$ac_mid; break
12376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012377 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012378sed 's/^/| /' conftest.$ac_ext >&5
12379
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380 ac_lo=`expr $ac_mid + 1`
12381 if test $ac_lo -le $ac_mid; then
12382 ac_lo= ac_hi=
12383 break
12384 fi
12385 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012387
12388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389 done
12390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012391 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392sed 's/^/| /' conftest.$ac_ext >&5
12393
Martin v. Löwiseba40652007-08-30 20:10:57 +000012394 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
12400$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012401 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012402int
12403main ()
12404{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012406test_array [0] = 0
12407
12408 ;
12409 return 0;
12410}
12411_ACEOF
12412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012413if { (ac_try="$ac_compile"
12414case "(($ac_try" in
12415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12416 *) ac_try_echo=$ac_try;;
12417esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012420 ac_status=$?
12421 grep -v '^ *+' conftest.er1 >conftest.err
12422 rm -f conftest.er1
12423 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425 (exit $ac_status); } && {
12426 test -z "$ac_c_werror_flag" ||
12427 test ! -s conftest.err
12428 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012429 ac_hi=-1 ac_mid=-1
12430 while :; do
12431 cat >conftest.$ac_ext <<_ACEOF
12432/* confdefs.h. */
12433_ACEOF
12434cat confdefs.h >>conftest.$ac_ext
12435cat >>conftest.$ac_ext <<_ACEOF
12436/* end confdefs.h. */
12437$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012438 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012439int
12440main ()
12441{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443test_array [0] = 0
12444
12445 ;
12446 return 0;
12447}
12448_ACEOF
12449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450if { (ac_try="$ac_compile"
12451case "(($ac_try" in
12452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12453 *) ac_try_echo=$ac_try;;
12454esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012457 ac_status=$?
12458 grep -v '^ *+' conftest.er1 >conftest.err
12459 rm -f conftest.er1
12460 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012462 (exit $ac_status); } && {
12463 test -z "$ac_c_werror_flag" ||
12464 test ! -s conftest.err
12465 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012466 ac_lo=$ac_mid; break
12467else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012468 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012469sed 's/^/| /' conftest.$ac_ext >&5
12470
Martin v. Löwiseba40652007-08-30 20:10:57 +000012471 ac_hi=`expr '(' $ac_mid ')' - 1`
12472 if test $ac_mid -le $ac_hi; then
12473 ac_lo= ac_hi=
12474 break
12475 fi
12476 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012478
12479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012480 done
12481else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012482 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012483sed 's/^/| /' conftest.$ac_ext >&5
12484
Martin v. Löwiseba40652007-08-30 20:10:57 +000012485 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012487
12488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012490
12491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012492# Binary search between lo and hi bounds.
12493while test "x$ac_lo" != "x$ac_hi"; do
12494 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12495 cat >conftest.$ac_ext <<_ACEOF
12496/* confdefs.h. */
12497_ACEOF
12498cat confdefs.h >>conftest.$ac_ext
12499cat >>conftest.$ac_ext <<_ACEOF
12500/* end confdefs.h. */
12501$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012502 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012503int
12504main ()
12505{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012507test_array [0] = 0
12508
12509 ;
12510 return 0;
12511}
12512_ACEOF
12513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514if { (ac_try="$ac_compile"
12515case "(($ac_try" in
12516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12517 *) ac_try_echo=$ac_try;;
12518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012521 ac_status=$?
12522 grep -v '^ *+' conftest.er1 >conftest.err
12523 rm -f conftest.er1
12524 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526 (exit $ac_status); } && {
12527 test -z "$ac_c_werror_flag" ||
12528 test ! -s conftest.err
12529 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012530 ac_hi=$ac_mid
12531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012532 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012533sed 's/^/| /' conftest.$ac_ext >&5
12534
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537
12538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012539done
12540case $ac_lo in
12541?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012543 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012544See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012546See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012547 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548 else
12549 ac_cv_sizeof__Bool=0
12550 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012551esac
12552else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012553 cat >conftest.$ac_ext <<_ACEOF
12554/* confdefs.h. */
12555_ACEOF
12556cat confdefs.h >>conftest.$ac_ext
12557cat >>conftest.$ac_ext <<_ACEOF
12558/* end confdefs.h. */
12559$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012560 typedef _Bool ac__type_sizeof_;
12561static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12562static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012563#include <stdio.h>
12564#include <stdlib.h>
12565int
12566main ()
12567{
12568
12569 FILE *f = fopen ("conftest.val", "w");
12570 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012571 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012572 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012573 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012574 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012577 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012578 }
12579 else
12580 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012581 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012582 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012584 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012585 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012587
12588 ;
12589 return 0;
12590}
12591_ACEOF
12592rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593if { (ac_try="$ac_link"
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_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012600 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603 { (case "(($ac_try" in
12604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12605 *) ac_try_echo=$ac_try;;
12606esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012609 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012611 (exit $ac_status); }; }; then
12612 ac_cv_sizeof__Bool=`cat conftest.val`
12613else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012614 echo "$as_me: program exited with status $ac_status" >&5
12615echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012616sed 's/^/| /' conftest.$ac_ext >&5
12617
12618( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012619if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012620 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012621See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012622echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012623See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012624 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012625 else
12626 ac_cv_sizeof__Bool=0
12627 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012629rm -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 +000012630fi
12631rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012633{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12634echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012635
12636
12637
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012638cat >>confdefs.h <<_ACEOF
12639#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12640_ACEOF
12641
12642
12643fi
12644
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012645{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12646echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012647if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012648 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012649else
12650 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* confdefs.h. */
12652_ACEOF
12653cat confdefs.h >>conftest.$ac_ext
12654cat >>conftest.$ac_ext <<_ACEOF
12655/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012656#ifdef HAVE_STDINT_H
12657 #include <stdint.h>
12658 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012659
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012660typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012661int
12662main ()
12663{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012664if ((ac__type_new_ *) 0)
12665 return 0;
12666if (sizeof (ac__type_new_))
12667 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
12672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673if { (ac_try="$ac_compile"
12674case "(($ac_try" in
12675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12676 *) ac_try_echo=$ac_try;;
12677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012681 grep -v '^ *+' conftest.er1 >conftest.err
12682 rm -f conftest.er1
12683 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685 (exit $ac_status); } && {
12686 test -z "$ac_c_werror_flag" ||
12687 test ! -s conftest.err
12688 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012689 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012692sed 's/^/| /' conftest.$ac_ext >&5
12693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012694 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012696
12697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012698fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012699{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12700echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12701if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012702
12703cat >>confdefs.h <<_ACEOF
12704#define HAVE_UINTPTR_T 1
12705_ACEOF
12706
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012707{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12708echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12709if test "${ac_cv_type_uintptr_t+set}" = set; then
12710 echo $ECHO_N "(cached) $ECHO_C" >&6
12711else
12712 cat >conftest.$ac_ext <<_ACEOF
12713/* confdefs.h. */
12714_ACEOF
12715cat confdefs.h >>conftest.$ac_ext
12716cat >>conftest.$ac_ext <<_ACEOF
12717/* end confdefs.h. */
12718$ac_includes_default
12719typedef uintptr_t ac__type_new_;
12720int
12721main ()
12722{
12723if ((ac__type_new_ *) 0)
12724 return 0;
12725if (sizeof (ac__type_new_))
12726 return 0;
12727 ;
12728 return 0;
12729}
12730_ACEOF
12731rm -f conftest.$ac_objext
12732if { (ac_try="$ac_compile"
12733case "(($ac_try" in
12734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12735 *) ac_try_echo=$ac_try;;
12736esac
12737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12738 (eval "$ac_compile") 2>conftest.er1
12739 ac_status=$?
12740 grep -v '^ *+' conftest.er1 >conftest.err
12741 rm -f conftest.er1
12742 cat conftest.err >&5
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); } && {
12745 test -z "$ac_c_werror_flag" ||
12746 test ! -s conftest.err
12747 } && test -s conftest.$ac_objext; then
12748 ac_cv_type_uintptr_t=yes
12749else
12750 echo "$as_me: failed program was:" >&5
12751sed 's/^/| /' conftest.$ac_ext >&5
12752
12753 ac_cv_type_uintptr_t=no
12754fi
12755
12756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12757fi
12758{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12759echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12760
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761# The cast to long int works around a bug in the HP C Compiler
12762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12764# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012765{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12766echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012767if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012768 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 if test "$cross_compiling" = yes; then
12771 # Depending upon the size, compute the lo and hi bounds.
12772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012778$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012779 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012784test_array [0] = 0
12785
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791if { (ac_try="$ac_compile"
12792case "(($ac_try" in
12793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12794 *) ac_try_echo=$ac_try;;
12795esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012799 grep -v '^ *+' conftest.er1 >conftest.err
12800 rm -f conftest.er1
12801 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012803 (exit $ac_status); } && {
12804 test -z "$ac_c_werror_flag" ||
12805 test ! -s conftest.err
12806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ac_lo=0 ac_mid=0
12808 while :; do
12809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012816 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012821test_array [0] = 0
12822
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828if { (ac_try="$ac_compile"
12829case "(($ac_try" in
12830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12831 *) ac_try_echo=$ac_try;;
12832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012836 grep -v '^ *+' conftest.er1 >conftest.err
12837 rm -f conftest.er1
12838 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012840 (exit $ac_status); } && {
12841 test -z "$ac_c_werror_flag" ||
12842 test ! -s conftest.err
12843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ac_hi=$ac_mid; break
12845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012847sed 's/^/| /' conftest.$ac_ext >&5
12848
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849 ac_lo=`expr $ac_mid + 1`
12850 if test $ac_lo -le $ac_mid; then
12851 ac_lo= ac_hi=
12852 break
12853 fi
12854 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012856
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 done
12859else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012861sed 's/^/| /' conftest.$ac_ext >&5
12862
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* confdefs.h. */
12865_ACEOF
12866cat confdefs.h >>conftest.$ac_ext
12867cat >>conftest.$ac_ext <<_ACEOF
12868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012869$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012870 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012871int
12872main ()
12873{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012875test_array [0] = 0
12876
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882if { (ac_try="$ac_compile"
12883case "(($ac_try" in
12884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12885 *) ac_try_echo=$ac_try;;
12886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012890 grep -v '^ *+' conftest.er1 >conftest.err
12891 rm -f conftest.er1
12892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012894 (exit $ac_status); } && {
12895 test -z "$ac_c_werror_flag" ||
12896 test ! -s conftest.err
12897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 ac_hi=-1 ac_mid=-1
12899 while :; do
12900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* confdefs.h. */
12902_ACEOF
12903cat confdefs.h >>conftest.$ac_ext
12904cat >>conftest.$ac_ext <<_ACEOF
12905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012906$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012907 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012908int
12909main ()
12910{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012911static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012912test_array [0] = 0
12913
12914 ;
12915 return 0;
12916}
12917_ACEOF
12918rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012919if { (ac_try="$ac_compile"
12920case "(($ac_try" in
12921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12922 *) ac_try_echo=$ac_try;;
12923esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012927 grep -v '^ *+' conftest.er1 >conftest.err
12928 rm -f conftest.er1
12929 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931 (exit $ac_status); } && {
12932 test -z "$ac_c_werror_flag" ||
12933 test ! -s conftest.err
12934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 ac_lo=$ac_mid; break
12936else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012938sed 's/^/| /' conftest.$ac_ext >&5
12939
Martin v. Löwiseba40652007-08-30 20:10:57 +000012940 ac_hi=`expr '(' $ac_mid ')' - 1`
12941 if test $ac_mid -le $ac_hi; then
12942 ac_lo= ac_hi=
12943 break
12944 fi
12945 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947
12948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 done
12950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012952sed 's/^/| /' conftest.$ac_ext >&5
12953
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956
12957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012959
12960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012961# Binary search between lo and hi bounds.
12962while test "x$ac_lo" != "x$ac_hi"; do
12963 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012965/* confdefs.h. */
12966_ACEOF
12967cat confdefs.h >>conftest.$ac_ext
12968cat >>conftest.$ac_ext <<_ACEOF
12969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012970$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012971 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012972int
12973main ()
12974{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012975static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012976test_array [0] = 0
12977
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012983if { (ac_try="$ac_compile"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012991 grep -v '^ *+' conftest.er1 >conftest.err
12992 rm -f conftest.er1
12993 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995 (exit $ac_status); } && {
12996 test -z "$ac_c_werror_flag" ||
12997 test ! -s conftest.err
12998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012999 ac_hi=$ac_mid
13000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013002sed 's/^/| /' conftest.$ac_ext >&5
13003
Martin v. Löwiseba40652007-08-30 20:10:57 +000013004 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006
13007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013008done
13009case $ac_lo in
13010?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013012 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013013See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013014echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013015See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013016 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013017 else
13018 ac_cv_sizeof_uintptr_t=0
13019 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013020esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021else
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* confdefs.h. */
13024_ACEOF
13025cat confdefs.h >>conftest.$ac_ext
13026cat >>conftest.$ac_ext <<_ACEOF
13027/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013028$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013029 typedef uintptr_t ac__type_sizeof_;
13030static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13031static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013032#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013033#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013034int
13035main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013036{
Martin v. Löwis11437992002-04-12 09:54:03 +000013037
13038 FILE *f = fopen ("conftest.val", "w");
13039 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013040 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013041 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013042 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013043 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013045 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013046 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 }
13048 else
13049 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013050 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013052 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013053 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
13057 ;
13058 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013059}
Martin v. Löwis11437992002-04-12 09:54:03 +000013060_ACEOF
13061rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062if { (ac_try="$ac_link"
13063case "(($ac_try" in
13064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13065 *) ac_try_echo=$ac_try;;
13066esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 { (case "(($ac_try" in
13073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13074 *) ac_try_echo=$ac_try;;
13075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013077 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013078 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 (exit $ac_status); }; }; then
13081 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013083 echo "$as_me: program exited with status $ac_status" >&5
13084echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013085sed 's/^/| /' conftest.$ac_ext >&5
13086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013088if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013089 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013090See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013091echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013092See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013093 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013094 else
13095 ac_cv_sizeof_uintptr_t=0
13096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013098rm -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 +000013099fi
13100rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013101fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013102{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13103echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013104
13105
13106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013108#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013109_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013110
Michael W. Hudson54241132001-12-07 15:38:26 +000013111
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013112fi
13113
Martin v. Löwisebe26702006-10-02 14:55:51 +000013114
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013115{ echo "$as_me:$LINENO: checking for off_t" >&5
13116echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13117if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013119else
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013126
13127#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013128#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013129#endif
13130
13131
13132typedef off_t ac__type_new_;
13133int
13134main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013135{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013136if ((ac__type_new_ *) 0)
13137 return 0;
13138if (sizeof (ac__type_new_))
13139 return 0;
13140 ;
13141 return 0;
13142}
13143_ACEOF
13144rm -f conftest.$ac_objext
13145if { (ac_try="$ac_compile"
13146case "(($ac_try" in
13147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13148 *) ac_try_echo=$ac_try;;
13149esac
13150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13151 (eval "$ac_compile") 2>conftest.er1
13152 ac_status=$?
13153 grep -v '^ *+' conftest.er1 >conftest.err
13154 rm -f conftest.er1
13155 cat conftest.err >&5
13156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13157 (exit $ac_status); } && {
13158 test -z "$ac_c_werror_flag" ||
13159 test ! -s conftest.err
13160 } && test -s conftest.$ac_objext; then
13161 ac_cv_type_off_t=yes
13162else
13163 echo "$as_me: failed program was:" >&5
13164sed 's/^/| /' conftest.$ac_ext >&5
13165
13166 ac_cv_type_off_t=no
13167fi
13168
13169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13170fi
13171{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13172echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13173
13174# The cast to long int works around a bug in the HP C Compiler
13175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13177# This bug is HP SR number 8606223364.
13178{ echo "$as_me:$LINENO: checking size of off_t" >&5
13179echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13180if test "${ac_cv_sizeof_off_t+set}" = set; then
13181 echo $ECHO_N "(cached) $ECHO_C" >&6
13182else
13183 if test "$cross_compiling" = yes; then
13184 # Depending upon the size, compute the lo and hi bounds.
13185cat >conftest.$ac_ext <<_ACEOF
13186/* confdefs.h. */
13187_ACEOF
13188cat confdefs.h >>conftest.$ac_ext
13189cat >>conftest.$ac_ext <<_ACEOF
13190/* end confdefs.h. */
13191
13192#ifdef HAVE_SYS_TYPES_H
13193#include <sys/types.h>
13194#endif
13195
13196
13197 typedef off_t ac__type_sizeof_;
13198int
13199main ()
13200{
13201static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13202test_array [0] = 0
13203
13204 ;
13205 return 0;
13206}
13207_ACEOF
13208rm -f conftest.$ac_objext
13209if { (ac_try="$ac_compile"
13210case "(($ac_try" in
13211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13212 *) ac_try_echo=$ac_try;;
13213esac
13214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13215 (eval "$ac_compile") 2>conftest.er1
13216 ac_status=$?
13217 grep -v '^ *+' conftest.er1 >conftest.err
13218 rm -f conftest.er1
13219 cat conftest.err >&5
13220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13221 (exit $ac_status); } && {
13222 test -z "$ac_c_werror_flag" ||
13223 test ! -s conftest.err
13224 } && test -s conftest.$ac_objext; then
13225 ac_lo=0 ac_mid=0
13226 while :; do
13227 cat >conftest.$ac_ext <<_ACEOF
13228/* confdefs.h. */
13229_ACEOF
13230cat confdefs.h >>conftest.$ac_ext
13231cat >>conftest.$ac_ext <<_ACEOF
13232/* end confdefs.h. */
13233
13234#ifdef HAVE_SYS_TYPES_H
13235#include <sys/types.h>
13236#endif
13237
13238
13239 typedef off_t ac__type_sizeof_;
13240int
13241main ()
13242{
13243static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13244test_array [0] = 0
13245
13246 ;
13247 return 0;
13248}
13249_ACEOF
13250rm -f conftest.$ac_objext
13251if { (ac_try="$ac_compile"
13252case "(($ac_try" in
13253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13254 *) ac_try_echo=$ac_try;;
13255esac
13256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13257 (eval "$ac_compile") 2>conftest.er1
13258 ac_status=$?
13259 grep -v '^ *+' conftest.er1 >conftest.err
13260 rm -f conftest.er1
13261 cat conftest.err >&5
13262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13263 (exit $ac_status); } && {
13264 test -z "$ac_c_werror_flag" ||
13265 test ! -s conftest.err
13266 } && test -s conftest.$ac_objext; then
13267 ac_hi=$ac_mid; break
13268else
13269 echo "$as_me: failed program was:" >&5
13270sed 's/^/| /' conftest.$ac_ext >&5
13271
13272 ac_lo=`expr $ac_mid + 1`
13273 if test $ac_lo -le $ac_mid; then
13274 ac_lo= ac_hi=
13275 break
13276 fi
13277 ac_mid=`expr 2 '*' $ac_mid + 1`
13278fi
13279
13280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13281 done
13282else
13283 echo "$as_me: failed program was:" >&5
13284sed 's/^/| /' conftest.$ac_ext >&5
13285
13286 cat >conftest.$ac_ext <<_ACEOF
13287/* confdefs.h. */
13288_ACEOF
13289cat confdefs.h >>conftest.$ac_ext
13290cat >>conftest.$ac_ext <<_ACEOF
13291/* end confdefs.h. */
13292
13293#ifdef HAVE_SYS_TYPES_H
13294#include <sys/types.h>
13295#endif
13296
13297
13298 typedef off_t ac__type_sizeof_;
13299int
13300main ()
13301{
13302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13303test_array [0] = 0
13304
13305 ;
13306 return 0;
13307}
13308_ACEOF
13309rm -f conftest.$ac_objext
13310if { (ac_try="$ac_compile"
13311case "(($ac_try" in
13312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13313 *) ac_try_echo=$ac_try;;
13314esac
13315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13316 (eval "$ac_compile") 2>conftest.er1
13317 ac_status=$?
13318 grep -v '^ *+' conftest.er1 >conftest.err
13319 rm -f conftest.er1
13320 cat conftest.err >&5
13321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13322 (exit $ac_status); } && {
13323 test -z "$ac_c_werror_flag" ||
13324 test ! -s conftest.err
13325 } && test -s conftest.$ac_objext; then
13326 ac_hi=-1 ac_mid=-1
13327 while :; do
13328 cat >conftest.$ac_ext <<_ACEOF
13329/* confdefs.h. */
13330_ACEOF
13331cat confdefs.h >>conftest.$ac_ext
13332cat >>conftest.$ac_ext <<_ACEOF
13333/* end confdefs.h. */
13334
13335#ifdef HAVE_SYS_TYPES_H
13336#include <sys/types.h>
13337#endif
13338
13339
13340 typedef off_t ac__type_sizeof_;
13341int
13342main ()
13343{
13344static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13345test_array [0] = 0
13346
13347 ;
13348 return 0;
13349}
13350_ACEOF
13351rm -f conftest.$ac_objext
13352if { (ac_try="$ac_compile"
13353case "(($ac_try" in
13354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13355 *) ac_try_echo=$ac_try;;
13356esac
13357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13358 (eval "$ac_compile") 2>conftest.er1
13359 ac_status=$?
13360 grep -v '^ *+' conftest.er1 >conftest.err
13361 rm -f conftest.er1
13362 cat conftest.err >&5
13363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13364 (exit $ac_status); } && {
13365 test -z "$ac_c_werror_flag" ||
13366 test ! -s conftest.err
13367 } && test -s conftest.$ac_objext; then
13368 ac_lo=$ac_mid; break
13369else
13370 echo "$as_me: failed program was:" >&5
13371sed 's/^/| /' conftest.$ac_ext >&5
13372
13373 ac_hi=`expr '(' $ac_mid ')' - 1`
13374 if test $ac_mid -le $ac_hi; then
13375 ac_lo= ac_hi=
13376 break
13377 fi
13378 ac_mid=`expr 2 '*' $ac_mid`
13379fi
13380
13381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382 done
13383else
13384 echo "$as_me: failed program was:" >&5
13385sed 's/^/| /' conftest.$ac_ext >&5
13386
13387 ac_lo= ac_hi=
13388fi
13389
13390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13391fi
13392
13393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13394# Binary search between lo and hi bounds.
13395while test "x$ac_lo" != "x$ac_hi"; do
13396 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13397 cat >conftest.$ac_ext <<_ACEOF
13398/* confdefs.h. */
13399_ACEOF
13400cat confdefs.h >>conftest.$ac_ext
13401cat >>conftest.$ac_ext <<_ACEOF
13402/* end confdefs.h. */
13403
13404#ifdef HAVE_SYS_TYPES_H
13405#include <sys/types.h>
13406#endif
13407
13408
13409 typedef off_t ac__type_sizeof_;
13410int
13411main ()
13412{
13413static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13414test_array [0] = 0
13415
13416 ;
13417 return 0;
13418}
13419_ACEOF
13420rm -f conftest.$ac_objext
13421if { (ac_try="$ac_compile"
13422case "(($ac_try" in
13423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13424 *) ac_try_echo=$ac_try;;
13425esac
13426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13427 (eval "$ac_compile") 2>conftest.er1
13428 ac_status=$?
13429 grep -v '^ *+' conftest.er1 >conftest.err
13430 rm -f conftest.er1
13431 cat conftest.err >&5
13432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13433 (exit $ac_status); } && {
13434 test -z "$ac_c_werror_flag" ||
13435 test ! -s conftest.err
13436 } && test -s conftest.$ac_objext; then
13437 ac_hi=$ac_mid
13438else
13439 echo "$as_me: failed program was:" >&5
13440sed 's/^/| /' conftest.$ac_ext >&5
13441
13442 ac_lo=`expr '(' $ac_mid ')' + 1`
13443fi
13444
13445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13446done
13447case $ac_lo in
13448?*) ac_cv_sizeof_off_t=$ac_lo;;
13449'') if test "$ac_cv_type_off_t" = yes; then
13450 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13451See \`config.log' for more details." >&5
13452echo "$as_me: error: cannot compute sizeof (off_t)
13453See \`config.log' for more details." >&2;}
13454 { (exit 77); exit 77; }; }
13455 else
13456 ac_cv_sizeof_off_t=0
13457 fi ;;
13458esac
13459else
13460 cat >conftest.$ac_ext <<_ACEOF
13461/* confdefs.h. */
13462_ACEOF
13463cat confdefs.h >>conftest.$ac_ext
13464cat >>conftest.$ac_ext <<_ACEOF
13465/* end confdefs.h. */
13466
13467#ifdef HAVE_SYS_TYPES_H
13468#include <sys/types.h>
13469#endif
13470
13471
13472 typedef off_t ac__type_sizeof_;
13473static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13474static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13475#include <stdio.h>
13476#include <stdlib.h>
13477int
13478main ()
13479{
13480
13481 FILE *f = fopen ("conftest.val", "w");
13482 if (! f)
13483 return 1;
13484 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13485 {
13486 long int i = longval ();
13487 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13488 return 1;
13489 fprintf (f, "%ld\n", i);
13490 }
13491 else
13492 {
13493 unsigned long int i = ulongval ();
13494 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13495 return 1;
13496 fprintf (f, "%lu\n", i);
13497 }
13498 return ferror (f) || fclose (f) != 0;
13499
13500 ;
13501 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013502}
Martin v. Löwis11437992002-04-12 09:54:03 +000013503_ACEOF
13504rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505if { (ac_try="$ac_link"
13506case "(($ac_try" in
13507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13508 *) ac_try_echo=$ac_try;;
13509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013512 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013515 { (case "(($ac_try" in
13516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13517 *) ac_try_echo=$ac_try;;
13518esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013524 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013526 echo "$as_me: program exited with status $ac_status" >&5
13527echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013528sed 's/^/| /' conftest.$ac_ext >&5
13529
Martin v. Löwis11437992002-04-12 09:54:03 +000013530( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013531if test "$ac_cv_type_off_t" = yes; then
13532 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13533See \`config.log' for more details." >&5
13534echo "$as_me: error: cannot compute sizeof (off_t)
13535See \`config.log' for more details." >&2;}
13536 { (exit 77); exit 77; }; }
13537 else
13538 ac_cv_sizeof_off_t=0
13539 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013541rm -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 +000013542fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013543rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013545{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13546echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013548
13549
Martin v. Löwis11437992002-04-12 09:54:03 +000013550cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013551#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013552_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013553
Michael W. Hudson54241132001-12-07 15:38:26 +000013554
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013556{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13557echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013558if test "$have_long_long" = yes
13559then
13560if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013561 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013562
Martin v. Löwis11437992002-04-12 09:54:03 +000013563cat >>confdefs.h <<\_ACEOF
13564#define HAVE_LARGEFILE_SUPPORT 1
13565_ACEOF
13566
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013567 { echo "$as_me:$LINENO: result: yes" >&5
13568echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013569else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013570 { echo "$as_me:$LINENO: result: no" >&5
13571echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013572fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013573else
13574 { echo "$as_me:$LINENO: result: no" >&5
13575echo "${ECHO_T}no" >&6; }
13576fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013577
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013578{ echo "$as_me:$LINENO: checking for time_t" >&5
13579echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13580if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013582else
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* confdefs.h. */
13585_ACEOF
13586cat confdefs.h >>conftest.$ac_ext
13587cat >>conftest.$ac_ext <<_ACEOF
13588/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013589
13590#ifdef HAVE_SYS_TYPES_H
13591#include <sys/types.h>
13592#endif
13593#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013594#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013595#endif
13596
13597
13598typedef time_t ac__type_new_;
13599int
13600main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013601{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013602if ((ac__type_new_ *) 0)
13603 return 0;
13604if (sizeof (ac__type_new_))
13605 return 0;
13606 ;
13607 return 0;
13608}
13609_ACEOF
13610rm -f conftest.$ac_objext
13611if { (ac_try="$ac_compile"
13612case "(($ac_try" in
13613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13614 *) ac_try_echo=$ac_try;;
13615esac
13616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13617 (eval "$ac_compile") 2>conftest.er1
13618 ac_status=$?
13619 grep -v '^ *+' conftest.er1 >conftest.err
13620 rm -f conftest.er1
13621 cat conftest.err >&5
13622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13623 (exit $ac_status); } && {
13624 test -z "$ac_c_werror_flag" ||
13625 test ! -s conftest.err
13626 } && test -s conftest.$ac_objext; then
13627 ac_cv_type_time_t=yes
13628else
13629 echo "$as_me: failed program was:" >&5
13630sed 's/^/| /' conftest.$ac_ext >&5
13631
13632 ac_cv_type_time_t=no
13633fi
13634
13635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636fi
13637{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13638echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13639
13640# The cast to long int works around a bug in the HP C Compiler
13641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13643# This bug is HP SR number 8606223364.
13644{ echo "$as_me:$LINENO: checking size of time_t" >&5
13645echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13646if test "${ac_cv_sizeof_time_t+set}" = set; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
13648else
13649 if test "$cross_compiling" = yes; then
13650 # Depending upon the size, compute the lo and hi bounds.
13651cat >conftest.$ac_ext <<_ACEOF
13652/* confdefs.h. */
13653_ACEOF
13654cat confdefs.h >>conftest.$ac_ext
13655cat >>conftest.$ac_ext <<_ACEOF
13656/* end confdefs.h. */
13657
13658#ifdef HAVE_SYS_TYPES_H
13659#include <sys/types.h>
13660#endif
13661#ifdef HAVE_TIME_H
13662#include <time.h>
13663#endif
13664
13665
13666 typedef time_t ac__type_sizeof_;
13667int
13668main ()
13669{
13670static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13671test_array [0] = 0
13672
13673 ;
13674 return 0;
13675}
13676_ACEOF
13677rm -f conftest.$ac_objext
13678if { (ac_try="$ac_compile"
13679case "(($ac_try" in
13680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13681 *) ac_try_echo=$ac_try;;
13682esac
13683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13684 (eval "$ac_compile") 2>conftest.er1
13685 ac_status=$?
13686 grep -v '^ *+' conftest.er1 >conftest.err
13687 rm -f conftest.er1
13688 cat conftest.err >&5
13689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13690 (exit $ac_status); } && {
13691 test -z "$ac_c_werror_flag" ||
13692 test ! -s conftest.err
13693 } && test -s conftest.$ac_objext; then
13694 ac_lo=0 ac_mid=0
13695 while :; do
13696 cat >conftest.$ac_ext <<_ACEOF
13697/* confdefs.h. */
13698_ACEOF
13699cat confdefs.h >>conftest.$ac_ext
13700cat >>conftest.$ac_ext <<_ACEOF
13701/* end confdefs.h. */
13702
13703#ifdef HAVE_SYS_TYPES_H
13704#include <sys/types.h>
13705#endif
13706#ifdef HAVE_TIME_H
13707#include <time.h>
13708#endif
13709
13710
13711 typedef time_t ac__type_sizeof_;
13712int
13713main ()
13714{
13715static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13716test_array [0] = 0
13717
13718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext
13723if { (ac_try="$ac_compile"
13724case "(($ac_try" in
13725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13726 *) ac_try_echo=$ac_try;;
13727esac
13728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13729 (eval "$ac_compile") 2>conftest.er1
13730 ac_status=$?
13731 grep -v '^ *+' conftest.er1 >conftest.err
13732 rm -f conftest.er1
13733 cat conftest.err >&5
13734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13735 (exit $ac_status); } && {
13736 test -z "$ac_c_werror_flag" ||
13737 test ! -s conftest.err
13738 } && test -s conftest.$ac_objext; then
13739 ac_hi=$ac_mid; break
13740else
13741 echo "$as_me: failed program was:" >&5
13742sed 's/^/| /' conftest.$ac_ext >&5
13743
13744 ac_lo=`expr $ac_mid + 1`
13745 if test $ac_lo -le $ac_mid; then
13746 ac_lo= ac_hi=
13747 break
13748 fi
13749 ac_mid=`expr 2 '*' $ac_mid + 1`
13750fi
13751
13752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753 done
13754else
13755 echo "$as_me: failed program was:" >&5
13756sed 's/^/| /' conftest.$ac_ext >&5
13757
13758 cat >conftest.$ac_ext <<_ACEOF
13759/* confdefs.h. */
13760_ACEOF
13761cat confdefs.h >>conftest.$ac_ext
13762cat >>conftest.$ac_ext <<_ACEOF
13763/* end confdefs.h. */
13764
13765#ifdef HAVE_SYS_TYPES_H
13766#include <sys/types.h>
13767#endif
13768#ifdef HAVE_TIME_H
13769#include <time.h>
13770#endif
13771
13772
13773 typedef time_t ac__type_sizeof_;
13774int
13775main ()
13776{
13777static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13778test_array [0] = 0
13779
13780 ;
13781 return 0;
13782}
13783_ACEOF
13784rm -f conftest.$ac_objext
13785if { (ac_try="$ac_compile"
13786case "(($ac_try" in
13787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13788 *) ac_try_echo=$ac_try;;
13789esac
13790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13791 (eval "$ac_compile") 2>conftest.er1
13792 ac_status=$?
13793 grep -v '^ *+' conftest.er1 >conftest.err
13794 rm -f conftest.er1
13795 cat conftest.err >&5
13796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13797 (exit $ac_status); } && {
13798 test -z "$ac_c_werror_flag" ||
13799 test ! -s conftest.err
13800 } && test -s conftest.$ac_objext; then
13801 ac_hi=-1 ac_mid=-1
13802 while :; do
13803 cat >conftest.$ac_ext <<_ACEOF
13804/* confdefs.h. */
13805_ACEOF
13806cat confdefs.h >>conftest.$ac_ext
13807cat >>conftest.$ac_ext <<_ACEOF
13808/* end confdefs.h. */
13809
13810#ifdef HAVE_SYS_TYPES_H
13811#include <sys/types.h>
13812#endif
13813#ifdef HAVE_TIME_H
13814#include <time.h>
13815#endif
13816
13817
13818 typedef time_t ac__type_sizeof_;
13819int
13820main ()
13821{
13822static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13823test_array [0] = 0
13824
13825 ;
13826 return 0;
13827}
13828_ACEOF
13829rm -f conftest.$ac_objext
13830if { (ac_try="$ac_compile"
13831case "(($ac_try" in
13832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13833 *) ac_try_echo=$ac_try;;
13834esac
13835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13836 (eval "$ac_compile") 2>conftest.er1
13837 ac_status=$?
13838 grep -v '^ *+' conftest.er1 >conftest.err
13839 rm -f conftest.er1
13840 cat conftest.err >&5
13841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13842 (exit $ac_status); } && {
13843 test -z "$ac_c_werror_flag" ||
13844 test ! -s conftest.err
13845 } && test -s conftest.$ac_objext; then
13846 ac_lo=$ac_mid; break
13847else
13848 echo "$as_me: failed program was:" >&5
13849sed 's/^/| /' conftest.$ac_ext >&5
13850
13851 ac_hi=`expr '(' $ac_mid ')' - 1`
13852 if test $ac_mid -le $ac_hi; then
13853 ac_lo= ac_hi=
13854 break
13855 fi
13856 ac_mid=`expr 2 '*' $ac_mid`
13857fi
13858
13859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13860 done
13861else
13862 echo "$as_me: failed program was:" >&5
13863sed 's/^/| /' conftest.$ac_ext >&5
13864
13865 ac_lo= ac_hi=
13866fi
13867
13868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13869fi
13870
13871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872# Binary search between lo and hi bounds.
13873while test "x$ac_lo" != "x$ac_hi"; do
13874 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13875 cat >conftest.$ac_ext <<_ACEOF
13876/* confdefs.h. */
13877_ACEOF
13878cat confdefs.h >>conftest.$ac_ext
13879cat >>conftest.$ac_ext <<_ACEOF
13880/* end confdefs.h. */
13881
13882#ifdef HAVE_SYS_TYPES_H
13883#include <sys/types.h>
13884#endif
13885#ifdef HAVE_TIME_H
13886#include <time.h>
13887#endif
13888
13889
13890 typedef time_t ac__type_sizeof_;
13891int
13892main ()
13893{
13894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13895test_array [0] = 0
13896
13897 ;
13898 return 0;
13899}
13900_ACEOF
13901rm -f conftest.$ac_objext
13902if { (ac_try="$ac_compile"
13903case "(($ac_try" in
13904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13905 *) ac_try_echo=$ac_try;;
13906esac
13907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13908 (eval "$ac_compile") 2>conftest.er1
13909 ac_status=$?
13910 grep -v '^ *+' conftest.er1 >conftest.err
13911 rm -f conftest.er1
13912 cat conftest.err >&5
13913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13914 (exit $ac_status); } && {
13915 test -z "$ac_c_werror_flag" ||
13916 test ! -s conftest.err
13917 } && test -s conftest.$ac_objext; then
13918 ac_hi=$ac_mid
13919else
13920 echo "$as_me: failed program was:" >&5
13921sed 's/^/| /' conftest.$ac_ext >&5
13922
13923 ac_lo=`expr '(' $ac_mid ')' + 1`
13924fi
13925
13926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13927done
13928case $ac_lo in
13929?*) ac_cv_sizeof_time_t=$ac_lo;;
13930'') if 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 ;;
13939esac
13940else
13941 cat >conftest.$ac_ext <<_ACEOF
13942/* confdefs.h. */
13943_ACEOF
13944cat confdefs.h >>conftest.$ac_ext
13945cat >>conftest.$ac_ext <<_ACEOF
13946/* end confdefs.h. */
13947
13948#ifdef HAVE_SYS_TYPES_H
13949#include <sys/types.h>
13950#endif
13951#ifdef HAVE_TIME_H
13952#include <time.h>
13953#endif
13954
13955
13956 typedef time_t ac__type_sizeof_;
13957static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13958static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13959#include <stdio.h>
13960#include <stdlib.h>
13961int
13962main ()
13963{
13964
13965 FILE *f = fopen ("conftest.val", "w");
13966 if (! f)
13967 return 1;
13968 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13969 {
13970 long int i = longval ();
13971 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13972 return 1;
13973 fprintf (f, "%ld\n", i);
13974 }
13975 else
13976 {
13977 unsigned long int i = ulongval ();
13978 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13979 return 1;
13980 fprintf (f, "%lu\n", i);
13981 }
13982 return ferror (f) || fclose (f) != 0;
13983
13984 ;
13985 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013986}
Martin v. Löwis11437992002-04-12 09:54:03 +000013987_ACEOF
13988rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989if { (ac_try="$ac_link"
13990case "(($ac_try" in
13991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13992 *) ac_try_echo=$ac_try;;
13993esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013995 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013999 { (case "(($ac_try" in
14000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14001 *) ac_try_echo=$ac_try;;
14002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014004 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014008 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014010 echo "$as_me: program exited with status $ac_status" >&5
14011echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014012sed 's/^/| /' conftest.$ac_ext >&5
14013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014015if test "$ac_cv_type_time_t" = yes; then
14016 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14017See \`config.log' for more details." >&5
14018echo "$as_me: error: cannot compute sizeof (time_t)
14019See \`config.log' for more details." >&2;}
14020 { (exit 77); exit 77; }; }
14021 else
14022 ac_cv_sizeof_time_t=0
14023 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025rm -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 +000014026fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014027rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014028fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014029{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14030echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014032
14033
Martin v. Löwis11437992002-04-12 09:54:03 +000014034cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014035#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014036_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014037
Michael W. Hudson54241132001-12-07 15:38:26 +000014038
14039
Trent Mick635f6fb2000-08-23 21:33:05 +000014040# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014041ac_save_cc="$CC"
14042if test "$ac_cv_kpthread" = "yes"
14043then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014044elif test "$ac_cv_kthread" = "yes"
14045then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014046elif test "$ac_cv_pthread" = "yes"
14047then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014048fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014049{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14050echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014051have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014052cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014053/* confdefs.h. */
14054_ACEOF
14055cat confdefs.h >>conftest.$ac_ext
14056cat >>conftest.$ac_ext <<_ACEOF
14057/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014058#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014059int
14060main ()
14061{
Guido van Rossum12580492000-09-24 16:47:19 +000014062pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ;
14064 return 0;
14065}
14066_ACEOF
14067rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014068if { (ac_try="$ac_compile"
14069case "(($ac_try" in
14070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14071 *) ac_try_echo=$ac_try;;
14072esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014076 grep -v '^ *+' conftest.er1 >conftest.err
14077 rm -f conftest.er1
14078 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014080 (exit $ac_status); } && {
14081 test -z "$ac_c_werror_flag" ||
14082 test ! -s conftest.err
14083 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014084 have_pthread_t=yes
14085else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014087sed 's/^/| /' conftest.$ac_ext >&5
14088
Martin v. Löwiseba40652007-08-30 20:10:57 +000014089
Trent Mick635f6fb2000-08-23 21:33:05 +000014090fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014091
14092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014093{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14094echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014095if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014096 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14097echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14098if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014099 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* confdefs.h. */
14103_ACEOF
14104cat confdefs.h >>conftest.$ac_ext
14105cat >>conftest.$ac_ext <<_ACEOF
14106/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014107
14108#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014109#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014110#endif
14111
14112
14113typedef pthread_t ac__type_new_;
14114int
14115main ()
14116{
14117if ((ac__type_new_ *) 0)
14118 return 0;
14119if (sizeof (ac__type_new_))
14120 return 0;
14121 ;
14122 return 0;
14123}
14124_ACEOF
14125rm -f conftest.$ac_objext
14126if { (ac_try="$ac_compile"
14127case "(($ac_try" in
14128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14129 *) ac_try_echo=$ac_try;;
14130esac
14131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14132 (eval "$ac_compile") 2>conftest.er1
14133 ac_status=$?
14134 grep -v '^ *+' conftest.er1 >conftest.err
14135 rm -f conftest.er1
14136 cat conftest.err >&5
14137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14138 (exit $ac_status); } && {
14139 test -z "$ac_c_werror_flag" ||
14140 test ! -s conftest.err
14141 } && test -s conftest.$ac_objext; then
14142 ac_cv_type_pthread_t=yes
14143else
14144 echo "$as_me: failed program was:" >&5
14145sed 's/^/| /' conftest.$ac_ext >&5
14146
14147 ac_cv_type_pthread_t=no
14148fi
14149
14150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14151fi
14152{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14153echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14154
14155# The cast to long int works around a bug in the HP C Compiler
14156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14158# This bug is HP SR number 8606223364.
14159{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14160echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14161if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14162 echo $ECHO_N "(cached) $ECHO_C" >&6
14163else
14164 if test "$cross_compiling" = yes; then
14165 # Depending upon the size, compute the lo and hi bounds.
14166cat >conftest.$ac_ext <<_ACEOF
14167/* confdefs.h. */
14168_ACEOF
14169cat confdefs.h >>conftest.$ac_ext
14170cat >>conftest.$ac_ext <<_ACEOF
14171/* end confdefs.h. */
14172
14173#ifdef HAVE_PTHREAD_H
14174#include <pthread.h>
14175#endif
14176
14177
14178 typedef pthread_t ac__type_sizeof_;
14179int
14180main ()
14181{
14182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14183test_array [0] = 0
14184
14185 ;
14186 return 0;
14187}
14188_ACEOF
14189rm -f conftest.$ac_objext
14190if { (ac_try="$ac_compile"
14191case "(($ac_try" in
14192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14193 *) ac_try_echo=$ac_try;;
14194esac
14195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14196 (eval "$ac_compile") 2>conftest.er1
14197 ac_status=$?
14198 grep -v '^ *+' conftest.er1 >conftest.err
14199 rm -f conftest.er1
14200 cat conftest.err >&5
14201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14202 (exit $ac_status); } && {
14203 test -z "$ac_c_werror_flag" ||
14204 test ! -s conftest.err
14205 } && test -s conftest.$ac_objext; then
14206 ac_lo=0 ac_mid=0
14207 while :; do
14208 cat >conftest.$ac_ext <<_ACEOF
14209/* confdefs.h. */
14210_ACEOF
14211cat confdefs.h >>conftest.$ac_ext
14212cat >>conftest.$ac_ext <<_ACEOF
14213/* end confdefs.h. */
14214
14215#ifdef HAVE_PTHREAD_H
14216#include <pthread.h>
14217#endif
14218
14219
14220 typedef pthread_t ac__type_sizeof_;
14221int
14222main ()
14223{
14224static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14225test_array [0] = 0
14226
14227 ;
14228 return 0;
14229}
14230_ACEOF
14231rm -f conftest.$ac_objext
14232if { (ac_try="$ac_compile"
14233case "(($ac_try" in
14234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14235 *) ac_try_echo=$ac_try;;
14236esac
14237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14238 (eval "$ac_compile") 2>conftest.er1
14239 ac_status=$?
14240 grep -v '^ *+' conftest.er1 >conftest.err
14241 rm -f conftest.er1
14242 cat conftest.err >&5
14243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14244 (exit $ac_status); } && {
14245 test -z "$ac_c_werror_flag" ||
14246 test ! -s conftest.err
14247 } && test -s conftest.$ac_objext; then
14248 ac_hi=$ac_mid; break
14249else
14250 echo "$as_me: failed program was:" >&5
14251sed 's/^/| /' conftest.$ac_ext >&5
14252
14253 ac_lo=`expr $ac_mid + 1`
14254 if test $ac_lo -le $ac_mid; then
14255 ac_lo= ac_hi=
14256 break
14257 fi
14258 ac_mid=`expr 2 '*' $ac_mid + 1`
14259fi
14260
14261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14262 done
14263else
14264 echo "$as_me: failed program was:" >&5
14265sed 's/^/| /' conftest.$ac_ext >&5
14266
14267 cat >conftest.$ac_ext <<_ACEOF
14268/* confdefs.h. */
14269_ACEOF
14270cat confdefs.h >>conftest.$ac_ext
14271cat >>conftest.$ac_ext <<_ACEOF
14272/* end confdefs.h. */
14273
14274#ifdef HAVE_PTHREAD_H
14275#include <pthread.h>
14276#endif
14277
14278
14279 typedef pthread_t ac__type_sizeof_;
14280int
14281main ()
14282{
14283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14284test_array [0] = 0
14285
14286 ;
14287 return 0;
14288}
14289_ACEOF
14290rm -f conftest.$ac_objext
14291if { (ac_try="$ac_compile"
14292case "(($ac_try" in
14293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14294 *) ac_try_echo=$ac_try;;
14295esac
14296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14297 (eval "$ac_compile") 2>conftest.er1
14298 ac_status=$?
14299 grep -v '^ *+' conftest.er1 >conftest.err
14300 rm -f conftest.er1
14301 cat conftest.err >&5
14302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14303 (exit $ac_status); } && {
14304 test -z "$ac_c_werror_flag" ||
14305 test ! -s conftest.err
14306 } && test -s conftest.$ac_objext; then
14307 ac_hi=-1 ac_mid=-1
14308 while :; do
14309 cat >conftest.$ac_ext <<_ACEOF
14310/* confdefs.h. */
14311_ACEOF
14312cat confdefs.h >>conftest.$ac_ext
14313cat >>conftest.$ac_ext <<_ACEOF
14314/* end confdefs.h. */
14315
14316#ifdef HAVE_PTHREAD_H
14317#include <pthread.h>
14318#endif
14319
14320
14321 typedef pthread_t ac__type_sizeof_;
14322int
14323main ()
14324{
14325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14326test_array [0] = 0
14327
14328 ;
14329 return 0;
14330}
14331_ACEOF
14332rm -f conftest.$ac_objext
14333if { (ac_try="$ac_compile"
14334case "(($ac_try" in
14335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14336 *) ac_try_echo=$ac_try;;
14337esac
14338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14339 (eval "$ac_compile") 2>conftest.er1
14340 ac_status=$?
14341 grep -v '^ *+' conftest.er1 >conftest.err
14342 rm -f conftest.er1
14343 cat conftest.err >&5
14344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14345 (exit $ac_status); } && {
14346 test -z "$ac_c_werror_flag" ||
14347 test ! -s conftest.err
14348 } && test -s conftest.$ac_objext; then
14349 ac_lo=$ac_mid; break
14350else
14351 echo "$as_me: failed program was:" >&5
14352sed 's/^/| /' conftest.$ac_ext >&5
14353
14354 ac_hi=`expr '(' $ac_mid ')' - 1`
14355 if test $ac_mid -le $ac_hi; then
14356 ac_lo= ac_hi=
14357 break
14358 fi
14359 ac_mid=`expr 2 '*' $ac_mid`
14360fi
14361
14362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14363 done
14364else
14365 echo "$as_me: failed program was:" >&5
14366sed 's/^/| /' conftest.$ac_ext >&5
14367
14368 ac_lo= ac_hi=
14369fi
14370
14371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14372fi
14373
14374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14375# Binary search between lo and hi bounds.
14376while test "x$ac_lo" != "x$ac_hi"; do
14377 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14378 cat >conftest.$ac_ext <<_ACEOF
14379/* confdefs.h. */
14380_ACEOF
14381cat confdefs.h >>conftest.$ac_ext
14382cat >>conftest.$ac_ext <<_ACEOF
14383/* end confdefs.h. */
14384
14385#ifdef HAVE_PTHREAD_H
14386#include <pthread.h>
14387#endif
14388
14389
14390 typedef pthread_t ac__type_sizeof_;
14391int
14392main ()
14393{
14394static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14395test_array [0] = 0
14396
14397 ;
14398 return 0;
14399}
14400_ACEOF
14401rm -f conftest.$ac_objext
14402if { (ac_try="$ac_compile"
14403case "(($ac_try" in
14404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14405 *) ac_try_echo=$ac_try;;
14406esac
14407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14408 (eval "$ac_compile") 2>conftest.er1
14409 ac_status=$?
14410 grep -v '^ *+' conftest.er1 >conftest.err
14411 rm -f conftest.er1
14412 cat conftest.err >&5
14413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14414 (exit $ac_status); } && {
14415 test -z "$ac_c_werror_flag" ||
14416 test ! -s conftest.err
14417 } && test -s conftest.$ac_objext; then
14418 ac_hi=$ac_mid
14419else
14420 echo "$as_me: failed program was:" >&5
14421sed 's/^/| /' conftest.$ac_ext >&5
14422
14423 ac_lo=`expr '(' $ac_mid ')' + 1`
14424fi
14425
14426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14427done
14428case $ac_lo in
14429?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14430'') if test "$ac_cv_type_pthread_t" = yes; then
14431 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14432See \`config.log' for more details." >&5
14433echo "$as_me: error: cannot compute sizeof (pthread_t)
14434See \`config.log' for more details." >&2;}
14435 { (exit 77); exit 77; }; }
14436 else
14437 ac_cv_sizeof_pthread_t=0
14438 fi ;;
14439esac
14440else
14441 cat >conftest.$ac_ext <<_ACEOF
14442/* confdefs.h. */
14443_ACEOF
14444cat confdefs.h >>conftest.$ac_ext
14445cat >>conftest.$ac_ext <<_ACEOF
14446/* end confdefs.h. */
14447
14448#ifdef HAVE_PTHREAD_H
14449#include <pthread.h>
14450#endif
14451
14452
14453 typedef pthread_t ac__type_sizeof_;
14454static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14455static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14456#include <stdio.h>
14457#include <stdlib.h>
14458int
14459main ()
14460{
14461
14462 FILE *f = fopen ("conftest.val", "w");
14463 if (! f)
14464 return 1;
14465 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14466 {
14467 long int i = longval ();
14468 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14469 return 1;
14470 fprintf (f, "%ld\n", i);
14471 }
14472 else
14473 {
14474 unsigned long int i = ulongval ();
14475 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14476 return 1;
14477 fprintf (f, "%lu\n", i);
14478 }
14479 return ferror (f) || fclose (f) != 0;
14480
14481 ;
14482 return 0;
14483}
Martin v. Löwis11437992002-04-12 09:54:03 +000014484_ACEOF
14485rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014486if { (ac_try="$ac_link"
14487case "(($ac_try" in
14488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14489 *) ac_try_echo=$ac_try;;
14490esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014492 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496 { (case "(($ac_try" in
14497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14498 *) ac_try_echo=$ac_try;;
14499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014501 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014505 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014507 echo "$as_me: program exited with status $ac_status" >&5
14508echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014509sed 's/^/| /' conftest.$ac_ext >&5
14510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014512if test "$ac_cv_type_pthread_t" = yes; then
14513 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14514See \`config.log' for more details." >&5
14515echo "$as_me: error: cannot compute sizeof (pthread_t)
14516See \`config.log' for more details." >&2;}
14517 { (exit 77); exit 77; }; }
14518 else
14519 ac_cv_sizeof_pthread_t=0
14520 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014522rm -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 +000014523fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014524rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014525fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014526{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014527echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014528
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014529
14530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014532#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014534
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014535
Trent Mick635f6fb2000-08-23 21:33:05 +000014536fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014537CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014539{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14540echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014542if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014543 enableval=$enable_toolbox_glue;
14544fi
Jack Jansene578a632001-08-15 01:27:14 +000014545
14546
14547if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014548then
Jack Jansene578a632001-08-15 01:27:14 +000014549 case $ac_sys_system/$ac_sys_release in
14550 Darwin/*)
14551 enable_toolbox_glue="yes";;
14552 *)
14553 enable_toolbox_glue="no";;
14554 esac
14555fi
14556case "$enable_toolbox_glue" in
14557yes)
Jack Jansene578a632001-08-15 01:27:14 +000014558 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014559 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
14561cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014562#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014564
14565 ;;
14566*)
Jack Jansene578a632001-08-15 01:27:14 +000014567 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014568 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014569 ;;
14570esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014571{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14572echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014573
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014574
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014575
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014576case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014577 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014578 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14579 ;;
14580 Darwin/*)
14581 OTHER_LIBTOOL_OPT=""
14582 ;;
14583esac
14584
14585
Ronald Oussoren25967582009-09-06 10:00:26 +000014586ARCH_RUN_32BIT=""
14587
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014588case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014589 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014590 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14591 if test "${enable_universalsdk}"; then
14592 :
14593 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014594 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014595 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014596 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014597 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014598 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014599 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014600 if test ${gcc_version} '<' 4.0
14601 then
14602 LIBTOOL_CRUFT="-lcc_dynamic"
14603 else
14604 LIBTOOL_CRUFT=""
14605 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014606 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014607 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014608else
14609 cat >conftest.$ac_ext <<_ACEOF
14610/* confdefs.h. */
14611_ACEOF
14612cat confdefs.h >>conftest.$ac_ext
14613cat >>conftest.$ac_ext <<_ACEOF
14614/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014615
Ronald Oussoren25967582009-09-06 10:00:26 +000014616 #include <unistd.h>
14617 int main(int argc, char*argv[])
14618 {
14619 if (sizeof(long) == 4) {
14620 return 0;
14621 } else {
14622 return 1;
14623 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014624 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014625
Ronald Oussoren25967582009-09-06 10:00:26 +000014626_ACEOF
14627rm -f conftest$ac_exeext
14628if { (ac_try="$ac_link"
14629case "(($ac_try" in
14630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14631 *) ac_try_echo=$ac_try;;
14632esac
14633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14634 (eval "$ac_link") 2>&5
14635 ac_status=$?
14636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14637 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14638 { (case "(($ac_try" in
14639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14640 *) ac_try_echo=$ac_try;;
14641esac
14642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14643 (eval "$ac_try") 2>&5
14644 ac_status=$?
14645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14646 (exit $ac_status); }; }; then
14647 ac_osx_32bit=yes
14648else
14649 echo "$as_me: program exited with status $ac_status" >&5
14650echo "$as_me: failed program was:" >&5
14651sed 's/^/| /' conftest.$ac_ext >&5
14652
14653( exit $ac_status )
14654ac_osx_32bit=no
14655fi
14656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14657fi
14658
14659
14660
14661 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014662 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014663 i386)
14664 MACOSX_DEFAULT_ARCH="i386"
14665 ;;
14666 ppc)
14667 MACOSX_DEFAULT_ARCH="ppc"
14668 ;;
14669 *)
14670 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14671echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14672 { (exit 1); exit 1; }; }
14673 ;;
14674 esac
14675 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014676 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014677 i386)
14678 MACOSX_DEFAULT_ARCH="x86_64"
14679 ;;
14680 ppc)
14681 MACOSX_DEFAULT_ARCH="ppc64"
14682 ;;
14683 *)
14684 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14685echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14686 { (exit 1); exit 1; }; }
14687 ;;
14688 esac
14689
14690 #ARCH_RUN_32BIT="true"
14691 fi
14692
14693 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014694 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014695 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014696esac
14697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014698{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14699echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014700if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014701then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014702 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014704 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014705
Martin v. Löwis11437992002-04-12 09:54:03 +000014706cat >>confdefs.h <<\_ACEOF
14707#define WITH_NEXT_FRAMEWORK 1
14708_ACEOF
14709
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014710 { echo "$as_me:$LINENO: result: yes" >&5
14711echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014712 if test $enable_shared = "yes"
14713 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014714 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14715echo "$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 +000014716 { (exit 1); exit 1; }; }
14717 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014719 { echo "$as_me:$LINENO: result: no" >&5
14720echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014721fi
14722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014723{ echo "$as_me:$LINENO: checking for dyld" >&5
14724echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014725case $ac_sys_system/$ac_sys_release in
14726 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728cat >>confdefs.h <<\_ACEOF
14729#define WITH_DYLD 1
14730_ACEOF
14731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014732 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14733echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014734 ;;
14735 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014736 { echo "$as_me:$LINENO: result: no" >&5
14737echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014738 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014739esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014740
Guido van Rossum0a516c91994-09-12 10:58:40 +000014741# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014742
Michael W. Hudson54241132001-12-07 15:38:26 +000014743
14744
14745
14746
Guido van Rossum0a516c91994-09-12 10:58:40 +000014747# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014748# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014749{ echo "$as_me:$LINENO: checking SO" >&5
14750echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014751if test -z "$SO"
14752then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014753 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014754 hp*|HP*)
14755 case `uname -m` in
14756 ia64) SO=.so;;
14757 *) SO=.sl;;
14758 esac
14759 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014760 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014761 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014762 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014763else
14764 # this might also be a termcap variable, see #610332
14765 echo
14766 echo '====================================================================='
14767 echo '+ +'
14768 echo '+ WARNING: You have set SO in your environment. +'
14769 echo '+ Do you really mean to change the extension for shared libraries? +'
14770 echo '+ Continuing in 10 seconds to let you to ponder. +'
14771 echo '+ +'
14772 echo '====================================================================='
14773 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014775{ echo "$as_me:$LINENO: result: $SO" >&5
14776echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014777
Ronald Oussoren79f90492009-01-02 10:44:46 +000014778
Neal Norwitz58e28882006-05-19 07:00:58 +000014779cat >>confdefs.h <<_ACEOF
14780#define SHLIB_EXT "$SO"
14781_ACEOF
14782
Guido van Rossum0a516c91994-09-12 10:58:40 +000014783# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014784# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014785# (Shared libraries in this instance are shared modules to be loaded into
14786# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014787{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14788echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014789if test -z "$LDSHARED"
14790then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014791 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014792 AIX*)
14793 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014794 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014795 ;;
14796 BeOS*)
14797 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014798 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014799 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014800 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014801 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014803 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014804 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014805 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014806 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014807 hp*|HP*)
14808 if test "$GCC" = "yes"
14809 then LDSHARED='$(CC) -shared'
14810 else LDSHARED='ld -b';
14811 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014812 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014813 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014814 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14815 if test "$enable_framework" ; then
14816 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014817 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14818 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014819 else
14820 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014821 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014822 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014823 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014824 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14825 if test "$enable_framework" ; then
14826 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014827 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14828 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014829 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014830 # No framework, use the Python app as bundle-loader
14831 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014832 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014833 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014834 Darwin/*)
14835 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14836 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014837
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014838 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014839 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014840 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014841 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014842 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014843 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14844 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014845 else
14846 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14847 if test "$enable_framework" ; then
14848 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014849 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14850 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014851 else
14852 # No framework, use the Python app as bundle-loader
14853 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14854 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14855 fi
14856 fi
14857 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014858 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014859 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014860 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014861 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014862 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014863 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014864 else
14865 LDSHARED="ld -Bshareable ${LDFLAGS}"
14866 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014867 OpenBSD*)
14868 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14869 then
14870 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14871 else
14872 case `uname -r` in
14873 [01].* | 2.[0-7] | 2.[0-7].*)
14874 LDSHARED="ld -Bshareable ${LDFLAGS}"
14875 ;;
14876 *)
14877 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14878 ;;
14879 esac
14880 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014881 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014882 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014883 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014884 then LDSHARED='$(CC) -shared'
14885 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014886 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014887 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014888 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014889 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014890 *) LDSHARED="ld";;
14891 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014892fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014893{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14894echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014895BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014896# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014897# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014898{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14899echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014900if test -z "$CCSHARED"
14901then
Guido van Rossum07397971997-04-29 21:49:50 +000014902 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014903 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014904 then CCSHARED="-fPIC";
14905 elif test `uname -p` = sparc;
14906 then CCSHARED="-xcode=pic32";
14907 else CCSHARED="-Kpic";
14908 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014909 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014910 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014911 else CCSHARED="+z";
14912 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014913 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014914 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014915 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014916 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014917 if test "$GCC" = "yes"
14918 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014919 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014920 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014921 SCO_SV*)
14922 if test "$GCC" = "yes"
14923 then CCSHARED="-fPIC"
14924 else CCSHARED="-Kpic -belf"
14925 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014926 IRIX*/6*) case $CC in
14927 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014928 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014929 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014930 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014931 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014933{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14934echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014935# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014936# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014937{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14938echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014939if test -z "$LINKFORSHARED"
14940then
Guido van Rossum07397971997-04-29 21:49:50 +000014941 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014942 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014943 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014944 LINKFORSHARED="-Wl,-E -Wl,+s";;
14945# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014946 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014947 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014948 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014950 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14951 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014952 # not used by the core itself but which needs to be in the core so
14953 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014954 # -prebind is no longer used, because it actually seems to give a
14955 # slowdown in stead of a speedup, maybe due to the large number of
14956 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014957
14958 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014959 if test "$enable_framework"
14960 then
Jack Jansenda49e192005-01-07 13:08:22 +000014961 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014962 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014963 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014964 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014965 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014966 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014967 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014968 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14969 then
14970 LINKFORSHARED="-Wl,--export-dynamic"
14971 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014972 SunOS/5*) case $CC in
14973 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014974 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014975 then
14976 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014977 fi;;
14978 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014979 CYGWIN*)
14980 if test $enable_shared = "no"
14981 then
14982 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14983 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014984 QNX*)
14985 # -Wl,-E causes the symbols to be added to the dynamic
14986 # symbol table so that they can be found when a module
14987 # is loaded. -N 2048K causes the stack size to be set
14988 # to 2048 kilobytes so that the stack doesn't overflow
14989 # when running test_compile.py.
14990 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014991 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014992fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014993{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14994echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014995
Michael W. Hudson54241132001-12-07 15:38:26 +000014996
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014997
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014998{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14999echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015000if test ! "$LIBRARY" = "$LDLIBRARY"
15001then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015002 case $ac_sys_system in
15003 CYGWIN*)
15004 # Cygwin needs CCSHARED when building extension DLLs
15005 # but not when building the interpreter DLL.
15006 CFLAGSFORSHARED='';;
15007 *)
15008 CFLAGSFORSHARED='$(CCSHARED)'
15009 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015010fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15012echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015013
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015014# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15015# library (with --enable-shared).
15016# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015017# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15018# if it is not required, since it creates a dependency of the shared library
15019# to LIBS. This, in turn, means that applications linking the shared libpython
15020# don't need to link LIBS explicitly. The default should be only changed
15021# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015023{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15024echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015025case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015026 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015027 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015029{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15030echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015031
15032
Guido van Rossum627b2d71993-12-24 10:39:16 +000015033# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015035{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15036echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015037if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015039else
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015041LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015042cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015043/* confdefs.h. */
15044_ACEOF
15045cat confdefs.h >>conftest.$ac_ext
15046cat >>conftest.$ac_ext <<_ACEOF
15047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015048
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049/* Override any GCC internal prototype to avoid an error.
15050 Use char because int might match the return type of a GCC
15051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015052#ifdef __cplusplus
15053extern "C"
15054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015055char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015056int
15057main ()
15058{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015059return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015060 ;
15061 return 0;
15062}
15063_ACEOF
15064rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065if { (ac_try="$ac_link"
15066case "(($ac_try" in
15067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15068 *) ac_try_echo=$ac_try;;
15069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015071 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015073 grep -v '^ *+' conftest.er1 >conftest.err
15074 rm -f conftest.er1
15075 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077 (exit $ac_status); } && {
15078 test -z "$ac_c_werror_flag" ||
15079 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015080 } && test -s conftest$ac_exeext &&
15081 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015083else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015085sed 's/^/| /' conftest.$ac_ext >&5
15086
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015089
15090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015092LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015093fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015094{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15095echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15096if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 cat >>confdefs.h <<_ACEOF
15098#define HAVE_LIBDL 1
15099_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015100
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015101 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103fi
15104 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015106{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15107echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015108if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015109 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015112LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015114/* confdefs.h. */
15115_ACEOF
15116cat confdefs.h >>conftest.$ac_ext
15117cat >>conftest.$ac_ext <<_ACEOF
15118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015119
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120/* Override any GCC internal prototype to avoid an error.
15121 Use char because int might match the return type of a GCC
15122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015123#ifdef __cplusplus
15124extern "C"
15125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015126char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015127int
15128main ()
15129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015130return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 ;
15132 return 0;
15133}
15134_ACEOF
15135rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015136if { (ac_try="$ac_link"
15137case "(($ac_try" in
15138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15139 *) ac_try_echo=$ac_try;;
15140esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015142 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 grep -v '^ *+' conftest.er1 >conftest.err
15145 rm -f conftest.er1
15146 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015148 (exit $ac_status); } && {
15149 test -z "$ac_c_werror_flag" ||
15150 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015151 } && test -s conftest$ac_exeext &&
15152 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015156sed 's/^/| /' conftest.$ac_ext >&5
15157
Martin v. Löwiseba40652007-08-30 20:10:57 +000015158 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160
15161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015163LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015164fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015165{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15166echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15167if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 cat >>confdefs.h <<_ACEOF
15169#define HAVE_LIBDLD 1
15170_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015171
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015172 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015174fi
15175 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015176
Ronald Oussoren79f90492009-01-02 10:44:46 +000015177# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015178if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015179 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15180echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015181if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015182 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015183else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015184 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015186/* confdefs.h. */
15187_ACEOF
15188cat confdefs.h >>conftest.$ac_ext
15189cat >>conftest.$ac_ext <<_ACEOF
15190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192/* Override any GCC internal prototype to avoid an error.
15193 Use char because int might match the return type of a GCC
15194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015195#ifdef __cplusplus
15196extern "C"
15197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015198char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015199int
15200main ()
15201{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ;
15204 return 0;
15205}
15206_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207for ac_lib in '' pthread rt posix4; do
15208 if test -z "$ac_lib"; then
15209 ac_res="none required"
15210 else
15211 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 fi
15214 rm -f conftest.$ac_objext conftest$ac_exeext
15215if { (ac_try="$ac_link"
15216case "(($ac_try" in
15217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15218 *) ac_try_echo=$ac_try;;
15219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015222 ac_status=$?
15223 grep -v '^ *+' conftest.er1 >conftest.err
15224 rm -f conftest.er1
15225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 (exit $ac_status); } && {
15228 test -z "$ac_c_werror_flag" ||
15229 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015230 } && test -s conftest$ac_exeext &&
15231 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015234 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015235sed 's/^/| /' conftest.$ac_ext >&5
15236
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237
Brett Cannon19fab762007-06-02 03:02:29 +000015238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239
15240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15241 conftest$ac_exeext
15242 if test "${ac_cv_search_sem_init+set}" = set; then
15243 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015245done
15246if test "${ac_cv_search_sem_init+set}" = set; then
15247 :
15248else
15249 ac_cv_search_sem_init=no
15250fi
15251rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015252LIBS=$ac_func_search_save_LIBS
15253fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015254{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15255echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015256ac_res=$ac_cv_search_sem_init
15257if test "$ac_res" != no; then
15258 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015259
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015260fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015261 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015262 # posix4 on Solaris 2.6
15263 # pthread (first!) on Linux
15264fi
15265
Martin v. Löwis19d17342003-06-14 21:03:05 +000015266# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015267{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15268echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015269if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015270 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015271else
15272 ac_check_lib_save_LIBS=$LIBS
15273LIBS="-lintl $LIBS"
15274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015275/* confdefs.h. */
15276_ACEOF
15277cat confdefs.h >>conftest.$ac_ext
15278cat >>conftest.$ac_ext <<_ACEOF
15279/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015280
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281/* Override any GCC internal prototype to avoid an error.
15282 Use char because int might match the return type of a GCC
15283 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015284#ifdef __cplusplus
15285extern "C"
15286#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015287char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015288int
15289main ()
15290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015291return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015292 ;
15293 return 0;
15294}
15295_ACEOF
15296rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297if { (ac_try="$ac_link"
15298case "(($ac_try" in
15299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15300 *) ac_try_echo=$ac_try;;
15301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015305 grep -v '^ *+' conftest.er1 >conftest.err
15306 rm -f conftest.er1
15307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309 (exit $ac_status); } && {
15310 test -z "$ac_c_werror_flag" ||
15311 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015312 } && test -s conftest$ac_exeext &&
15313 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015314 ac_cv_lib_intl_textdomain=yes
15315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015317sed 's/^/| /' conftest.$ac_ext >&5
15318
Martin v. Löwiseba40652007-08-30 20:10:57 +000015319 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321
15322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015323 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015324LIBS=$ac_check_lib_save_LIBS
15325fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015326{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15327echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15328if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015329
15330cat >>confdefs.h <<\_ACEOF
15331#define WITH_LIBINTL 1
15332_ACEOF
15333
15334fi
15335
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015336
15337# checks for system dependent C++ extensions support
15338case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015339 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15340echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015342/* confdefs.h. */
15343_ACEOF
15344cat confdefs.h >>conftest.$ac_ext
15345cat >>conftest.$ac_ext <<_ACEOF
15346/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015347#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015348int
15349main ()
15350{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015351loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 ;
15353 return 0;
15354}
15355_ACEOF
15356rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357if { (ac_try="$ac_link"
15358case "(($ac_try" in
15359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15360 *) ac_try_echo=$ac_try;;
15361esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015365 grep -v '^ *+' conftest.er1 >conftest.err
15366 rm -f conftest.er1
15367 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369 (exit $ac_status); } && {
15370 test -z "$ac_c_werror_flag" ||
15371 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015372 } && test -s conftest$ac_exeext &&
15373 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015374
Martin v. Löwis11437992002-04-12 09:54:03 +000015375cat >>confdefs.h <<\_ACEOF
15376#define AIX_GENUINE_CPLUSPLUS 1
15377_ACEOF
15378
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015379 { echo "$as_me:$LINENO: result: yes" >&5
15380echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015381else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015383sed 's/^/| /' conftest.$ac_ext >&5
15384
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015385 { echo "$as_me:$LINENO: result: no" >&5
15386echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388
15389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015390 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015391 *) ;;
15392esac
15393
Guido van Rossum70c7f481998-03-26 18:44:10 +000015394# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015395# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015396{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15397echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015400else
Martin v. Löwis11437992002-04-12 09:54:03 +000015401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015402LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015404/* confdefs.h. */
15405_ACEOF
15406cat confdefs.h >>conftest.$ac_ext
15407cat >>conftest.$ac_ext <<_ACEOF
15408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015409
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410/* Override any GCC internal prototype to avoid an error.
15411 Use char because int might match the return type of a GCC
15412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015413#ifdef __cplusplus
15414extern "C"
15415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015416char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015417int
15418main ()
15419{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 ;
15422 return 0;
15423}
15424_ACEOF
15425rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426if { (ac_try="$ac_link"
15427case "(($ac_try" in
15428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15429 *) ac_try_echo=$ac_try;;
15430esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015434 grep -v '^ *+' conftest.er1 >conftest.err
15435 rm -f conftest.er1
15436 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015438 (exit $ac_status); } && {
15439 test -z "$ac_c_werror_flag" ||
15440 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015441 } && test -s conftest$ac_exeext &&
15442 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015443 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015446sed 's/^/| /' conftest.$ac_ext >&5
15447
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015450
15451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015452 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015453LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015454fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015455{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15456echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15457if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015458 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015459fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015460 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015461{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15462echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015463if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015465else
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015467LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015469/* confdefs.h. */
15470_ACEOF
15471cat confdefs.h >>conftest.$ac_ext
15472cat >>conftest.$ac_ext <<_ACEOF
15473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015474
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475/* Override any GCC internal prototype to avoid an error.
15476 Use char because int might match the return type of a GCC
15477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015478#ifdef __cplusplus
15479extern "C"
15480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015481char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015482int
15483main ()
15484{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ;
15487 return 0;
15488}
15489_ACEOF
15490rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491if { (ac_try="$ac_link"
15492case "(($ac_try" in
15493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15494 *) ac_try_echo=$ac_try;;
15495esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015497 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015499 grep -v '^ *+' conftest.er1 >conftest.err
15500 rm -f conftest.er1
15501 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 (exit $ac_status); } && {
15504 test -z "$ac_c_werror_flag" ||
15505 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015506 } && test -s conftest$ac_exeext &&
15507 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015508 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015511sed 's/^/| /' conftest.$ac_ext >&5
15512
Martin v. Löwiseba40652007-08-30 20:10:57 +000015513 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515
15516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015518LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015519fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015520{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15521echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15522if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015523 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015524fi
15525 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015526
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015527case "$ac_sys_system" in
15528BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015529{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15530echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015531if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015532 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015533else
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015535LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* confdefs.h. */
15538_ACEOF
15539cat confdefs.h >>conftest.$ac_ext
15540cat >>conftest.$ac_ext <<_ACEOF
15541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015542
Martin v. Löwiseba40652007-08-30 20:10:57 +000015543/* Override any GCC internal prototype to avoid an error.
15544 Use char because int might match the return type of a GCC
15545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015546#ifdef __cplusplus
15547extern "C"
15548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015549char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015550int
15551main ()
15552{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015559if { (ac_try="$ac_link"
15560case "(($ac_try" in
15561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15562 *) ac_try_echo=$ac_try;;
15563esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567 grep -v '^ *+' conftest.er1 >conftest.err
15568 rm -f conftest.er1
15569 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015571 (exit $ac_status); } && {
15572 test -z "$ac_c_werror_flag" ||
15573 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015574 } && test -s conftest$ac_exeext &&
15575 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015579sed 's/^/| /' conftest.$ac_ext >&5
15580
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583
15584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015586LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015587fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015588{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15589echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15590if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015591 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015592fi
15593 # BeOS
15594;;
15595esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015597{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15598echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015599
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015601if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603{ echo "$as_me:$LINENO: result: $withval" >&5
15604echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015605LIBS="$withval $LIBS"
15606
15607else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015608 { echo "$as_me:$LINENO: result: no" >&5
15609echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610fi
15611
Guido van Rossum7f43da71994-08-01 12:15:30 +000015612
Benjamin Peterson2c196742009-12-31 03:17:18 +000015613# Check for use of the system expat library
15614{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15615echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15616
15617# Check whether --with-system_expat was given.
15618if test "${with_system_expat+set}" = set; then
15619 withval=$with_system_expat;
15620fi
15621
15622
15623{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15624echo "${ECHO_T}$with_system_expat" >&6; }
15625
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015626# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015627{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15628echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015629
Martin v. Löwiseba40652007-08-30 20:10:57 +000015630# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015631if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015632 withval=$with_system_ffi;
15633fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015634
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015635
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015636if test "$with_system_ffi" = "yes"; then
15637 if test -n "$ac_tool_prefix"; then
15638 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15639set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15640{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15641echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15642if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15643 echo $ECHO_N "(cached) $ECHO_C" >&6
15644else
15645 case $PKG_CONFIG in
15646 [\\/]* | ?:[\\/]*)
15647 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15648 ;;
15649 *)
15650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15651for as_dir in $PATH
15652do
15653 IFS=$as_save_IFS
15654 test -z "$as_dir" && as_dir=.
15655 for ac_exec_ext in '' $ac_executable_extensions; do
15656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15657 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15658 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15659 break 2
15660 fi
15661done
15662done
15663IFS=$as_save_IFS
15664
15665 ;;
15666esac
15667fi
15668PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15669if test -n "$PKG_CONFIG"; then
15670 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15671echo "${ECHO_T}$PKG_CONFIG" >&6; }
15672else
15673 { echo "$as_me:$LINENO: result: no" >&5
15674echo "${ECHO_T}no" >&6; }
15675fi
15676
15677
15678fi
15679if test -z "$ac_cv_path_PKG_CONFIG"; then
15680 ac_pt_PKG_CONFIG=$PKG_CONFIG
15681 # Extract the first word of "pkg-config", so it can be a program name with args.
15682set dummy pkg-config; ac_word=$2
15683{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15684echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15685if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15686 echo $ECHO_N "(cached) $ECHO_C" >&6
15687else
15688 case $ac_pt_PKG_CONFIG in
15689 [\\/]* | ?:[\\/]*)
15690 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15691 ;;
15692 *)
15693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15694for as_dir in $PATH
15695do
15696 IFS=$as_save_IFS
15697 test -z "$as_dir" && as_dir=.
15698 for ac_exec_ext in '' $ac_executable_extensions; do
15699 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15700 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15701 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15702 break 2
15703 fi
15704done
15705done
15706IFS=$as_save_IFS
15707
15708 ;;
15709esac
15710fi
15711ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15712if test -n "$ac_pt_PKG_CONFIG"; then
15713 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15714echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15715else
15716 { echo "$as_me:$LINENO: result: no" >&5
15717echo "${ECHO_T}no" >&6; }
15718fi
15719
15720 if test "x$ac_pt_PKG_CONFIG" = x; then
15721 PKG_CONFIG=""
15722 else
15723 case $cross_compiling:$ac_tool_warned in
15724yes:)
15725{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15726whose name does not start with the host triplet. If you think this
15727configuration is useful to you, please write to autoconf@gnu.org." >&5
15728echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15729whose name does not start with the host triplet. If you think this
15730configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15731ac_tool_warned=yes ;;
15732esac
15733 PKG_CONFIG=$ac_pt_PKG_CONFIG
15734 fi
15735else
15736 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15737fi
15738
15739 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15740else
15741 LIBFFI_INCLUDEDIR=""
15742fi
15743
15744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015745{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15746echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015747
Benjamin Peterson867475c2009-04-29 20:36:25 +000015748# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015749{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15750echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015751
15752# Check whether --with-dbmliborder was given.
15753if test "${with_dbmliborder+set}" = set; then
15754 withval=$with_dbmliborder;
15755if test x$with_dbmliborder = xyes
15756then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015757{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15758echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015759 { (exit 1); exit 1; }; }
15760else
15761 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15762 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15763 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015764 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15765echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015766 { (exit 1); exit 1; }; }
15767 fi
15768 done
15769fi
15770fi
15771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015772{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15773echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015774
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015775# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015776
15777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015778{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15779echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015782if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783 withval=$with_signal_module;
15784fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015785
15786
15787if test -z "$with_signal_module"
15788then with_signal_module="yes"
15789fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015790{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15791echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015792
15793if test "${with_signal_module}" = "yes"; then
15794 USE_SIGNAL_MODULE=""
15795 SIGNAL_OBJS=""
15796else
15797 USE_SIGNAL_MODULE="#"
15798 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15799fi
15800
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015801# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015802
Barry Warsawc0d24d82000-06-29 16:12:00 +000015803USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015804
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015805{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15806echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015807
Guido van Rossumec2f0731997-01-22 20:54:01 +000015808
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015810if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015812{ echo "$as_me:$LINENO: result: $withval" >&5
15813echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015814LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015815if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015816 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015817fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015818else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015819 { echo "$as_me:$LINENO: result: no" >&5
15820echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015821fi
15822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823
15824# Templates for things AC_DEFINEd more than once.
15825# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015826
15827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
15829
15830
15831
15832
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015833{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15834echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015837if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838 withval=$with_threads;
15839fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015840
15841
Barry Warsawc0d24d82000-06-29 16:12:00 +000015842# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015843
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015845if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846 withval=$with_thread; with_threads=$with_thread
15847fi
15848
Barry Warsawc0d24d82000-06-29 16:12:00 +000015849
15850if test -z "$with_threads"
15851then with_threads="yes"
15852fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853{ echo "$as_me:$LINENO: result: $with_threads" >&5
15854echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015855
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015856
Barry Warsawc0d24d82000-06-29 16:12:00 +000015857if test "$with_threads" = "no"
15858then
15859 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015860elif test "$ac_cv_pthread_is_default" = yes
15861then
Martin v. Löwis11437992002-04-12 09:54:03 +000015862 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015863#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015864_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015865
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015866 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015868#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015870
15871 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015873elif test "$ac_cv_kpthread" = "yes"
15874then
15875 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015876 if test "$ac_cv_cxx_thread" = "yes"; then
15877 CXX="$CXX -Kpthread"
15878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015879 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015880#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015881_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015883 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015884 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015885elif test "$ac_cv_kthread" = "yes"
15886then
15887 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015888 if test "$ac_cv_cxx_thread" = "yes"; then
15889 CXX="$CXX -Kthread"
15890 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015891 cat >>confdefs.h <<\_ACEOF
15892#define WITH_THREAD 1
15893_ACEOF
15894
15895 posix_threads=yes
15896 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015897elif test "$ac_cv_pthread" = "yes"
15898then
15899 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015900 if test "$ac_cv_cxx_thread" = "yes"; then
15901 CXX="$CXX -pthread"
15902 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015903 cat >>confdefs.h <<\_ACEOF
15904#define WITH_THREAD 1
15905_ACEOF
15906
15907 posix_threads=yes
15908 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015909else
15910 if test ! -z "$with_threads" -a -d "$with_threads"
15911 then LDFLAGS="$LDFLAGS -L$with_threads"
15912 fi
15913 if test ! -z "$withval" -a -d "$withval"
15914 then LDFLAGS="$LDFLAGS -L$withval"
15915 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015916
15917 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015918 # define _POSIX_THREADS in unistd.h. Some apparently don't
15919 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015920 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15921echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015923/* confdefs.h. */
15924_ACEOF
15925cat confdefs.h >>conftest.$ac_ext
15926cat >>conftest.$ac_ext <<_ACEOF
15927/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015928
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015929#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015930#ifdef _POSIX_THREADS
15931yes
15932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
15934_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015936 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015937 unistd_defines_pthreads=yes
15938else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015939 unistd_defines_pthreads=no
15940fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000015941rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015943 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15944echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015945
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015947#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015948_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015949
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015951 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15952echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015953if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015955fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015956{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15957echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015958else
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015960{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15961echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015963/* confdefs.h. */
15964_ACEOF
15965cat confdefs.h >>conftest.$ac_ext
15966cat >>conftest.$ac_ext <<_ACEOF
15967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015968$ac_includes_default
15969#include <cthreads.h>
15970_ACEOF
15971rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972if { (ac_try="$ac_compile"
15973case "(($ac_try" in
15974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15975 *) ac_try_echo=$ac_try;;
15976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015980 grep -v '^ *+' conftest.er1 >conftest.err
15981 rm -f conftest.er1
15982 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984 (exit $ac_status); } && {
15985 test -z "$ac_c_werror_flag" ||
15986 test ! -s conftest.err
15987 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 ac_header_compiler=yes
15989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015991sed 's/^/| /' conftest.$ac_ext >&5
15992
Martin v. Löwiseba40652007-08-30 20:10:57 +000015993 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015995
15996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015997{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15998echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015999
16000# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16002echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016004/* confdefs.h. */
16005_ACEOF
16006cat confdefs.h >>conftest.$ac_ext
16007cat >>conftest.$ac_ext <<_ACEOF
16008/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016009#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016010_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011if { (ac_try="$ac_cpp conftest.$ac_ext"
16012case "(($ac_try" in
16013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16014 *) ac_try_echo=$ac_try;;
16015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016018 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016019 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 rm -f conftest.er1
16021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023 (exit $ac_status); } >/dev/null && {
16024 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16025 test ! -s conftest.err
16026 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 ac_header_preproc=yes
16028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016030sed 's/^/| /' conftest.$ac_ext >&5
16031
Martin v. Löwis11437992002-04-12 09:54:03 +000016032 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016034
Martin v. Löwis11437992002-04-12 09:54:03 +000016035rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016036{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16037echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016038
16039# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016040case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16041 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016042 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16043echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16044 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16045echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016046 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016047 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016048 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016049 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16050echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16051 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16052echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16053 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16054echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16055 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16056echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16057 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16058echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16059 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16060echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016062## -------------------------------------- ##
16063## Report this to http://bugs.python.org/ ##
16064## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016065_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016067 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016069{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16070echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016071if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016073else
16074 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016076{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16077echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016078
16079fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016080if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016082#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016083_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016084
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016086#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016087_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016088
Martin v. Löwis11437992002-04-12 09:54:03 +000016089
16090cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016091#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016093
16094 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016095 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016096else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016097
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016099 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16100echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016101if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016103fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16105echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016106else
Martin v. Löwis11437992002-04-12 09:54:03 +000016107 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016108{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16109echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* confdefs.h. */
16112_ACEOF
16113cat confdefs.h >>conftest.$ac_ext
16114cat >>conftest.$ac_ext <<_ACEOF
16115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016116$ac_includes_default
16117#include <mach/cthreads.h>
16118_ACEOF
16119rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016120if { (ac_try="$ac_compile"
16121case "(($ac_try" in
16122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16123 *) ac_try_echo=$ac_try;;
16124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016128 grep -v '^ *+' conftest.er1 >conftest.err
16129 rm -f conftest.er1
16130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 (exit $ac_status); } && {
16133 test -z "$ac_c_werror_flag" ||
16134 test ! -s conftest.err
16135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 ac_header_compiler=yes
16137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016139sed 's/^/| /' conftest.$ac_ext >&5
16140
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143
16144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016145{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16146echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016147
16148# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016149{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16150echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016152/* confdefs.h. */
16153_ACEOF
16154cat confdefs.h >>conftest.$ac_ext
16155cat >>conftest.$ac_ext <<_ACEOF
16156/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016157#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016158_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159if { (ac_try="$ac_cpp conftest.$ac_ext"
16160case "(($ac_try" in
16161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16162 *) ac_try_echo=$ac_try;;
16163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016166 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016167 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 rm -f conftest.er1
16169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171 (exit $ac_status); } >/dev/null && {
16172 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16173 test ! -s conftest.err
16174 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 ac_header_preproc=yes
16176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016178sed 's/^/| /' conftest.$ac_ext >&5
16179
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182
Martin v. Löwis11437992002-04-12 09:54:03 +000016183rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16185echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016186
16187# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016188case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16189 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016190 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16191echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16192 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16193echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016195 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016196 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16198echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16199 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16200echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16201 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16202echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16203 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16204echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16205 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16206echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16207 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16208echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016209 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016210## -------------------------------------- ##
16211## Report this to http://bugs.python.org/ ##
16212## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016213_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016214 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016215 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16218echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016219if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016221else
16222 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016224{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16225echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016226
16227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016228if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016231_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016232
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016234#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016235_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016236
Martin v. Löwis11437992002-04-12 09:54:03 +000016237
16238cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016239#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016240_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016241
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016242 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016243else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016245 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16246echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016247
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016249if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016250 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16251echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016252 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016253#define WITH_THREAD 1
16254_ACEOF
16255
16256
16257cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016258#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016259_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016260
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016261 LIBS="-lpth $LIBS"
16262 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016263else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016264 { echo "$as_me:$LINENO: result: no" >&5
16265echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016266
16267 # Just looking for pthread_create in libpthread is not enough:
16268 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16269 # So we really have to include pthread.h, and then link.
16270 _libs=$LIBS
16271 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016272 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16273echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016275/* confdefs.h. */
16276_ACEOF
16277cat confdefs.h >>conftest.$ac_ext
16278cat >>conftest.$ac_ext <<_ACEOF
16279/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016280#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016281
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016282void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016283int
16284main ()
16285{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016286
16287pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 ;
16289 return 0;
16290}
16291_ACEOF
16292rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293if { (ac_try="$ac_link"
16294case "(($ac_try" in
16295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16296 *) ac_try_echo=$ac_try;;
16297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016299 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301 grep -v '^ *+' conftest.er1 >conftest.err
16302 rm -f conftest.er1
16303 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305 (exit $ac_status); } && {
16306 test -z "$ac_c_werror_flag" ||
16307 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016308 } && test -s conftest$ac_exeext &&
16309 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016311 { echo "$as_me:$LINENO: result: yes" >&5
16312echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016314#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016315_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016316
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016317 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016318 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016319else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016321sed 's/^/| /' conftest.$ac_ext >&5
16322
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016324 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016325 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16326echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016327if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016329else
Martin v. Löwis11437992002-04-12 09:54:03 +000016330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016331/* confdefs.h. */
16332_ACEOF
16333cat confdefs.h >>conftest.$ac_ext
16334cat >>conftest.$ac_ext <<_ACEOF
16335/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016336/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16337 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16338#define pthread_detach innocuous_pthread_detach
16339
Guido van Rossumad678af1998-10-02 14:42:15 +000016340/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016341 which can conflict with char pthread_detach (); below.
16342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016343 <limits.h> exists even on freestanding compilers. */
16344
16345#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016346# include <limits.h>
16347#else
16348# include <assert.h>
16349#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016350
16351#undef pthread_detach
16352
Martin v. Löwiseba40652007-08-30 20:10:57 +000016353/* Override any GCC internal prototype to avoid an error.
16354 Use char because int might match the return type of a GCC
16355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016356#ifdef __cplusplus
16357extern "C"
16358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016359char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016360/* The GNU C library defines this for functions which it implements
16361 to always fail with ENOSYS. Some functions are actually named
16362 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016364choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016365#endif
16366
Skip Montanaro6dead952003-09-25 14:50:04 +000016367int
16368main ()
16369{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016370return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 ;
16372 return 0;
16373}
16374_ACEOF
16375rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016376if { (ac_try="$ac_link"
16377case "(($ac_try" in
16378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16379 *) ac_try_echo=$ac_try;;
16380esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016382 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016384 grep -v '^ *+' conftest.er1 >conftest.err
16385 rm -f conftest.er1
16386 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388 (exit $ac_status); } && {
16389 test -z "$ac_c_werror_flag" ||
16390 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016391 } && test -s conftest$ac_exeext &&
16392 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016394else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016396sed 's/^/| /' conftest.$ac_ext >&5
16397
Martin v. Löwiseba40652007-08-30 20:10:57 +000016398 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400
16401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016402 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016403fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016404{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16405echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16406if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016408#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016409_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016410
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016411 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016412 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016413else
Guido van Rossumad678af1998-10-02 14:42:15 +000016414
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016415 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016416 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16417echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016418if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016419 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016420fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016421{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16422echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016423else
16424 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016425{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16426echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016428/* confdefs.h. */
16429_ACEOF
16430cat confdefs.h >>conftest.$ac_ext
16431cat >>conftest.$ac_ext <<_ACEOF
16432/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016433$ac_includes_default
16434#include <atheos/threads.h>
16435_ACEOF
16436rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016437if { (ac_try="$ac_compile"
16438case "(($ac_try" in
16439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16440 *) ac_try_echo=$ac_try;;
16441esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016445 grep -v '^ *+' conftest.er1 >conftest.err
16446 rm -f conftest.er1
16447 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016449 (exit $ac_status); } && {
16450 test -z "$ac_c_werror_flag" ||
16451 test ! -s conftest.err
16452 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016453 ac_header_compiler=yes
16454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016456sed 's/^/| /' conftest.$ac_ext >&5
16457
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016460
16461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16463echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016464
16465# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016466{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16467echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016469/* confdefs.h. */
16470_ACEOF
16471cat confdefs.h >>conftest.$ac_ext
16472cat >>conftest.$ac_ext <<_ACEOF
16473/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016474#include <atheos/threads.h>
16475_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476if { (ac_try="$ac_cpp conftest.$ac_ext"
16477case "(($ac_try" in
16478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16479 *) ac_try_echo=$ac_try;;
16480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016483 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016484 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016485 rm -f conftest.er1
16486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016488 (exit $ac_status); } >/dev/null && {
16489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16490 test ! -s conftest.err
16491 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016492 ac_header_preproc=yes
16493else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016495sed 's/^/| /' conftest.$ac_ext >&5
16496
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016497 ac_header_preproc=no
16498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016499
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016500rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016501{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16502echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016503
16504# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016505case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16506 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016507 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16508echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16509 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16510echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016511 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016512 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016513 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016514 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16515echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16516 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16517echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16518 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16519echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16520 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16521echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16522 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16523echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16524 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16525echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016526 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016527## -------------------------------------- ##
16528## Report this to http://bugs.python.org/ ##
16529## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016530_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016532 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016534{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16535echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016536if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016538else
16539 ac_cv_header_atheos_threads_h=$ac_header_preproc
16540fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016541{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16542echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016543
16544fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016545if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016546 cat >>confdefs.h <<\_ACEOF
16547#define WITH_THREAD 1
16548_ACEOF
16549
16550
16551cat >>confdefs.h <<\_ACEOF
16552#define ATHEOS_THREADS 1
16553_ACEOF
16554
16555 THREADOBJ="Python/thread.o"
16556else
16557
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16560echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016561if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016563fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016564{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16565echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016566else
Martin v. Löwis11437992002-04-12 09:54:03 +000016567 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016568{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16569echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016571/* confdefs.h. */
16572_ACEOF
16573cat confdefs.h >>conftest.$ac_ext
16574cat >>conftest.$ac_ext <<_ACEOF
16575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016576$ac_includes_default
16577#include <kernel/OS.h>
16578_ACEOF
16579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580if { (ac_try="$ac_compile"
16581case "(($ac_try" in
16582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16583 *) ac_try_echo=$ac_try;;
16584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016588 grep -v '^ *+' conftest.er1 >conftest.err
16589 rm -f conftest.er1
16590 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016592 (exit $ac_status); } && {
16593 test -z "$ac_c_werror_flag" ||
16594 test ! -s conftest.err
16595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 ac_header_compiler=yes
16597else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016599sed 's/^/| /' conftest.$ac_ext >&5
16600
Martin v. Löwiseba40652007-08-30 20:10:57 +000016601 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016603
16604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016605{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16606echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016607
16608# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016609{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16610echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016612/* confdefs.h. */
16613_ACEOF
16614cat confdefs.h >>conftest.$ac_ext
16615cat >>conftest.$ac_ext <<_ACEOF
16616/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016617#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016618_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016619if { (ac_try="$ac_cpp conftest.$ac_ext"
16620case "(($ac_try" in
16621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16622 *) ac_try_echo=$ac_try;;
16623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016627 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 rm -f conftest.er1
16629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016631 (exit $ac_status); } >/dev/null && {
16632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16633 test ! -s conftest.err
16634 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016635 ac_header_preproc=yes
16636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016638sed 's/^/| /' conftest.$ac_ext >&5
16639
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016642
Martin v. Löwis11437992002-04-12 09:54:03 +000016643rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016644{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16645echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016646
Martin v. Löwis11437992002-04-12 09:54:03 +000016647# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16649 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016650 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16651echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16652 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16653echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016654 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016655 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016656 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016657 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16658echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16659 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16660echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16661 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16662echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16663 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16664echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16665 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16666echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16667 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16668echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016670## -------------------------------------- ##
16671## Report this to http://bugs.python.org/ ##
16672## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016673_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016674 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016677{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16678echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016679if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016681else
16682 ac_cv_header_kernel_OS_h=$ac_header_preproc
16683fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016684{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16685echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016686
16687fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016688if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 cat >>confdefs.h <<\_ACEOF
16690#define WITH_THREAD 1
16691_ACEOF
16692
16693
16694cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016695#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016696_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016697
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016698 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016699else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016700
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016701 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16702echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016703if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016705else
Martin v. Löwis11437992002-04-12 09:54:03 +000016706 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016707LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016708cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016709/* confdefs.h. */
16710_ACEOF
16711cat confdefs.h >>conftest.$ac_ext
16712cat >>conftest.$ac_ext <<_ACEOF
16713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016714
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715/* Override any GCC internal prototype to avoid an error.
16716 Use char because int might match the return type of a GCC
16717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016718#ifdef __cplusplus
16719extern "C"
16720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016721char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016722int
16723main ()
16724{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016725return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 ;
16727 return 0;
16728}
16729_ACEOF
16730rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016731if { (ac_try="$ac_link"
16732case "(($ac_try" in
16733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16734 *) ac_try_echo=$ac_try;;
16735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016737 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016739 grep -v '^ *+' conftest.er1 >conftest.err
16740 rm -f conftest.er1
16741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016743 (exit $ac_status); } && {
16744 test -z "$ac_c_werror_flag" ||
16745 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016746 } && test -s conftest$ac_exeext &&
16747 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016748 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016749else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016751sed 's/^/| /' conftest.$ac_ext >&5
16752
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016755
16756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016758LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016759fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016760{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16761echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16762if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016764#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016765_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016766
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016767 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016768 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016769 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016770else
Greg Steinadf63d62000-07-05 10:38:09 +000016771
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016772 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16773echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016774if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016775 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016776else
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016778LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016780/* confdefs.h. */
16781_ACEOF
16782cat confdefs.h >>conftest.$ac_ext
16783cat >>conftest.$ac_ext <<_ACEOF
16784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
Martin v. Löwiseba40652007-08-30 20:10:57 +000016786/* Override any GCC internal prototype to avoid an error.
16787 Use char because int might match the return type of a GCC
16788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016789#ifdef __cplusplus
16790extern "C"
16791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016792char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016793int
16794main ()
16795{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 ;
16798 return 0;
16799}
16800_ACEOF
16801rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016802if { (ac_try="$ac_link"
16803case "(($ac_try" in
16804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16805 *) ac_try_echo=$ac_try;;
16806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016810 grep -v '^ *+' conftest.er1 >conftest.err
16811 rm -f conftest.er1
16812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814 (exit $ac_status); } && {
16815 test -z "$ac_c_werror_flag" ||
16816 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016817 } && test -s conftest$ac_exeext &&
16818 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016822sed 's/^/| /' conftest.$ac_ext >&5
16823
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826
16827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016829LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016831{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16832echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16833if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016835#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016836_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016837
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016838 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016839 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016840 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016841else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016842
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016843 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16844echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016845if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016847else
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016849LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016851/* confdefs.h. */
16852_ACEOF
16853cat confdefs.h >>conftest.$ac_ext
16854cat >>conftest.$ac_ext <<_ACEOF
16855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
Martin v. Löwiseba40652007-08-30 20:10:57 +000016857/* Override any GCC internal prototype to avoid an error.
16858 Use char because int might match the return type of a GCC
16859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016860#ifdef __cplusplus
16861extern "C"
16862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016863char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016864int
16865main ()
16866{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016867return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016868 ;
16869 return 0;
16870}
16871_ACEOF
16872rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873if { (ac_try="$ac_link"
16874case "(($ac_try" in
16875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16876 *) ac_try_echo=$ac_try;;
16877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016879 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016881 grep -v '^ *+' conftest.er1 >conftest.err
16882 rm -f conftest.er1
16883 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885 (exit $ac_status); } && {
16886 test -z "$ac_c_werror_flag" ||
16887 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016888 } && test -s conftest$ac_exeext &&
16889 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016890 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016891else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016893sed 's/^/| /' conftest.$ac_ext >&5
16894
Martin v. Löwiseba40652007-08-30 20:10:57 +000016895 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016896fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016897
16898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016901fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016902{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16903echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16904if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016906#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016907_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016908
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016909 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016910 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016911 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016912else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016913
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016914 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16915echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016916if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016917 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016918else
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016920LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016922/* confdefs.h. */
16923_ACEOF
16924cat confdefs.h >>conftest.$ac_ext
16925cat >>conftest.$ac_ext <<_ACEOF
16926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016927
Martin v. Löwiseba40652007-08-30 20:10:57 +000016928/* Override any GCC internal prototype to avoid an error.
16929 Use char because int might match the return type of a GCC
16930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016931#ifdef __cplusplus
16932extern "C"
16933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016934char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016935int
16936main ()
16937{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 ;
16940 return 0;
16941}
16942_ACEOF
16943rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016944if { (ac_try="$ac_link"
16945case "(($ac_try" in
16946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16947 *) ac_try_echo=$ac_try;;
16948esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016950 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016952 grep -v '^ *+' conftest.er1 >conftest.err
16953 rm -f conftest.er1
16954 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016956 (exit $ac_status); } && {
16957 test -z "$ac_c_werror_flag" ||
16958 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016959 } && test -s conftest$ac_exeext &&
16960 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016964sed 's/^/| /' conftest.$ac_ext >&5
16965
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016968
16969rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016970 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016971LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016973{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16974echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16975if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016977#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016978_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016980 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016981 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016982 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016983else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016984
Martin v. Löwis130fb172001-07-19 11:00:41 +000016985 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016986fi
16987
Guido van Rossum627b2d71993-12-24 10:39:16 +000016988
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016989fi
16990
Guido van Rossum0be3e491997-05-22 20:33:33 +000016991fi
16992
Guido van Rossum49545951997-12-02 19:28:29 +000016993fi
16994
Guido van Rossumb93a8621998-05-07 13:27:32 +000016995fi
16996
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016997
Michael W. Hudson54241132001-12-07 15:38:26 +000016998fi
16999
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017000
17001fi
17002
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017004
17005rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017006 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007fi
17008
Martin v. Löwis11437992002-04-12 09:54:03 +000017009fi
17010
17011
17012fi
17013
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017014
Michael W. Hudson54241132001-12-07 15:38:26 +000017015
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017016 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17017echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017018if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017019 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017020else
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017022LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017024/* confdefs.h. */
17025_ACEOF
17026cat confdefs.h >>conftest.$ac_ext
17027cat >>conftest.$ac_ext <<_ACEOF
17028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017029
Martin v. Löwiseba40652007-08-30 20:10:57 +000017030/* Override any GCC internal prototype to avoid an error.
17031 Use char because int might match the return type of a GCC
17032 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017033#ifdef __cplusplus
17034extern "C"
17035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017036char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017037int
17038main ()
17039{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017040return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 ;
17042 return 0;
17043}
17044_ACEOF
17045rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046if { (ac_try="$ac_link"
17047case "(($ac_try" in
17048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17049 *) ac_try_echo=$ac_try;;
17050esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017052 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017054 grep -v '^ *+' conftest.er1 >conftest.err
17055 rm -f conftest.er1
17056 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017058 (exit $ac_status); } && {
17059 test -z "$ac_c_werror_flag" ||
17060 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017061 } && test -s conftest$ac_exeext &&
17062 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017064else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017066sed 's/^/| /' conftest.$ac_ext >&5
17067
Martin v. Löwiseba40652007-08-30 20:10:57 +000017068 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017070
17071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017073LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017074fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017075{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17076echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17077if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017079#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017080_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017081
Martin v. Löwis130fb172001-07-19 11:00:41 +000017082 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017083 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017084 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017085fi
17086
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017087
Neal Norwitza978ab02002-11-02 16:58:05 +000017088 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017089 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17090echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017091if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017093else
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017095LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017097/* confdefs.h. */
17098_ACEOF
17099cat confdefs.h >>conftest.$ac_ext
17100cat >>conftest.$ac_ext <<_ACEOF
17101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017102
Martin v. Löwiseba40652007-08-30 20:10:57 +000017103/* Override any GCC internal prototype to avoid an error.
17104 Use char because int might match the return type of a GCC
17105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017106#ifdef __cplusplus
17107extern "C"
17108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017109char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017110int
17111main ()
17112{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017114 ;
17115 return 0;
17116}
17117_ACEOF
17118rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017119if { (ac_try="$ac_link"
17120case "(($ac_try" in
17121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17122 *) ac_try_echo=$ac_try;;
17123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127 grep -v '^ *+' conftest.er1 >conftest.err
17128 rm -f conftest.er1
17129 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017131 (exit $ac_status); } && {
17132 test -z "$ac_c_werror_flag" ||
17133 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017134 } && test -s conftest$ac_exeext &&
17135 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017139sed 's/^/| /' conftest.$ac_ext >&5
17140
Martin v. Löwiseba40652007-08-30 20:10:57 +000017141 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017143
17144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017146LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017147fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017148{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17149echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17150if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017152#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017153_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017154
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017155 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017156 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017157 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017158fi
17159
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017160 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017161
Martin v. Löwis130fb172001-07-19 11:00:41 +000017162 if test "$USE_THREAD_MODULE" != "#"
17163 then
17164 # If the above checks didn't disable threads, (at least) OSF1
17165 # needs this '-threads' argument during linking.
17166 case $ac_sys_system in
17167 OSF1) LDLAST=-threads;;
17168 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017169 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017170fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017171
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017172if test "$posix_threads" = "yes"; then
17173 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017174
17175cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017176#define _POSIX_THREADS 1
17177_ACEOF
17178
17179 fi
17180
17181 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17182 case $ac_sys_system/$ac_sys_release in
17183 SunOS/5.6)
17184cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017185#define HAVE_PTHREAD_DESTRUCTOR 1
17186_ACEOF
17187
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017188 ;;
17189 SunOS/5.8)
17190cat >>confdefs.h <<\_ACEOF
17191#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17192_ACEOF
17193
17194 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017195 AIX/5)
17196cat >>confdefs.h <<\_ACEOF
17197#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17198_ACEOF
17199
17200 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017201 esac
17202
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017203 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17204echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017205 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017206 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017207else
17208 if test "$cross_compiling" = yes; then
17209 ac_cv_pthread_system_supported=no
17210else
17211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017212/* confdefs.h. */
17213_ACEOF
17214cat confdefs.h >>conftest.$ac_ext
17215cat >>conftest.$ac_ext <<_ACEOF
17216/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017217#include <pthread.h>
17218 void *foo(void *parm) {
17219 return NULL;
17220 }
17221 main() {
17222 pthread_attr_t attr;
17223 pthread_t id;
17224 if (pthread_attr_init(&attr)) exit(-1);
17225 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17226 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17227 exit(0);
17228 }
17229_ACEOF
17230rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017231if { (ac_try="$ac_link"
17232case "(($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_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017238 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017241 { (case "(($ac_try" in
17242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17243 *) ac_try_echo=$ac_try;;
17244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017246 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017247 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017249 (exit $ac_status); }; }; then
17250 ac_cv_pthread_system_supported=yes
17251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017252 echo "$as_me: program exited with status $ac_status" >&5
17253echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017254sed 's/^/| /' conftest.$ac_ext >&5
17255
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017256( exit $ac_status )
17257ac_cv_pthread_system_supported=no
17258fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017259rm -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 +000017260fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017261
Martin v. Löwiseba40652007-08-30 20:10:57 +000017262
17263
Guido van Rossum627b2d71993-12-24 10:39:16 +000017264fi
17265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017266 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17267echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017268 if test "$ac_cv_pthread_system_supported" = "yes"; then
17269
17270cat >>confdefs.h <<\_ACEOF
17271#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17272_ACEOF
17273
17274 fi
17275
17276for ac_func in pthread_sigmask
17277do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017283else
17284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017285/* confdefs.h. */
17286_ACEOF
17287cat confdefs.h >>conftest.$ac_ext
17288cat >>conftest.$ac_ext <<_ACEOF
17289/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17292#define $ac_func innocuous_$ac_func
17293
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017294/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017295 which can conflict with char $ac_func (); below.
17296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017297 <limits.h> exists even on freestanding compilers. */
17298
17299#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017300# include <limits.h>
17301#else
17302# include <assert.h>
17303#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017304
17305#undef $ac_func
17306
Martin v. Löwiseba40652007-08-30 20:10:57 +000017307/* Override any GCC internal prototype to avoid an error.
17308 Use char because int might match the return type of a GCC
17309 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017310#ifdef __cplusplus
17311extern "C"
17312#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017313char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017314/* The GNU C library defines this for functions which it implements
17315 to always fail with ENOSYS. Some functions are actually named
17316 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017317#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017318choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017319#endif
17320
Skip Montanaro6dead952003-09-25 14:50:04 +000017321int
17322main ()
17323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017324return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017325 ;
17326 return 0;
17327}
17328_ACEOF
17329rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017330if { (ac_try="$ac_link"
17331case "(($ac_try" in
17332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17333 *) ac_try_echo=$ac_try;;
17334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017338 grep -v '^ *+' conftest.er1 >conftest.err
17339 rm -f conftest.er1
17340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017342 (exit $ac_status); } && {
17343 test -z "$ac_c_werror_flag" ||
17344 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017345 } && test -s conftest$ac_exeext &&
17346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017347 eval "$as_ac_var=yes"
17348else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017350sed 's/^/| /' conftest.$ac_ext >&5
17351
Martin v. Löwiseba40652007-08-30 20:10:57 +000017352 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017354
17355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017357fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017358ac_res=`eval echo '${'$as_ac_var'}'`
17359 { echo "$as_me:$LINENO: result: $ac_res" >&5
17360echo "${ECHO_T}$ac_res" >&6; }
17361if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017362 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017364_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017365 case $ac_sys_system in
17366 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017367
Jason Tishlerfac083d2003-07-22 15:20:49 +000017368cat >>confdefs.h <<\_ACEOF
17369#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17370_ACEOF
17371
17372 ;;
17373 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017374fi
17375done
17376
17377fi
17378
17379
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017380# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017381
17382
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017383{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17384echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017385# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017386if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017387 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017388 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017389 { echo "$as_me:$LINENO: result: no" >&5
17390echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017391 ipv6=no
17392 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017393 *) { echo "$as_me:$LINENO: result: yes" >&5
17394echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017395 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017396#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017397_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017398
17399 ipv6=yes
17400 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017401 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017402else
Martin v. Löwis11437992002-04-12 09:54:03 +000017403
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017404 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017405 { echo "$as_me:$LINENO: result: no" >&5
17406echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017407 ipv6=no
17408
17409else
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017411/* confdefs.h. */
17412_ACEOF
17413cat confdefs.h >>conftest.$ac_ext
17414cat >>conftest.$ac_ext <<_ACEOF
17415/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017416 /* AF_INET6 available check */
17417#include <sys/types.h>
17418#include <sys/socket.h>
17419main()
17420{
17421 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17422 exit(1);
17423 else
17424 exit(0);
17425}
17426
Martin v. Löwis11437992002-04-12 09:54:03 +000017427_ACEOF
17428rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017429if { (ac_try="$ac_link"
17430case "(($ac_try" in
17431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17432 *) ac_try_echo=$ac_try;;
17433esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017435 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017439 { (case "(($ac_try" in
17440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17441 *) ac_try_echo=$ac_try;;
17442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017444 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017445 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017448 { echo "$as_me:$LINENO: result: yes" >&5
17449echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017450 ipv6=yes
17451else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017452 echo "$as_me: program exited with status $ac_status" >&5
17453echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017454sed 's/^/| /' conftest.$ac_ext >&5
17455
Martin v. Löwis11437992002-04-12 09:54:03 +000017456( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017457{ echo "$as_me:$LINENO: result: no" >&5
17458echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017459 ipv6=no
17460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461rm -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 +000017462fi
17463
Martin v. Löwiseba40652007-08-30 20:10:57 +000017464
17465
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017466if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017467 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17468echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017470/* confdefs.h. */
17471_ACEOF
17472cat confdefs.h >>conftest.$ac_ext
17473cat >>conftest.$ac_ext <<_ACEOF
17474/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017475#include <sys/types.h>
17476#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017477int
17478main ()
17479{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017480struct sockaddr_in6 x;
17481x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ;
17483 return 0;
17484}
17485_ACEOF
17486rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017487if { (ac_try="$ac_compile"
17488case "(($ac_try" in
17489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17490 *) ac_try_echo=$ac_try;;
17491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017493 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017495 grep -v '^ *+' conftest.er1 >conftest.err
17496 rm -f conftest.er1
17497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017499 (exit $ac_status); } && {
17500 test -z "$ac_c_werror_flag" ||
17501 test ! -s conftest.err
17502 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017503 { echo "$as_me:$LINENO: result: yes" >&5
17504echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017505 ipv6=yes
17506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017508sed 's/^/| /' conftest.$ac_ext >&5
17509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510 { echo "$as_me:$LINENO: result: no" >&5
17511echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017512 ipv6=no
17513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017514
17515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017516fi
17517
17518if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017519 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017520#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017521_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017522
17523fi
17524
Martin v. Löwiseba40652007-08-30 20:10:57 +000017525fi
17526
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017527
17528ipv6type=unknown
17529ipv6lib=none
17530ipv6trylibc=no
17531
17532if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017533 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17534echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017535 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17536 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017537 case $i in
17538 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017540/* confdefs.h. */
17541_ACEOF
17542cat confdefs.h >>conftest.$ac_ext
17543cat >>conftest.$ac_ext <<_ACEOF
17544/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017545
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017546#include <netinet/in.h>
17547#ifdef IPV6_INRIA_VERSION
17548yes
17549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017550_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017552 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017553 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017554fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017555rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017556
17557 ;;
17558 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017560/* confdefs.h. */
17561_ACEOF
17562cat confdefs.h >>conftest.$ac_ext
17563cat >>conftest.$ac_ext <<_ACEOF
17564/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017566#include <netinet/in.h>
17567#ifdef __KAME__
17568yes
17569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017570_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017572 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017573 ipv6type=$i;
17574 ipv6lib=inet6
17575 ipv6libdir=/usr/local/v6/lib
17576 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017577fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017578rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017579
17580 ;;
17581 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017583/* confdefs.h. */
17584_ACEOF
17585cat confdefs.h >>conftest.$ac_ext
17586cat >>conftest.$ac_ext <<_ACEOF
17587/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017588
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017589#include <features.h>
17590#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17591yes
17592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017593_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017595 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017596 ipv6type=$i;
17597 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017598fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017599rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017600
17601 ;;
17602 linux-inet6)
17603 if test -d /usr/inet6; then
17604 ipv6type=$i
17605 ipv6lib=inet6
17606 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017607 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017608 fi
17609 ;;
17610 solaris)
17611 if test -f /etc/netconfig; then
17612 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17613 ipv6type=$i
17614 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017615 fi
17616 fi
17617 ;;
17618 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017620/* confdefs.h. */
17621_ACEOF
17622cat confdefs.h >>conftest.$ac_ext
17623cat >>conftest.$ac_ext <<_ACEOF
17624/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017625
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017626#include <sys/param.h>
17627#ifdef _TOSHIBA_INET6
17628yes
17629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017630_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017632 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017633 ipv6type=$i;
17634 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017635 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017636fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017637rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017638
17639 ;;
17640 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017642/* confdefs.h. */
17643_ACEOF
17644cat confdefs.h >>conftest.$ac_ext
17645cat >>conftest.$ac_ext <<_ACEOF
17646/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017647
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017648#include </usr/local/v6/include/sys/v6config.h>
17649#ifdef __V6D__
17650yes
17651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017652_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017654 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017655 ipv6type=$i;
17656 ipv6lib=v6;
17657 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017658 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017659fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017660rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017661
17662 ;;
17663 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017665/* confdefs.h. */
17666_ACEOF
17667cat confdefs.h >>conftest.$ac_ext
17668cat >>conftest.$ac_ext <<_ACEOF
17669/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017671#include <sys/param.h>
17672#ifdef _ZETA_MINAMI_INET6
17673yes
17674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017675_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017677 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017678 ipv6type=$i;
17679 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017680 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017681fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017682rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017683
17684 ;;
17685 esac
17686 if test "$ipv6type" != "unknown"; then
17687 break
17688 fi
17689 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017690 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17691echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017692fi
17693
17694if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17695 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17696 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17697 echo "using lib$ipv6lib"
17698 else
17699 if test $ipv6trylibc = "yes"; then
17700 echo "using libc"
17701 else
17702 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17703 echo "You need to fetch lib$ipv6lib.a from appropriate"
17704 echo 'ipv6 kit and compile beforehand.'
17705 exit 1
17706 fi
17707 fi
17708fi
17709
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017710{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17711echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017712cat >conftest.$ac_ext <<_ACEOF
17713/* confdefs.h. */
17714_ACEOF
17715cat confdefs.h >>conftest.$ac_ext
17716cat >>conftest.$ac_ext <<_ACEOF
17717/* end confdefs.h. */
17718#include <Carbon/Carbon.h>
17719int
17720main ()
17721{
17722FSIORefNum fRef = 0
17723 ;
17724 return 0;
17725}
17726_ACEOF
17727rm -f conftest.$ac_objext
17728if { (ac_try="$ac_compile"
17729case "(($ac_try" in
17730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17731 *) ac_try_echo=$ac_try;;
17732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017734 (eval "$ac_compile") 2>conftest.er1
17735 ac_status=$?
17736 grep -v '^ *+' conftest.er1 >conftest.err
17737 rm -f conftest.er1
17738 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017740 (exit $ac_status); } && {
17741 test -z "$ac_c_werror_flag" ||
17742 test ! -s conftest.err
17743 } && test -s conftest.$ac_objext; then
17744
17745cat >>confdefs.h <<\_ACEOF
17746#define HAVE_OSX105_SDK 1
17747_ACEOF
17748
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017749 { echo "$as_me:$LINENO: result: yes" >&5
17750echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017751else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017752 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017753sed 's/^/| /' conftest.$ac_ext >&5
17754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017755 { echo "$as_me:$LINENO: result: no" >&5
17756echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017757
17758fi
17759
17760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17761
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017762# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017763{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17764echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017765
Martin v. Löwiseba40652007-08-30 20:10:57 +000017766# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017767if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017768 withval=$with_doc_strings;
17769fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017770
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017771
17772if test -z "$with_doc_strings"
17773then with_doc_strings="yes"
17774fi
17775if test "$with_doc_strings" != "no"
17776then
17777
17778cat >>confdefs.h <<\_ACEOF
17779#define WITH_DOC_STRINGS 1
17780_ACEOF
17781
17782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017783{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17784echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017785
Neil Schemenauera35c6882001-02-27 04:45:05 +000017786# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017787{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17788echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017789
Martin v. Löwiseba40652007-08-30 20:10:57 +000017790# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017791if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017792 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017793if test "$withval" != no
17794then
17795
17796cat >>confdefs.h <<\_ACEOF
17797#define WITH_TSC 1
17798_ACEOF
17799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017800 { echo "$as_me:$LINENO: result: yes" >&5
17801echo "${ECHO_T}yes" >&6; }
17802else { echo "$as_me:$LINENO: result: no" >&5
17803echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017804fi
17805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017806 { echo "$as_me:$LINENO: result: no" >&5
17807echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808fi
17809
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017810
17811# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017812{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17813echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017814
Martin v. Löwiseba40652007-08-30 20:10:57 +000017815# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017816if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017817 withval=$with_pymalloc;
17818fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017819
Neil Schemenauera35c6882001-02-27 04:45:05 +000017820
Neil Schemenauer16c22972002-03-22 15:34:49 +000017821if test -z "$with_pymalloc"
17822then with_pymalloc="yes"
17823fi
17824if test "$with_pymalloc" != "no"
17825then
Martin v. Löwis11437992002-04-12 09:54:03 +000017826
17827cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017828#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017829_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017830
17831fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017832{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17833echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017834
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017835# Check for Valgrind support
17836{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17837echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17838
17839# Check whether --with-valgrind was given.
17840if test "${with_valgrind+set}" = set; then
17841 withval=$with_valgrind;
17842else
17843 with_valgrind=no
17844fi
17845
17846{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17847echo "${ECHO_T}$with_valgrind" >&6; }
17848if test "$with_valgrind" != no; then
17849 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17850 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17851echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17852if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17853 echo $ECHO_N "(cached) $ECHO_C" >&6
17854fi
17855{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17856echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17857else
17858 # Is the header compilable?
17859{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17860echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17861cat >conftest.$ac_ext <<_ACEOF
17862/* confdefs.h. */
17863_ACEOF
17864cat confdefs.h >>conftest.$ac_ext
17865cat >>conftest.$ac_ext <<_ACEOF
17866/* end confdefs.h. */
17867$ac_includes_default
17868#include <valgrind/valgrind.h>
17869_ACEOF
17870rm -f conftest.$ac_objext
17871if { (ac_try="$ac_compile"
17872case "(($ac_try" in
17873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17874 *) ac_try_echo=$ac_try;;
17875esac
17876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17877 (eval "$ac_compile") 2>conftest.er1
17878 ac_status=$?
17879 grep -v '^ *+' conftest.er1 >conftest.err
17880 rm -f conftest.er1
17881 cat conftest.err >&5
17882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17883 (exit $ac_status); } && {
17884 test -z "$ac_c_werror_flag" ||
17885 test ! -s conftest.err
17886 } && test -s conftest.$ac_objext; then
17887 ac_header_compiler=yes
17888else
17889 echo "$as_me: failed program was:" >&5
17890sed 's/^/| /' conftest.$ac_ext >&5
17891
17892 ac_header_compiler=no
17893fi
17894
17895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17896{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17897echo "${ECHO_T}$ac_header_compiler" >&6; }
17898
17899# Is the header present?
17900{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17901echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17902cat >conftest.$ac_ext <<_ACEOF
17903/* confdefs.h. */
17904_ACEOF
17905cat confdefs.h >>conftest.$ac_ext
17906cat >>conftest.$ac_ext <<_ACEOF
17907/* end confdefs.h. */
17908#include <valgrind/valgrind.h>
17909_ACEOF
17910if { (ac_try="$ac_cpp conftest.$ac_ext"
17911case "(($ac_try" in
17912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17913 *) ac_try_echo=$ac_try;;
17914esac
17915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17916 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17917 ac_status=$?
17918 grep -v '^ *+' conftest.er1 >conftest.err
17919 rm -f conftest.er1
17920 cat conftest.err >&5
17921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17922 (exit $ac_status); } >/dev/null && {
17923 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17924 test ! -s conftest.err
17925 }; then
17926 ac_header_preproc=yes
17927else
17928 echo "$as_me: failed program was:" >&5
17929sed 's/^/| /' conftest.$ac_ext >&5
17930
17931 ac_header_preproc=no
17932fi
17933
17934rm -f conftest.err conftest.$ac_ext
17935{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17936echo "${ECHO_T}$ac_header_preproc" >&6; }
17937
17938# So? What about this header?
17939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17940 yes:no: )
17941 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17942echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17943 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17944echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17945 ac_header_preproc=yes
17946 ;;
17947 no:yes:* )
17948 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17949echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17950 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17951echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17952 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17953echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17954 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17955echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17956 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17957echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17958 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17959echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17960 ( cat <<\_ASBOX
17961## -------------------------------------- ##
17962## Report this to http://bugs.python.org/ ##
17963## -------------------------------------- ##
17964_ASBOX
17965 ) | sed "s/^/$as_me: WARNING: /" >&2
17966 ;;
17967esac
17968{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17969echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17970if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17971 echo $ECHO_N "(cached) $ECHO_C" >&6
17972else
17973 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17974fi
17975{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17976echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17977
17978fi
17979if test $ac_cv_header_valgrind_valgrind_h = yes; then
17980
17981cat >>confdefs.h <<\_ACEOF
17982#define WITH_VALGRIND 1
17983_ACEOF
17984
17985else
17986 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17987echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17988 { (exit 1); exit 1; }; }
17989
17990fi
17991
17992
17993fi
17994
Barry Warsawef82cd72000-06-30 16:21:01 +000017995# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017996{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17997echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017998
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018000if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018001 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018002if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018003then
18004
18005cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018006#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018007_ACEOF
18008
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018009 { echo "$as_me:$LINENO: result: yes" >&5
18010echo "${ECHO_T}yes" >&6; }
18011else { echo "$as_me:$LINENO: result: no" >&5
18012echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018013fi
18014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018015 { echo "$as_me:$LINENO: result: no" >&5
18016echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018017fi
18018
Barry Warsawef82cd72000-06-30 16:21:01 +000018019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018020# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018021
Guido van Rossum98935bf2001-09-05 19:13:16 +000018022DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018023
Guido van Rossume97ee181999-12-20 21:27:22 +000018024# the dlopen() function means we might want to use dynload_shlib.o. some
18025# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018026
Thomas Wouters3a584202000-08-05 23:28:51 +000018027for ac_func in dlopen
18028do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18030{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018032if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018033 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018034else
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018036/* confdefs.h. */
18037_ACEOF
18038cat confdefs.h >>conftest.$ac_ext
18039cat >>conftest.$ac_ext <<_ACEOF
18040/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018041/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18042 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18043#define $ac_func innocuous_$ac_func
18044
Guido van Rossume97ee181999-12-20 21:27:22 +000018045/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018046 which can conflict with char $ac_func (); below.
18047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018048 <limits.h> exists even on freestanding compilers. */
18049
18050#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018051# include <limits.h>
18052#else
18053# include <assert.h>
18054#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018055
18056#undef $ac_func
18057
Martin v. Löwiseba40652007-08-30 20:10:57 +000018058/* Override any GCC internal prototype to avoid an error.
18059 Use char because int might match the return type of a GCC
18060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018061#ifdef __cplusplus
18062extern "C"
18063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018064char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018065/* The GNU C library defines this for functions which it implements
18066 to always fail with ENOSYS. Some functions are actually named
18067 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018068#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018069choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018070#endif
18071
Skip Montanaro6dead952003-09-25 14:50:04 +000018072int
18073main ()
18074{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018076 ;
18077 return 0;
18078}
18079_ACEOF
18080rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018081if { (ac_try="$ac_link"
18082case "(($ac_try" in
18083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18084 *) ac_try_echo=$ac_try;;
18085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018089 grep -v '^ *+' conftest.er1 >conftest.err
18090 rm -f conftest.er1
18091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093 (exit $ac_status); } && {
18094 test -z "$ac_c_werror_flag" ||
18095 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018096 } && test -s conftest$ac_exeext &&
18097 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018098 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018101sed 's/^/| /' conftest.$ac_ext >&5
18102
Martin v. Löwiseba40652007-08-30 20:10:57 +000018103 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018105
18106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018107 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018108fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018109ac_res=`eval echo '${'$as_ac_var'}'`
18110 { echo "$as_me:$LINENO: result: $ac_res" >&5
18111echo "${ECHO_T}$ac_res" >&6; }
18112if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018113 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018114#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018115_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018116
Guido van Rossume97ee181999-12-20 21:27:22 +000018117fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018118done
Guido van Rossume97ee181999-12-20 21:27:22 +000018119
Michael W. Hudson54241132001-12-07 15:38:26 +000018120
Guido van Rossume97ee181999-12-20 21:27:22 +000018121# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18122# loading of modules.
18123
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018124{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18125echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018126if test -z "$DYNLOADFILE"
18127then
18128 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018129 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18130 if test "$ac_cv_func_dlopen" = yes
18131 then DYNLOADFILE="dynload_shlib.o"
18132 else DYNLOADFILE="dynload_aix.o"
18133 fi
18134 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018135 BeOS*) DYNLOADFILE="dynload_beos.o";;
18136 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018137 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18138 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018139 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018140 *)
18141 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18142 # out any dynamic loading
18143 if test "$ac_cv_func_dlopen" = yes
18144 then DYNLOADFILE="dynload_shlib.o"
18145 else DYNLOADFILE="dynload_stub.o"
18146 fi
18147 ;;
18148 esac
18149fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018150{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18151echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018152if test "$DYNLOADFILE" != "dynload_stub.o"
18153then
Martin v. Löwis11437992002-04-12 09:54:03 +000018154
18155cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018156#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018157_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018158
18159fi
18160
Neil Schemenauer4e425612001-06-19 15:44:15 +000018161# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18162
Michael W. Hudson54241132001-12-07 15:38:26 +000018163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018164{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18165echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018166if test -z "$MACHDEP_OBJS"
18167then
Jack Jansene578a632001-08-15 01:27:14 +000018168 MACHDEP_OBJS=$extra_machdep_objs
18169else
18170 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018171fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018172{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18173echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018174
Guido van Rossum627b2d71993-12-24 10:39:16 +000018175# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
Martin v. Löwisd6320502004-08-12 13:45:08 +000018247
Martin v. Löwisc3001752005-01-23 09:27:24 +000018248
18249
Neal Norwitz05a45592006-03-20 06:30:08 +000018250
18251
Martin v. Löwis382abef2007-02-19 10:55:19 +000018252
18253
Christian Heimes36281872007-11-30 21:11:28 +000018254
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018255
18256
Jesse Noller355b1262009-04-02 00:03:28 +000018257
18258
18259
18260
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018274
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018275for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18276 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018277 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018278 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018279 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018280 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018281 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018282 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18283 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018284 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018285 setlocale setregid setreuid setresuid setresgid \
18286 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018287 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018288 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018289 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018290do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18292{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18293echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018295 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018296else
Martin v. Löwis11437992002-04-12 09:54:03 +000018297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018298/* confdefs.h. */
18299_ACEOF
18300cat confdefs.h >>conftest.$ac_ext
18301cat >>conftest.$ac_ext <<_ACEOF
18302/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018303/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18305#define $ac_func innocuous_$ac_func
18306
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018307/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018308 which can conflict with char $ac_func (); below.
18309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018310 <limits.h> exists even on freestanding compilers. */
18311
18312#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018313# include <limits.h>
18314#else
18315# include <assert.h>
18316#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018317
18318#undef $ac_func
18319
Martin v. Löwiseba40652007-08-30 20:10:57 +000018320/* Override any GCC internal prototype to avoid an error.
18321 Use char because int might match the return type of a GCC
18322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018323#ifdef __cplusplus
18324extern "C"
18325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018326char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018327/* The GNU C library defines this for functions which it implements
18328 to always fail with ENOSYS. Some functions are actually named
18329 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018331choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018332#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018333
Skip Montanaro6dead952003-09-25 14:50:04 +000018334int
18335main ()
18336{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018337return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018338 ;
18339 return 0;
18340}
18341_ACEOF
18342rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018343if { (ac_try="$ac_link"
18344case "(($ac_try" in
18345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18346 *) ac_try_echo=$ac_try;;
18347esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018349 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018351 grep -v '^ *+' conftest.er1 >conftest.err
18352 rm -f conftest.er1
18353 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355 (exit $ac_status); } && {
18356 test -z "$ac_c_werror_flag" ||
18357 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018358 } && test -s conftest$ac_exeext &&
18359 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018360 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018363sed 's/^/| /' conftest.$ac_ext >&5
18364
Martin v. Löwiseba40652007-08-30 20:10:57 +000018365 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018367
18368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018369 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018371ac_res=`eval echo '${'$as_ac_var'}'`
18372 { echo "$as_me:$LINENO: result: $ac_res" >&5
18373echo "${ECHO_T}$ac_res" >&6; }
18374if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018375 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018376#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018377_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018378
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018379fi
18380done
18381
Michael W. Hudson54241132001-12-07 15:38:26 +000018382
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018383# For some functions, having a definition is not sufficient, since
18384# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018385{ echo "$as_me:$LINENO: checking for chroot" >&5
18386echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018388/* confdefs.h. */
18389_ACEOF
18390cat confdefs.h >>conftest.$ac_ext
18391cat >>conftest.$ac_ext <<_ACEOF
18392/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018393#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018394int
18395main ()
18396{
18397void *x=chroot
18398 ;
18399 return 0;
18400}
18401_ACEOF
18402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018403if { (ac_try="$ac_compile"
18404case "(($ac_try" in
18405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18406 *) ac_try_echo=$ac_try;;
18407esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018411 grep -v '^ *+' conftest.er1 >conftest.err
18412 rm -f conftest.er1
18413 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018415 (exit $ac_status); } && {
18416 test -z "$ac_c_werror_flag" ||
18417 test ! -s conftest.err
18418 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018419
18420cat >>confdefs.h <<\_ACEOF
18421#define HAVE_CHROOT 1
18422_ACEOF
18423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018424 { echo "$as_me:$LINENO: result: yes" >&5
18425echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018426else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018428sed 's/^/| /' conftest.$ac_ext >&5
18429
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018430 { echo "$as_me:$LINENO: result: no" >&5
18431echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018432
18433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018434
18435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018436{ echo "$as_me:$LINENO: checking for link" >&5
18437echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018439/* confdefs.h. */
18440_ACEOF
18441cat confdefs.h >>conftest.$ac_ext
18442cat >>conftest.$ac_ext <<_ACEOF
18443/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018444#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018445int
18446main ()
18447{
18448void *x=link
18449 ;
18450 return 0;
18451}
18452_ACEOF
18453rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018454if { (ac_try="$ac_compile"
18455case "(($ac_try" in
18456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18457 *) ac_try_echo=$ac_try;;
18458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462 grep -v '^ *+' conftest.er1 >conftest.err
18463 rm -f conftest.er1
18464 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018466 (exit $ac_status); } && {
18467 test -z "$ac_c_werror_flag" ||
18468 test ! -s conftest.err
18469 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018470
18471cat >>confdefs.h <<\_ACEOF
18472#define HAVE_LINK 1
18473_ACEOF
18474
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018475 { echo "$as_me:$LINENO: result: yes" >&5
18476echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018479sed 's/^/| /' conftest.$ac_ext >&5
18480
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018481 { echo "$as_me:$LINENO: result: no" >&5
18482echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018483
18484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018485
18486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018487{ echo "$as_me:$LINENO: checking for symlink" >&5
18488echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018490/* confdefs.h. */
18491_ACEOF
18492cat confdefs.h >>conftest.$ac_ext
18493cat >>conftest.$ac_ext <<_ACEOF
18494/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018495#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018496int
18497main ()
18498{
18499void *x=symlink
18500 ;
18501 return 0;
18502}
18503_ACEOF
18504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018505if { (ac_try="$ac_compile"
18506case "(($ac_try" in
18507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18508 *) ac_try_echo=$ac_try;;
18509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018513 grep -v '^ *+' conftest.er1 >conftest.err
18514 rm -f conftest.er1
18515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018517 (exit $ac_status); } && {
18518 test -z "$ac_c_werror_flag" ||
18519 test ! -s conftest.err
18520 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018521
18522cat >>confdefs.h <<\_ACEOF
18523#define HAVE_SYMLINK 1
18524_ACEOF
18525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018526 { echo "$as_me:$LINENO: result: yes" >&5
18527echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018530sed 's/^/| /' conftest.$ac_ext >&5
18531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018532 { echo "$as_me:$LINENO: result: no" >&5
18533echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018534
18535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536
18537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018538{ echo "$as_me:$LINENO: checking for fchdir" >&5
18539echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018541/* confdefs.h. */
18542_ACEOF
18543cat confdefs.h >>conftest.$ac_ext
18544cat >>conftest.$ac_ext <<_ACEOF
18545/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018546#include <unistd.h>
18547int
18548main ()
18549{
18550void *x=fchdir
18551 ;
18552 return 0;
18553}
18554_ACEOF
18555rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018556if { (ac_try="$ac_compile"
18557case "(($ac_try" in
18558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18559 *) ac_try_echo=$ac_try;;
18560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018564 grep -v '^ *+' conftest.er1 >conftest.err
18565 rm -f conftest.er1
18566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018568 (exit $ac_status); } && {
18569 test -z "$ac_c_werror_flag" ||
18570 test ! -s conftest.err
18571 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018572
18573cat >>confdefs.h <<\_ACEOF
18574#define HAVE_FCHDIR 1
18575_ACEOF
18576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577 { echo "$as_me:$LINENO: result: yes" >&5
18578echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018581sed 's/^/| /' conftest.$ac_ext >&5
18582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583 { echo "$as_me:$LINENO: result: no" >&5
18584echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018585
18586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018587
18588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018589{ echo "$as_me:$LINENO: checking for fsync" >&5
18590echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018592/* confdefs.h. */
18593_ACEOF
18594cat confdefs.h >>conftest.$ac_ext
18595cat >>conftest.$ac_ext <<_ACEOF
18596/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018597#include <unistd.h>
18598int
18599main ()
18600{
18601void *x=fsync
18602 ;
18603 return 0;
18604}
18605_ACEOF
18606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607if { (ac_try="$ac_compile"
18608case "(($ac_try" in
18609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18610 *) ac_try_echo=$ac_try;;
18611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018615 grep -v '^ *+' conftest.er1 >conftest.err
18616 rm -f conftest.er1
18617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619 (exit $ac_status); } && {
18620 test -z "$ac_c_werror_flag" ||
18621 test ! -s conftest.err
18622 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018623
18624cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018625#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018626_ACEOF
18627
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018628 { echo "$as_me:$LINENO: result: yes" >&5
18629echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018632sed 's/^/| /' conftest.$ac_ext >&5
18633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018634 { echo "$as_me:$LINENO: result: no" >&5
18635echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018636
18637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638
18639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018640{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18641echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018642cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018643/* confdefs.h. */
18644_ACEOF
18645cat confdefs.h >>conftest.$ac_ext
18646cat >>conftest.$ac_ext <<_ACEOF
18647/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018648#include <unistd.h>
18649int
18650main ()
18651{
18652void *x=fdatasync
18653 ;
18654 return 0;
18655}
18656_ACEOF
18657rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018658if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +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
18673 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018674
18675cat >>confdefs.h <<\_ACEOF
18676#define HAVE_FDATASYNC 1
18677_ACEOF
18678
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018679 { echo "$as_me:$LINENO: result: yes" >&5
18680echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018681else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018683sed 's/^/| /' conftest.$ac_ext >&5
18684
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018685 { echo "$as_me:$LINENO: result: no" >&5
18686echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018687
18688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018689
18690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018691{ echo "$as_me:$LINENO: checking for epoll" >&5
18692echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018693cat >conftest.$ac_ext <<_ACEOF
18694/* confdefs.h. */
18695_ACEOF
18696cat confdefs.h >>conftest.$ac_ext
18697cat >>conftest.$ac_ext <<_ACEOF
18698/* end confdefs.h. */
18699#include <sys/epoll.h>
18700int
18701main ()
18702{
18703void *x=epoll_create
18704 ;
18705 return 0;
18706}
18707_ACEOF
18708rm -f conftest.$ac_objext
18709if { (ac_try="$ac_compile"
18710case "(($ac_try" in
18711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18712 *) ac_try_echo=$ac_try;;
18713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018715 (eval "$ac_compile") 2>conftest.er1
18716 ac_status=$?
18717 grep -v '^ *+' conftest.er1 >conftest.err
18718 rm -f conftest.er1
18719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018721 (exit $ac_status); } && {
18722 test -z "$ac_c_werror_flag" ||
18723 test ! -s conftest.err
18724 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018725
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018726cat >>confdefs.h <<\_ACEOF
18727#define HAVE_EPOLL 1
18728_ACEOF
18729
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018730 { echo "$as_me:$LINENO: result: yes" >&5
18731echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018732else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018733 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018734sed 's/^/| /' conftest.$ac_ext >&5
18735
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018736 { echo "$as_me:$LINENO: result: no" >&5
18737echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018738
18739fi
18740
18741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018742{ echo "$as_me:$LINENO: checking for kqueue" >&5
18743echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018744cat >conftest.$ac_ext <<_ACEOF
18745/* confdefs.h. */
18746_ACEOF
18747cat confdefs.h >>conftest.$ac_ext
18748cat >>conftest.$ac_ext <<_ACEOF
18749/* end confdefs.h. */
18750
18751#include <sys/types.h>
18752#include <sys/event.h>
18753
18754int
18755main ()
18756{
18757int x=kqueue()
18758 ;
18759 return 0;
18760}
18761_ACEOF
18762rm -f conftest.$ac_objext
18763if { (ac_try="$ac_compile"
18764case "(($ac_try" in
18765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18766 *) ac_try_echo=$ac_try;;
18767esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018769 (eval "$ac_compile") 2>conftest.er1
18770 ac_status=$?
18771 grep -v '^ *+' conftest.er1 >conftest.err
18772 rm -f conftest.er1
18773 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018775 (exit $ac_status); } && {
18776 test -z "$ac_c_werror_flag" ||
18777 test ! -s conftest.err
18778 } && test -s conftest.$ac_objext; then
18779
18780cat >>confdefs.h <<\_ACEOF
18781#define HAVE_KQUEUE 1
18782_ACEOF
18783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018784 { echo "$as_me:$LINENO: result: yes" >&5
18785echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018786else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018787 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018788sed 's/^/| /' conftest.$ac_ext >&5
18789
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018790 { echo "$as_me:$LINENO: result: no" >&5
18791echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018792
18793fi
18794
18795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018796# On some systems (eg. FreeBSD 5), we would find a definition of the
18797# functions ctermid_r, setgroups in the library, but no prototype
18798# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18799# address to avoid compiler warnings and potential miscompilations
18800# because of the missing prototypes.
18801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018802{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18803echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018805/* confdefs.h. */
18806_ACEOF
18807cat confdefs.h >>conftest.$ac_ext
18808cat >>conftest.$ac_ext <<_ACEOF
18809/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018810
18811#include "confdefs.h"
18812#include <stdio.h>
18813
Martin v. Löwisd5843682002-11-21 20:41:28 +000018814int
18815main ()
18816{
18817void* p = ctermid_r
18818 ;
18819 return 0;
18820}
18821_ACEOF
18822rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823if { (ac_try="$ac_compile"
18824case "(($ac_try" in
18825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18826 *) ac_try_echo=$ac_try;;
18827esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018831 grep -v '^ *+' conftest.er1 >conftest.err
18832 rm -f conftest.er1
18833 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018835 (exit $ac_status); } && {
18836 test -z "$ac_c_werror_flag" ||
18837 test ! -s conftest.err
18838 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018839
18840cat >>confdefs.h <<\_ACEOF
18841#define HAVE_CTERMID_R 1
18842_ACEOF
18843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018844 { echo "$as_me:$LINENO: result: yes" >&5
18845echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018846else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018848sed 's/^/| /' conftest.$ac_ext >&5
18849
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018850 { echo "$as_me:$LINENO: result: no" >&5
18851echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018852
18853fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018854
Martin v. Löwiseba40652007-08-30 20:10:57 +000018855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18856
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857{ echo "$as_me:$LINENO: checking for flock" >&5
18858echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018859cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018860/* confdefs.h. */
18861_ACEOF
18862cat confdefs.h >>conftest.$ac_ext
18863cat >>conftest.$ac_ext <<_ACEOF
18864/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018865
18866#include "confdefs.h"
18867#include <sys/file.h>
18868
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018869int
18870main ()
18871{
18872void* p = flock
18873 ;
18874 return 0;
18875}
18876_ACEOF
18877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018878if { (ac_try="$ac_compile"
18879case "(($ac_try" in
18880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18881 *) ac_try_echo=$ac_try;;
18882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018886 grep -v '^ *+' conftest.er1 >conftest.err
18887 rm -f conftest.er1
18888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890 (exit $ac_status); } && {
18891 test -z "$ac_c_werror_flag" ||
18892 test ! -s conftest.err
18893 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018894
18895cat >>confdefs.h <<\_ACEOF
18896#define HAVE_FLOCK 1
18897_ACEOF
18898
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018899 { echo "$as_me:$LINENO: result: yes" >&5
18900echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018903sed 's/^/| /' conftest.$ac_ext >&5
18904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905 { echo "$as_me:$LINENO: result: no" >&5
18906echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018907
18908fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018909
Martin v. Löwiseba40652007-08-30 20:10:57 +000018910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018912{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18913echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018915/* confdefs.h. */
18916_ACEOF
18917cat confdefs.h >>conftest.$ac_ext
18918cat >>conftest.$ac_ext <<_ACEOF
18919/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018920
18921#include "confdefs.h"
18922#include <unistd.h>
18923
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018924int
18925main ()
18926{
18927void* p = getpagesize
18928 ;
18929 return 0;
18930}
18931_ACEOF
18932rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018933if { (ac_try="$ac_compile"
18934case "(($ac_try" in
18935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18936 *) ac_try_echo=$ac_try;;
18937esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018939 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018941 grep -v '^ *+' conftest.er1 >conftest.err
18942 rm -f conftest.er1
18943 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018945 (exit $ac_status); } && {
18946 test -z "$ac_c_werror_flag" ||
18947 test ! -s conftest.err
18948 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018949
18950cat >>confdefs.h <<\_ACEOF
18951#define HAVE_GETPAGESIZE 1
18952_ACEOF
18953
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018954 { echo "$as_me:$LINENO: result: yes" >&5
18955echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018958sed 's/^/| /' conftest.$ac_ext >&5
18959
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018960 { echo "$as_me:$LINENO: result: no" >&5
18961echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018962
18963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964
18965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018966
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018967for ac_prog in true
18968do
18969 # Extract the first word of "$ac_prog", so it can be a program name with args.
18970set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018971{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18972echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018973if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018975else
18976 if test -n "$TRUE"; then
18977 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18978else
18979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18980for as_dir in $PATH
18981do
18982 IFS=$as_save_IFS
18983 test -z "$as_dir" && as_dir=.
18984 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018985 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 +000018986 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018987 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018988 break 2
18989 fi
18990done
18991done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018992IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018993
18994fi
18995fi
18996TRUE=$ac_cv_prog_TRUE
18997if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018998 { echo "$as_me:$LINENO: result: $TRUE" >&5
18999echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019001 { echo "$as_me:$LINENO: result: no" >&5
19002echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019003fi
19004
Martin v. Löwiseba40652007-08-30 20:10:57 +000019005
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019006 test -n "$TRUE" && break
19007done
19008test -n "$TRUE" || TRUE="/bin/true"
19009
19010
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019011{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19012echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019013if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019015else
19016 ac_check_lib_save_LIBS=$LIBS
19017LIBS="-lc $LIBS"
19018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019019/* confdefs.h. */
19020_ACEOF
19021cat confdefs.h >>conftest.$ac_ext
19022cat >>conftest.$ac_ext <<_ACEOF
19023/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019024
Martin v. Löwiseba40652007-08-30 20:10:57 +000019025/* Override any GCC internal prototype to avoid an error.
19026 Use char because int might match the return type of a GCC
19027 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019028#ifdef __cplusplus
19029extern "C"
19030#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019031char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019032int
19033main ()
19034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019035return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019036 ;
19037 return 0;
19038}
19039_ACEOF
19040rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041if { (ac_try="$ac_link"
19042case "(($ac_try" in
19043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19044 *) ac_try_echo=$ac_try;;
19045esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019049 grep -v '^ *+' conftest.er1 >conftest.err
19050 rm -f conftest.er1
19051 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019053 (exit $ac_status); } && {
19054 test -z "$ac_c_werror_flag" ||
19055 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019056 } && test -s conftest$ac_exeext &&
19057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019058 ac_cv_lib_c_inet_aton=yes
19059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019061sed 's/^/| /' conftest.$ac_ext >&5
19062
Martin v. Löwiseba40652007-08-30 20:10:57 +000019063 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019065
19066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019068LIBS=$ac_check_lib_save_LIBS
19069fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019070{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19071echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19072if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019073 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019074else
19075
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019076{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19077echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019078if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019079 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019080else
19081 ac_check_lib_save_LIBS=$LIBS
19082LIBS="-lresolv $LIBS"
19083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019084/* confdefs.h. */
19085_ACEOF
19086cat confdefs.h >>conftest.$ac_ext
19087cat >>conftest.$ac_ext <<_ACEOF
19088/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019089
Martin v. Löwiseba40652007-08-30 20:10:57 +000019090/* Override any GCC internal prototype to avoid an error.
19091 Use char because int might match the return type of a GCC
19092 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019093#ifdef __cplusplus
19094extern "C"
19095#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019096char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019097int
19098main ()
19099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019100return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019101 ;
19102 return 0;
19103}
19104_ACEOF
19105rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106if { (ac_try="$ac_link"
19107case "(($ac_try" in
19108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19109 *) ac_try_echo=$ac_try;;
19110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019114 grep -v '^ *+' conftest.er1 >conftest.err
19115 rm -f conftest.er1
19116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118 (exit $ac_status); } && {
19119 test -z "$ac_c_werror_flag" ||
19120 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019121 } && test -s conftest$ac_exeext &&
19122 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019123 ac_cv_lib_resolv_inet_aton=yes
19124else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019126sed 's/^/| /' conftest.$ac_ext >&5
19127
Martin v. Löwiseba40652007-08-30 20:10:57 +000019128 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019130
19131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019133LIBS=$ac_check_lib_save_LIBS
19134fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019135{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19136echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19137if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019138 cat >>confdefs.h <<_ACEOF
19139#define HAVE_LIBRESOLV 1
19140_ACEOF
19141
19142 LIBS="-lresolv $LIBS"
19143
19144fi
19145
19146
19147fi
19148
19149
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019150# On Tru64, chflags seems to be present, but calling it will
19151# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019152{ echo "$as_me:$LINENO: checking for chflags" >&5
19153echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019154if test "${ac_cv_have_chflags+set}" = set; then
19155 echo $ECHO_N "(cached) $ECHO_C" >&6
19156else
19157 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019158 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019159else
19160 cat >conftest.$ac_ext <<_ACEOF
19161/* confdefs.h. */
19162_ACEOF
19163cat confdefs.h >>conftest.$ac_ext
19164cat >>conftest.$ac_ext <<_ACEOF
19165/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019166[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019167#include <sys/stat.h>
19168#include <unistd.h>
19169int main(int argc, char*argv[])
19170{
19171 if(chflags(argv[0], 0) != 0)
19172 return 1;
19173 return 0;
19174}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019175]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019176_ACEOF
19177rm -f conftest$ac_exeext
19178if { (ac_try="$ac_link"
19179case "(($ac_try" in
19180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19181 *) ac_try_echo=$ac_try;;
19182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019184 (eval "$ac_link") 2>&5
19185 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019187 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19188 { (case "(($ac_try" in
19189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19190 *) ac_try_echo=$ac_try;;
19191esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019193 (eval "$ac_try") 2>&5
19194 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019196 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019197 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019198else
19199 echo "$as_me: program exited with status $ac_status" >&5
19200echo "$as_me: failed program was:" >&5
19201sed 's/^/| /' conftest.$ac_ext >&5
19202
19203( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019204ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019205fi
19206rm -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 +000019207fi
19208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019209
19210
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019211fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019212{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19213echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019214if test "$ac_cv_have_chflags" = cross ; then
19215 { echo "$as_me:$LINENO: checking for chflags" >&5
19216echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19217if test "${ac_cv_func_chflags+set}" = set; then
19218 echo $ECHO_N "(cached) $ECHO_C" >&6
19219else
19220 cat >conftest.$ac_ext <<_ACEOF
19221/* confdefs.h. */
19222_ACEOF
19223cat confdefs.h >>conftest.$ac_ext
19224cat >>conftest.$ac_ext <<_ACEOF
19225/* end confdefs.h. */
19226/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19227 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19228#define chflags innocuous_chflags
19229
19230/* System header to define __stub macros and hopefully few prototypes,
19231 which can conflict with char chflags (); below.
19232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19233 <limits.h> exists even on freestanding compilers. */
19234
19235#ifdef __STDC__
19236# include <limits.h>
19237#else
19238# include <assert.h>
19239#endif
19240
19241#undef chflags
19242
19243/* Override any GCC internal prototype to avoid an error.
19244 Use char because int might match the return type of a GCC
19245 builtin and then its argument prototype would still apply. */
19246#ifdef __cplusplus
19247extern "C"
19248#endif
19249char chflags ();
19250/* The GNU C library defines this for functions which it implements
19251 to always fail with ENOSYS. Some functions are actually named
19252 something starting with __ and the normal name is an alias. */
19253#if defined __stub_chflags || defined __stub___chflags
19254choke me
19255#endif
19256
19257int
19258main ()
19259{
19260return chflags ();
19261 ;
19262 return 0;
19263}
19264_ACEOF
19265rm -f conftest.$ac_objext conftest$ac_exeext
19266if { (ac_try="$ac_link"
19267case "(($ac_try" in
19268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19269 *) ac_try_echo=$ac_try;;
19270esac
19271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19272 (eval "$ac_link") 2>conftest.er1
19273 ac_status=$?
19274 grep -v '^ *+' conftest.er1 >conftest.err
19275 rm -f conftest.er1
19276 cat conftest.err >&5
19277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19278 (exit $ac_status); } && {
19279 test -z "$ac_c_werror_flag" ||
19280 test ! -s conftest.err
19281 } && test -s conftest$ac_exeext &&
19282 $as_test_x conftest$ac_exeext; then
19283 ac_cv_func_chflags=yes
19284else
19285 echo "$as_me: failed program was:" >&5
19286sed 's/^/| /' conftest.$ac_ext >&5
19287
19288 ac_cv_func_chflags=no
19289fi
19290
19291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19292 conftest$ac_exeext conftest.$ac_ext
19293fi
19294{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19295echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19296if test $ac_cv_func_chflags = yes; then
19297 ac_cv_have_chflags="yes"
19298else
19299 ac_cv_have_chflags="no"
19300fi
19301
19302fi
19303if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019304
19305cat >>confdefs.h <<\_ACEOF
19306#define HAVE_CHFLAGS 1
19307_ACEOF
19308
19309fi
19310
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019311{ echo "$as_me:$LINENO: checking for lchflags" >&5
19312echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019313if test "${ac_cv_have_lchflags+set}" = set; then
19314 echo $ECHO_N "(cached) $ECHO_C" >&6
19315else
19316 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019317 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019318else
19319 cat >conftest.$ac_ext <<_ACEOF
19320/* confdefs.h. */
19321_ACEOF
19322cat confdefs.h >>conftest.$ac_ext
19323cat >>conftest.$ac_ext <<_ACEOF
19324/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019325[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019326#include <sys/stat.h>
19327#include <unistd.h>
19328int main(int argc, char*argv[])
19329{
19330 if(lchflags(argv[0], 0) != 0)
19331 return 1;
19332 return 0;
19333}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019334]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019335_ACEOF
19336rm -f conftest$ac_exeext
19337if { (ac_try="$ac_link"
19338case "(($ac_try" in
19339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19340 *) ac_try_echo=$ac_try;;
19341esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019343 (eval "$ac_link") 2>&5
19344 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19347 { (case "(($ac_try" in
19348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19349 *) ac_try_echo=$ac_try;;
19350esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019352 (eval "$ac_try") 2>&5
19353 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019355 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019356 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019357else
19358 echo "$as_me: program exited with status $ac_status" >&5
19359echo "$as_me: failed program was:" >&5
19360sed 's/^/| /' conftest.$ac_ext >&5
19361
19362( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019363ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019364fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19366fi
19367
19368
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019369
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019370fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019371{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19372echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019373if test "$ac_cv_have_lchflags" = cross ; then
19374 { echo "$as_me:$LINENO: checking for lchflags" >&5
19375echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19376if test "${ac_cv_func_lchflags+set}" = set; then
19377 echo $ECHO_N "(cached) $ECHO_C" >&6
19378else
19379 cat >conftest.$ac_ext <<_ACEOF
19380/* confdefs.h. */
19381_ACEOF
19382cat confdefs.h >>conftest.$ac_ext
19383cat >>conftest.$ac_ext <<_ACEOF
19384/* end confdefs.h. */
19385/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19387#define lchflags innocuous_lchflags
19388
19389/* System header to define __stub macros and hopefully few prototypes,
19390 which can conflict with char lchflags (); below.
19391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19392 <limits.h> exists even on freestanding compilers. */
19393
19394#ifdef __STDC__
19395# include <limits.h>
19396#else
19397# include <assert.h>
19398#endif
19399
19400#undef lchflags
19401
19402/* Override any GCC internal prototype to avoid an error.
19403 Use char because int might match the return type of a GCC
19404 builtin and then its argument prototype would still apply. */
19405#ifdef __cplusplus
19406extern "C"
19407#endif
19408char lchflags ();
19409/* The GNU C library defines this for functions which it implements
19410 to always fail with ENOSYS. Some functions are actually named
19411 something starting with __ and the normal name is an alias. */
19412#if defined __stub_lchflags || defined __stub___lchflags
19413choke me
19414#endif
19415
19416int
19417main ()
19418{
19419return lchflags ();
19420 ;
19421 return 0;
19422}
19423_ACEOF
19424rm -f conftest.$ac_objext conftest$ac_exeext
19425if { (ac_try="$ac_link"
19426case "(($ac_try" in
19427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19428 *) ac_try_echo=$ac_try;;
19429esac
19430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19431 (eval "$ac_link") 2>conftest.er1
19432 ac_status=$?
19433 grep -v '^ *+' conftest.er1 >conftest.err
19434 rm -f conftest.er1
19435 cat conftest.err >&5
19436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19437 (exit $ac_status); } && {
19438 test -z "$ac_c_werror_flag" ||
19439 test ! -s conftest.err
19440 } && test -s conftest$ac_exeext &&
19441 $as_test_x conftest$ac_exeext; then
19442 ac_cv_func_lchflags=yes
19443else
19444 echo "$as_me: failed program was:" >&5
19445sed 's/^/| /' conftest.$ac_ext >&5
19446
19447 ac_cv_func_lchflags=no
19448fi
19449
19450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19451 conftest$ac_exeext conftest.$ac_ext
19452fi
19453{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19454echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19455if test $ac_cv_func_lchflags = yes; then
19456 ac_cv_have_lchflags="yes"
19457else
19458 ac_cv_have_lchflags="no"
19459fi
19460
19461fi
19462if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019463
19464cat >>confdefs.h <<\_ACEOF
19465#define HAVE_LCHFLAGS 1
19466_ACEOF
19467
19468fi
19469
Ronald Oussorenf8752642006-07-06 10:13:35 +000019470case $ac_sys_system/$ac_sys_release in
19471Darwin/*)
19472 _CUR_CFLAGS="${CFLAGS}"
19473 _CUR_LDFLAGS="${LDFLAGS}"
19474 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19475 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19476 ;;
19477esac
19478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019479{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19480echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019481if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019482 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019483else
19484 ac_check_lib_save_LIBS=$LIBS
19485LIBS="-lz $LIBS"
19486cat >conftest.$ac_ext <<_ACEOF
19487/* confdefs.h. */
19488_ACEOF
19489cat confdefs.h >>conftest.$ac_ext
19490cat >>conftest.$ac_ext <<_ACEOF
19491/* end confdefs.h. */
19492
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493/* Override any GCC internal prototype to avoid an error.
19494 Use char because int might match the return type of a GCC
19495 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019496#ifdef __cplusplus
19497extern "C"
19498#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019499char inflateCopy ();
19500int
19501main ()
19502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019504 ;
19505 return 0;
19506}
19507_ACEOF
19508rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019509if { (ac_try="$ac_link"
19510case "(($ac_try" in
19511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19512 *) ac_try_echo=$ac_try;;
19513esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019515 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019516 ac_status=$?
19517 grep -v '^ *+' conftest.er1 >conftest.err
19518 rm -f conftest.er1
19519 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521 (exit $ac_status); } && {
19522 test -z "$ac_c_werror_flag" ||
19523 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019524 } && test -s conftest$ac_exeext &&
19525 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019526 ac_cv_lib_z_inflateCopy=yes
19527else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019528 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019529sed 's/^/| /' conftest.$ac_ext >&5
19530
Martin v. Löwiseba40652007-08-30 20:10:57 +000019531 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019532fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019533
19534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019535 conftest$ac_exeext conftest.$ac_ext
19536LIBS=$ac_check_lib_save_LIBS
19537fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019538{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19539echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19540if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019541
19542cat >>confdefs.h <<\_ACEOF
19543#define HAVE_ZLIB_COPY 1
19544_ACEOF
19545
19546fi
19547
19548
Ronald Oussorenf8752642006-07-06 10:13:35 +000019549case $ac_sys_system/$ac_sys_release in
19550Darwin/*)
19551 CFLAGS="${_CUR_CFLAGS}"
19552 LDFLAGS="${_CUR_LDFLAGS}"
19553 ;;
19554esac
19555
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019556{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19557echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019559/* confdefs.h. */
19560_ACEOF
19561cat confdefs.h >>conftest.$ac_ext
19562cat >>conftest.$ac_ext <<_ACEOF
19563/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019564
19565#include "confdefs.h"
19566#include <netdb.h>
19567
Martin v. Löwise9416172003-05-03 10:12:45 +000019568int
19569main ()
19570{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019571void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019572 ;
19573 return 0;
19574}
19575_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019576rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019577if { (ac_try="$ac_link"
19578case "(($ac_try" in
19579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19580 *) ac_try_echo=$ac_try;;
19581esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019583 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585 grep -v '^ *+' conftest.er1 >conftest.err
19586 rm -f conftest.er1
19587 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589 (exit $ac_status); } && {
19590 test -z "$ac_c_werror_flag" ||
19591 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019592 } && test -s conftest$ac_exeext &&
19593 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019594
19595cat >>confdefs.h <<\_ACEOF
19596#define HAVE_HSTRERROR 1
19597_ACEOF
19598
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019599 { echo "$as_me:$LINENO: result: yes" >&5
19600echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019603sed 's/^/| /' conftest.$ac_ext >&5
19604
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019605 { echo "$as_me:$LINENO: result: no" >&5
19606echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019607
19608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609
19610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019612
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019613{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19614echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019616/* confdefs.h. */
19617_ACEOF
19618cat confdefs.h >>conftest.$ac_ext
19619cat >>conftest.$ac_ext <<_ACEOF
19620/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019621
19622#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019623#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019624#include <sys/socket.h>
19625#include <netinet/in.h>
19626#include <arpa/inet.h>
19627
Martin v. Löwise9416172003-05-03 10:12:45 +000019628int
19629main ()
19630{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019631void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019632 ;
19633 return 0;
19634}
19635_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019636rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019637if { (ac_try="$ac_link"
19638case "(($ac_try" in
19639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19640 *) ac_try_echo=$ac_try;;
19641esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019645 grep -v '^ *+' conftest.er1 >conftest.err
19646 rm -f conftest.er1
19647 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019649 (exit $ac_status); } && {
19650 test -z "$ac_c_werror_flag" ||
19651 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019652 } && test -s conftest$ac_exeext &&
19653 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019654
19655cat >>confdefs.h <<\_ACEOF
19656#define HAVE_INET_ATON 1
19657_ACEOF
19658
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019659 { echo "$as_me:$LINENO: result: yes" >&5
19660echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019663sed 's/^/| /' conftest.$ac_ext >&5
19664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665 { echo "$as_me:$LINENO: result: no" >&5
19666echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019667
19668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019669
19670rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019671 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019672
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019673{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19674echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019676/* confdefs.h. */
19677_ACEOF
19678cat confdefs.h >>conftest.$ac_ext
19679cat >>conftest.$ac_ext <<_ACEOF
19680/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019681
19682#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019683#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019684#include <sys/socket.h>
19685#include <netinet/in.h>
19686#include <arpa/inet.h>
19687
Martin v. Löwise9416172003-05-03 10:12:45 +000019688int
19689main ()
19690{
19691void* p = inet_pton
19692 ;
19693 return 0;
19694}
19695_ACEOF
19696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019697if { (ac_try="$ac_compile"
19698case "(($ac_try" in
19699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19700 *) ac_try_echo=$ac_try;;
19701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019705 grep -v '^ *+' conftest.er1 >conftest.err
19706 rm -f conftest.er1
19707 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709 (exit $ac_status); } && {
19710 test -z "$ac_c_werror_flag" ||
19711 test ! -s conftest.err
19712 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019713
19714cat >>confdefs.h <<\_ACEOF
19715#define HAVE_INET_PTON 1
19716_ACEOF
19717
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019718 { echo "$as_me:$LINENO: result: yes" >&5
19719echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019720else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019722sed 's/^/| /' conftest.$ac_ext >&5
19723
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019724 { echo "$as_me:$LINENO: result: no" >&5
19725echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019726
19727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019728
19729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019730
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019731# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019732{ echo "$as_me:$LINENO: checking for setgroups" >&5
19733echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019734cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019735/* confdefs.h. */
19736_ACEOF
19737cat confdefs.h >>conftest.$ac_ext
19738cat >>conftest.$ac_ext <<_ACEOF
19739/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019740
19741#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019742#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019743#ifdef HAVE_GRP_H
19744#include <grp.h>
19745#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019746
Martin v. Löwisd5843682002-11-21 20:41:28 +000019747int
19748main ()
19749{
19750void* p = setgroups
19751 ;
19752 return 0;
19753}
19754_ACEOF
19755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019756if { (ac_try="$ac_compile"
19757case "(($ac_try" in
19758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19759 *) ac_try_echo=$ac_try;;
19760esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019764 grep -v '^ *+' conftest.er1 >conftest.err
19765 rm -f conftest.er1
19766 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768 (exit $ac_status); } && {
19769 test -z "$ac_c_werror_flag" ||
19770 test ! -s conftest.err
19771 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019772
19773cat >>confdefs.h <<\_ACEOF
19774#define HAVE_SETGROUPS 1
19775_ACEOF
19776
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019777 { echo "$as_me:$LINENO: result: yes" >&5
19778echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019781sed 's/^/| /' conftest.$ac_ext >&5
19782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019783 { echo "$as_me:$LINENO: result: no" >&5
19784echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019785
19786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019787
19788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019789
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019790# check for openpty and forkpty
19791
Martin v. Löwis11437992002-04-12 09:54:03 +000019792
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019793for ac_func in openpty
19794do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19796{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019800else
Martin v. Löwis11437992002-04-12 09:54:03 +000019801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019802/* confdefs.h. */
19803_ACEOF
19804cat confdefs.h >>conftest.$ac_ext
19805cat >>conftest.$ac_ext <<_ACEOF
19806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019807/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19809#define $ac_func innocuous_$ac_func
19810
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019812 which can conflict with char $ac_func (); below.
19813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019814 <limits.h> exists even on freestanding compilers. */
19815
19816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019817# include <limits.h>
19818#else
19819# include <assert.h>
19820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019821
19822#undef $ac_func
19823
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824/* Override any GCC internal prototype to avoid an error.
19825 Use char because int might match the return type of a GCC
19826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019827#ifdef __cplusplus
19828extern "C"
19829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019830char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019831/* The GNU C library defines this for functions which it implements
19832 to always fail with ENOSYS. Some functions are actually named
19833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019834#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019835choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019836#endif
19837
Skip Montanaro6dead952003-09-25 14:50:04 +000019838int
19839main ()
19840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019841return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 ;
19843 return 0;
19844}
19845_ACEOF
19846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847if { (ac_try="$ac_link"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019853 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019862 } && test -s conftest$ac_exeext &&
19863 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019864 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019865else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019867sed 's/^/| /' conftest.$ac_ext >&5
19868
Martin v. Löwiseba40652007-08-30 20:10:57 +000019869 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871
19872rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019873 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019875ac_res=`eval echo '${'$as_ac_var'}'`
19876 { echo "$as_me:$LINENO: result: $ac_res" >&5
19877echo "${ECHO_T}$ac_res" >&6; }
19878if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019879 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019880#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019881_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019882
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019883else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019884 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19885echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019886if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019887 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019888else
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019890LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019892/* confdefs.h. */
19893_ACEOF
19894cat confdefs.h >>conftest.$ac_ext
19895cat >>conftest.$ac_ext <<_ACEOF
19896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019897
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898/* Override any GCC internal prototype to avoid an error.
19899 Use char because int might match the return type of a GCC
19900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019901#ifdef __cplusplus
19902extern "C"
19903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019904char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019905int
19906main ()
19907{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019908return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019909 ;
19910 return 0;
19911}
19912_ACEOF
19913rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019914if { (ac_try="$ac_link"
19915case "(($ac_try" in
19916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19917 *) ac_try_echo=$ac_try;;
19918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019922 grep -v '^ *+' conftest.er1 >conftest.err
19923 rm -f conftest.er1
19924 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926 (exit $ac_status); } && {
19927 test -z "$ac_c_werror_flag" ||
19928 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019929 } && test -s conftest$ac_exeext &&
19930 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019931 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019934sed 's/^/| /' conftest.$ac_ext >&5
19935
Martin v. Löwiseba40652007-08-30 20:10:57 +000019936 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019938
19939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019941LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019942fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019943{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19944echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19945if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019946 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019947#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019948_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019949 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019951 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19952echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019953if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019954 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019955else
19956 ac_check_lib_save_LIBS=$LIBS
19957LIBS="-lbsd $LIBS"
19958cat >conftest.$ac_ext <<_ACEOF
19959/* confdefs.h. */
19960_ACEOF
19961cat confdefs.h >>conftest.$ac_ext
19962cat >>conftest.$ac_ext <<_ACEOF
19963/* end confdefs.h. */
19964
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965/* Override any GCC internal prototype to avoid an error.
19966 Use char because int might match the return type of a GCC
19967 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019968#ifdef __cplusplus
19969extern "C"
19970#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019971char openpty ();
19972int
19973main ()
19974{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019975return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019976 ;
19977 return 0;
19978}
19979_ACEOF
19980rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019981if { (ac_try="$ac_link"
19982case "(($ac_try" in
19983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19984 *) ac_try_echo=$ac_try;;
19985esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019987 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019988 ac_status=$?
19989 grep -v '^ *+' conftest.er1 >conftest.err
19990 rm -f conftest.er1
19991 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993 (exit $ac_status); } && {
19994 test -z "$ac_c_werror_flag" ||
19995 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019996 } && test -s conftest$ac_exeext &&
19997 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019998 ac_cv_lib_bsd_openpty=yes
19999else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020000 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020001sed 's/^/| /' conftest.$ac_ext >&5
20002
Martin v. Löwiseba40652007-08-30 20:10:57 +000020003 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020005
20006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020007 conftest$ac_exeext conftest.$ac_ext
20008LIBS=$ac_check_lib_save_LIBS
20009fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020010{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20011echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20012if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020013 cat >>confdefs.h <<\_ACEOF
20014#define HAVE_OPENPTY 1
20015_ACEOF
20016 LIBS="$LIBS -lbsd"
20017fi
20018
20019
20020fi
20021
Fred Drake8cef4cf2000-06-28 16:40:38 +000020022
20023fi
20024done
20025
Martin v. Löwis11437992002-04-12 09:54:03 +000020026
Fred Drake8cef4cf2000-06-28 16:40:38 +000020027for ac_func in forkpty
20028do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020029as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20030{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20031echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020032if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020033 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020034else
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020036/* confdefs.h. */
20037_ACEOF
20038cat confdefs.h >>conftest.$ac_ext
20039cat >>conftest.$ac_ext <<_ACEOF
20040/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020041/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20042 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20043#define $ac_func innocuous_$ac_func
20044
Fred Drake8cef4cf2000-06-28 16:40:38 +000020045/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020046 which can conflict with char $ac_func (); below.
20047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020048 <limits.h> exists even on freestanding compilers. */
20049
20050#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020051# include <limits.h>
20052#else
20053# include <assert.h>
20054#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020055
20056#undef $ac_func
20057
Martin v. Löwiseba40652007-08-30 20:10:57 +000020058/* Override any GCC internal prototype to avoid an error.
20059 Use char because int might match the return type of a GCC
20060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020061#ifdef __cplusplus
20062extern "C"
20063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020064char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020065/* The GNU C library defines this for functions which it implements
20066 to always fail with ENOSYS. Some functions are actually named
20067 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020069choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020070#endif
20071
Skip Montanaro6dead952003-09-25 14:50:04 +000020072int
20073main ()
20074{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020076 ;
20077 return 0;
20078}
20079_ACEOF
20080rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020081if { (ac_try="$ac_link"
20082case "(($ac_try" in
20083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20084 *) ac_try_echo=$ac_try;;
20085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020087 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020089 grep -v '^ *+' conftest.er1 >conftest.err
20090 rm -f conftest.er1
20091 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020093 (exit $ac_status); } && {
20094 test -z "$ac_c_werror_flag" ||
20095 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020096 } && test -s conftest$ac_exeext &&
20097 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020098 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020101sed 's/^/| /' conftest.$ac_ext >&5
20102
Martin v. Löwiseba40652007-08-30 20:10:57 +000020103 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020105
20106rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020107 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020108fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020109ac_res=`eval echo '${'$as_ac_var'}'`
20110 { echo "$as_me:$LINENO: result: $ac_res" >&5
20111echo "${ECHO_T}$ac_res" >&6; }
20112if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020114#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020115_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020116
Fred Drake8cef4cf2000-06-28 16:40:38 +000020117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020118 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20119echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020120if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020121 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020122else
Martin v. Löwis11437992002-04-12 09:54:03 +000020123 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020124LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020126/* confdefs.h. */
20127_ACEOF
20128cat confdefs.h >>conftest.$ac_ext
20129cat >>conftest.$ac_ext <<_ACEOF
20130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020131
Martin v. Löwiseba40652007-08-30 20:10:57 +000020132/* Override any GCC internal prototype to avoid an error.
20133 Use char because int might match the return type of a GCC
20134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020135#ifdef __cplusplus
20136extern "C"
20137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020138char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020139int
20140main ()
20141{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020142return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020148if { (ac_try="$ac_link"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020154 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020163 } && test -s conftest$ac_exeext &&
20164 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020165 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020168sed 's/^/| /' conftest.$ac_ext >&5
20169
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020172
20173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020175LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020176fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020177{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20178echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20179if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020181#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020182_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020183 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020185 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20186echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020187if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020189else
20190 ac_check_lib_save_LIBS=$LIBS
20191LIBS="-lbsd $LIBS"
20192cat >conftest.$ac_ext <<_ACEOF
20193/* confdefs.h. */
20194_ACEOF
20195cat confdefs.h >>conftest.$ac_ext
20196cat >>conftest.$ac_ext <<_ACEOF
20197/* end confdefs.h. */
20198
Martin v. Löwiseba40652007-08-30 20:10:57 +000020199/* Override any GCC internal prototype to avoid an error.
20200 Use char because int might match the return type of a GCC
20201 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020202#ifdef __cplusplus
20203extern "C"
20204#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020205char forkpty ();
20206int
20207main ()
20208{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020209return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020210 ;
20211 return 0;
20212}
20213_ACEOF
20214rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020215if { (ac_try="$ac_link"
20216case "(($ac_try" in
20217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20218 *) ac_try_echo=$ac_try;;
20219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020221 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020222 ac_status=$?
20223 grep -v '^ *+' conftest.er1 >conftest.err
20224 rm -f conftest.er1
20225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020227 (exit $ac_status); } && {
20228 test -z "$ac_c_werror_flag" ||
20229 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020230 } && test -s conftest$ac_exeext &&
20231 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020232 ac_cv_lib_bsd_forkpty=yes
20233else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020234 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020235sed 's/^/| /' conftest.$ac_ext >&5
20236
Martin v. Löwiseba40652007-08-30 20:10:57 +000020237 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020239
20240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020241 conftest$ac_exeext conftest.$ac_ext
20242LIBS=$ac_check_lib_save_LIBS
20243fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020244{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20245echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20246if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020247 cat >>confdefs.h <<\_ACEOF
20248#define HAVE_FORKPTY 1
20249_ACEOF
20250 LIBS="$LIBS -lbsd"
20251fi
20252
20253
20254fi
20255
Fred Drake8cef4cf2000-06-28 16:40:38 +000020256
20257fi
20258done
20259
Jack Jansendd19cf82001-12-06 22:36:17 +000020260
Brett Cannonaa5778d2008-03-18 04:09:00 +000020261# Stuff for expat.
20262
20263for ac_func in memmove
20264do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020265as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20266{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20267echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020268if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020269 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020270else
20271 cat >conftest.$ac_ext <<_ACEOF
20272/* confdefs.h. */
20273_ACEOF
20274cat confdefs.h >>conftest.$ac_ext
20275cat >>conftest.$ac_ext <<_ACEOF
20276/* end confdefs.h. */
20277/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20278 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20279#define $ac_func innocuous_$ac_func
20280
20281/* System header to define __stub macros and hopefully few prototypes,
20282 which can conflict with char $ac_func (); below.
20283 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20284 <limits.h> exists even on freestanding compilers. */
20285
20286#ifdef __STDC__
20287# include <limits.h>
20288#else
20289# include <assert.h>
20290#endif
20291
20292#undef $ac_func
20293
20294/* Override any GCC internal prototype to avoid an error.
20295 Use char because int might match the return type of a GCC
20296 builtin and then its argument prototype would still apply. */
20297#ifdef __cplusplus
20298extern "C"
20299#endif
20300char $ac_func ();
20301/* The GNU C library defines this for functions which it implements
20302 to always fail with ENOSYS. Some functions are actually named
20303 something starting with __ and the normal name is an alias. */
20304#if defined __stub_$ac_func || defined __stub___$ac_func
20305choke me
20306#endif
20307
20308int
20309main ()
20310{
20311return $ac_func ();
20312 ;
20313 return 0;
20314}
20315_ACEOF
20316rm -f conftest.$ac_objext conftest$ac_exeext
20317if { (ac_try="$ac_link"
20318case "(($ac_try" in
20319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320 *) ac_try_echo=$ac_try;;
20321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020323 (eval "$ac_link") 2>conftest.er1
20324 ac_status=$?
20325 grep -v '^ *+' conftest.er1 >conftest.err
20326 rm -f conftest.er1
20327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020329 (exit $ac_status); } && {
20330 test -z "$ac_c_werror_flag" ||
20331 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020332 } && test -s conftest$ac_exeext &&
20333 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020334 eval "$as_ac_var=yes"
20335else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020336 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020337sed 's/^/| /' conftest.$ac_ext >&5
20338
20339 eval "$as_ac_var=no"
20340fi
20341
20342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20343 conftest$ac_exeext conftest.$ac_ext
20344fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020345ac_res=`eval echo '${'$as_ac_var'}'`
20346 { echo "$as_me:$LINENO: result: $ac_res" >&5
20347echo "${ECHO_T}$ac_res" >&6; }
20348if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020349 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020350#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020351_ACEOF
20352
20353fi
20354done
20355
20356
Michael W. Hudson54241132001-12-07 15:38:26 +000020357# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020358
20359
20360
20361
20362
20363
Fred Drake8cef4cf2000-06-28 16:40:38 +000020364for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20365do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020366as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20367{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20368echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020369if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020370 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020371else
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020373/* confdefs.h. */
20374_ACEOF
20375cat confdefs.h >>conftest.$ac_ext
20376cat >>conftest.$ac_ext <<_ACEOF
20377/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020378/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20379 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20380#define $ac_func innocuous_$ac_func
20381
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020382/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020383 which can conflict with char $ac_func (); below.
20384 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020385 <limits.h> exists even on freestanding compilers. */
20386
20387#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020388# include <limits.h>
20389#else
20390# include <assert.h>
20391#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020392
20393#undef $ac_func
20394
Martin v. Löwiseba40652007-08-30 20:10:57 +000020395/* Override any GCC internal prototype to avoid an error.
20396 Use char because int might match the return type of a GCC
20397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020398#ifdef __cplusplus
20399extern "C"
20400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020401char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020402/* The GNU C library defines this for functions which it implements
20403 to always fail with ENOSYS. Some functions are actually named
20404 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020405#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020406choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020407#endif
20408
Skip Montanaro6dead952003-09-25 14:50:04 +000020409int
20410main ()
20411{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020412return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020413 ;
20414 return 0;
20415}
20416_ACEOF
20417rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418if { (ac_try="$ac_link"
20419case "(($ac_try" in
20420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20421 *) ac_try_echo=$ac_try;;
20422esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020424 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020426 grep -v '^ *+' conftest.er1 >conftest.err
20427 rm -f conftest.er1
20428 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020430 (exit $ac_status); } && {
20431 test -z "$ac_c_werror_flag" ||
20432 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020433 } && test -s conftest$ac_exeext &&
20434 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020436else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020438sed 's/^/| /' conftest.$ac_ext >&5
20439
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020441fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020442
20443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020444 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020445fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020446ac_res=`eval echo '${'$as_ac_var'}'`
20447 { echo "$as_me:$LINENO: result: $ac_res" >&5
20448echo "${ECHO_T}$ac_res" >&6; }
20449if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020450 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020453
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020454fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020455done
20456
Michael W. Hudson54241132001-12-07 15:38:26 +000020457
Martin v. Löwis11437992002-04-12 09:54:03 +000020458
20459
20460
Brett Cannonaa5778d2008-03-18 04:09:00 +000020461for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020462do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020463as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20464{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20465echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020466if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020467 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020468else
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020470/* confdefs.h. */
20471_ACEOF
20472cat confdefs.h >>conftest.$ac_ext
20473cat >>conftest.$ac_ext <<_ACEOF
20474/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020475/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20476 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20477#define $ac_func innocuous_$ac_func
20478
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020479/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020480 which can conflict with char $ac_func (); below.
20481 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020482 <limits.h> exists even on freestanding compilers. */
20483
20484#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020485# include <limits.h>
20486#else
20487# include <assert.h>
20488#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020489
20490#undef $ac_func
20491
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492/* Override any GCC internal prototype to avoid an error.
20493 Use char because int might match the return type of a GCC
20494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020495#ifdef __cplusplus
20496extern "C"
20497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020498char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020499/* The GNU C library defines this for functions which it implements
20500 to always fail with ENOSYS. Some functions are actually named
20501 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020503choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020504#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020505
Skip Montanaro6dead952003-09-25 14:50:04 +000020506int
20507main ()
20508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020509return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020510 ;
20511 return 0;
20512}
20513_ACEOF
20514rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020515if { (ac_try="$ac_link"
20516case "(($ac_try" in
20517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20518 *) ac_try_echo=$ac_try;;
20519esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020521 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020523 grep -v '^ *+' conftest.er1 >conftest.err
20524 rm -f conftest.er1
20525 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527 (exit $ac_status); } && {
20528 test -z "$ac_c_werror_flag" ||
20529 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020530 } && test -s conftest$ac_exeext &&
20531 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020532 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020533else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020535sed 's/^/| /' conftest.$ac_ext >&5
20536
Martin v. Löwiseba40652007-08-30 20:10:57 +000020537 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020539
20540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020542fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020543ac_res=`eval echo '${'$as_ac_var'}'`
20544 { echo "$as_me:$LINENO: result: $ac_res" >&5
20545echo "${ECHO_T}$ac_res" >&6; }
20546if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020548#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020549_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020550
Martin v. Löwis1142de32002-03-29 16:28:31 +000020551else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020553 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020554 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20555 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020556esac
20557
Martin v. Löwis1142de32002-03-29 16:28:31 +000020558fi
20559done
20560
20561
Martin v. Löwis11437992002-04-12 09:54:03 +000020562
Martin v. Löwis1142de32002-03-29 16:28:31 +000020563for ac_func in getpgrp
20564do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020565as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20566{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20567echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020568if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020570else
Martin v. Löwis11437992002-04-12 09:54:03 +000020571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020572/* confdefs.h. */
20573_ACEOF
20574cat confdefs.h >>conftest.$ac_ext
20575cat >>conftest.$ac_ext <<_ACEOF
20576/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020577/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20579#define $ac_func innocuous_$ac_func
20580
Martin v. Löwis1142de32002-03-29 16:28:31 +000020581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020582 which can conflict with char $ac_func (); below.
20583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020584 <limits.h> exists even on freestanding compilers. */
20585
20586#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020587# include <limits.h>
20588#else
20589# include <assert.h>
20590#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020591
20592#undef $ac_func
20593
Martin v. Löwiseba40652007-08-30 20:10:57 +000020594/* Override any GCC internal prototype to avoid an error.
20595 Use char because int might match the return type of a GCC
20596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020597#ifdef __cplusplus
20598extern "C"
20599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020600char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020601/* The GNU C library defines this for functions which it implements
20602 to always fail with ENOSYS. Some functions are actually named
20603 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020604#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020605choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020606#endif
20607
Skip Montanaro6dead952003-09-25 14:50:04 +000020608int
20609main ()
20610{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020611return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 ;
20613 return 0;
20614}
20615_ACEOF
20616rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617if { (ac_try="$ac_link"
20618case "(($ac_try" in
20619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20620 *) ac_try_echo=$ac_try;;
20621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020623 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020625 grep -v '^ *+' conftest.er1 >conftest.err
20626 rm -f conftest.er1
20627 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020629 (exit $ac_status); } && {
20630 test -z "$ac_c_werror_flag" ||
20631 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020632 } && test -s conftest$ac_exeext &&
20633 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020637sed 's/^/| /' conftest.$ac_ext >&5
20638
Martin v. Löwiseba40652007-08-30 20:10:57 +000020639 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020641
20642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020643 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020645ac_res=`eval echo '${'$as_ac_var'}'`
20646 { echo "$as_me:$LINENO: result: $ac_res" >&5
20647echo "${ECHO_T}$ac_res" >&6; }
20648if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020649 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020650#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020651_ACEOF
20652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020653/* confdefs.h. */
20654_ACEOF
20655cat confdefs.h >>conftest.$ac_ext
20656cat >>conftest.$ac_ext <<_ACEOF
20657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020658#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020659int
20660main ()
20661{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020662getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 ;
20664 return 0;
20665}
20666_ACEOF
20667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020668if { (ac_try="$ac_compile"
20669case "(($ac_try" in
20670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20671 *) ac_try_echo=$ac_try;;
20672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020676 grep -v '^ *+' conftest.er1 >conftest.err
20677 rm -f conftest.er1
20678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680 (exit $ac_status); } && {
20681 test -z "$ac_c_werror_flag" ||
20682 test ! -s conftest.err
20683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020684
20685cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020686#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020687_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020688
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
Guido van Rossumf78abae1997-01-21 22:02:36 +000020690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020692sed 's/^/| /' conftest.$ac_ext >&5
20693
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694
Guido van Rossum627b2d71993-12-24 10:39:16 +000020695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020696
20697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020698
Guido van Rossum627b2d71993-12-24 10:39:16 +000020699fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020700done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020701
Jack Jansen150753c2003-03-29 22:07:47 +000020702
20703for ac_func in setpgrp
20704do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020705as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20706{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20707echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020708if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020709 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020710else
Martin v. Löwis11437992002-04-12 09:54:03 +000020711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020712/* confdefs.h. */
20713_ACEOF
20714cat confdefs.h >>conftest.$ac_ext
20715cat >>conftest.$ac_ext <<_ACEOF
20716/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020717/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20718 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20719#define $ac_func innocuous_$ac_func
20720
Jack Jansen150753c2003-03-29 22:07:47 +000020721/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020722 which can conflict with char $ac_func (); below.
20723 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020724 <limits.h> exists even on freestanding compilers. */
20725
20726#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020727# include <limits.h>
20728#else
20729# include <assert.h>
20730#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020731
20732#undef $ac_func
20733
Martin v. Löwiseba40652007-08-30 20:10:57 +000020734/* Override any GCC internal prototype to avoid an error.
20735 Use char because int might match the return type of a GCC
20736 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020737#ifdef __cplusplus
20738extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020739#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020740char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020741/* The GNU C library defines this for functions which it implements
20742 to always fail with ENOSYS. Some functions are actually named
20743 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020745choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020746#endif
20747
Skip Montanaro6dead952003-09-25 14:50:04 +000020748int
20749main ()
20750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020751return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 ;
20753 return 0;
20754}
20755_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020756rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757if { (ac_try="$ac_link"
20758case "(($ac_try" in
20759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20760 *) ac_try_echo=$ac_try;;
20761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020765 grep -v '^ *+' conftest.er1 >conftest.err
20766 rm -f conftest.er1
20767 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020769 (exit $ac_status); } && {
20770 test -z "$ac_c_werror_flag" ||
20771 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020772 } && test -s conftest$ac_exeext &&
20773 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020774 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020775else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020777sed 's/^/| /' conftest.$ac_ext >&5
20778
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781
20782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020783 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020785ac_res=`eval echo '${'$as_ac_var'}'`
20786 { echo "$as_me:$LINENO: result: $ac_res" >&5
20787echo "${ECHO_T}$ac_res" >&6; }
20788if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020789 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020790#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020791_ACEOF
20792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020793/* confdefs.h. */
20794_ACEOF
20795cat confdefs.h >>conftest.$ac_ext
20796cat >>conftest.$ac_ext <<_ACEOF
20797/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020798#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020799int
20800main ()
20801{
20802setpgrp(0,0);
20803 ;
20804 return 0;
20805}
20806_ACEOF
20807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808if { (ac_try="$ac_compile"
20809case "(($ac_try" in
20810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20811 *) ac_try_echo=$ac_try;;
20812esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020816 grep -v '^ *+' conftest.er1 >conftest.err
20817 rm -f conftest.er1
20818 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020820 (exit $ac_status); } && {
20821 test -z "$ac_c_werror_flag" ||
20822 test ! -s conftest.err
20823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020824
20825cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020826#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020827_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020828
Jack Jansen150753c2003-03-29 22:07:47 +000020829
20830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020832sed 's/^/| /' conftest.$ac_ext >&5
20833
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020836
20837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020838
20839fi
20840done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020841
Martin v. Löwis11437992002-04-12 09:54:03 +000020842
Thomas Wouters3a584202000-08-05 23:28:51 +000020843for ac_func in gettimeofday
20844do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020845as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20846{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20847echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020849 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020850else
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020852/* confdefs.h. */
20853_ACEOF
20854cat confdefs.h >>conftest.$ac_ext
20855cat >>conftest.$ac_ext <<_ACEOF
20856/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020857/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20858 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20859#define $ac_func innocuous_$ac_func
20860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020861/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020862 which can conflict with char $ac_func (); below.
20863 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020864 <limits.h> exists even on freestanding compilers. */
20865
20866#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020867# include <limits.h>
20868#else
20869# include <assert.h>
20870#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020871
20872#undef $ac_func
20873
Martin v. Löwiseba40652007-08-30 20:10:57 +000020874/* Override any GCC internal prototype to avoid an error.
20875 Use char because int might match the return type of a GCC
20876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020877#ifdef __cplusplus
20878extern "C"
20879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020880char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020881/* The GNU C library defines this for functions which it implements
20882 to always fail with ENOSYS. Some functions are actually named
20883 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020884#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020885choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886#endif
20887
Skip Montanaro6dead952003-09-25 14:50:04 +000020888int
20889main ()
20890{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020892 ;
20893 return 0;
20894}
20895_ACEOF
20896rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897if { (ac_try="$ac_link"
20898case "(($ac_try" in
20899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20900 *) ac_try_echo=$ac_try;;
20901esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020903 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020905 grep -v '^ *+' conftest.er1 >conftest.err
20906 rm -f conftest.er1
20907 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020909 (exit $ac_status); } && {
20910 test -z "$ac_c_werror_flag" ||
20911 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020912 } && test -s conftest$ac_exeext &&
20913 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020915else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020917sed 's/^/| /' conftest.$ac_ext >&5
20918
Martin v. Löwiseba40652007-08-30 20:10:57 +000020919 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020921
20922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020923 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020925ac_res=`eval echo '${'$as_ac_var'}'`
20926 { echo "$as_me:$LINENO: result: $ac_res" >&5
20927echo "${ECHO_T}$ac_res" >&6; }
20928if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020929 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020930#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020931_ACEOF
20932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020933/* confdefs.h. */
20934_ACEOF
20935cat confdefs.h >>conftest.$ac_ext
20936cat >>conftest.$ac_ext <<_ACEOF
20937/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020938#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020939int
20940main ()
20941{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020942gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 ;
20944 return 0;
20945}
20946_ACEOF
20947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020948if { (ac_try="$ac_compile"
20949case "(($ac_try" in
20950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20951 *) ac_try_echo=$ac_try;;
20952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020956 grep -v '^ *+' conftest.er1 >conftest.err
20957 rm -f conftest.er1
20958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020960 (exit $ac_status); } && {
20961 test -z "$ac_c_werror_flag" ||
20962 test ! -s conftest.err
20963 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020964 :
20965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020967sed 's/^/| /' conftest.$ac_ext >&5
20968
Martin v. Löwis11437992002-04-12 09:54:03 +000020969
20970cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020971#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020973
Martin v. Löwis11437992002-04-12 09:54:03 +000020974
Guido van Rossum627b2d71993-12-24 10:39:16 +000020975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020976
20977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020979fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020980done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020981
Michael W. Hudson54241132001-12-07 15:38:26 +000020982
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020983{ echo "$as_me:$LINENO: checking for major" >&5
20984echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020985cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020986/* confdefs.h. */
20987_ACEOF
20988cat confdefs.h >>conftest.$ac_ext
20989cat >>conftest.$ac_ext <<_ACEOF
20990/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020991
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020992#if defined(MAJOR_IN_MKDEV)
20993#include <sys/mkdev.h>
20994#elif defined(MAJOR_IN_SYSMACROS)
20995#include <sys/sysmacros.h>
20996#else
20997#include <sys/types.h>
20998#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020999
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021000int
21001main ()
21002{
21003
21004 makedev(major(0),minor(0));
21005
21006 ;
21007 return 0;
21008}
21009_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021010rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021011if { (ac_try="$ac_link"
21012case "(($ac_try" in
21013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21014 *) ac_try_echo=$ac_try;;
21015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021017 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021019 grep -v '^ *+' conftest.er1 >conftest.err
21020 rm -f conftest.er1
21021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021023 (exit $ac_status); } && {
21024 test -z "$ac_c_werror_flag" ||
21025 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021026 } && test -s conftest$ac_exeext &&
21027 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021028
21029
21030cat >>confdefs.h <<\_ACEOF
21031#define HAVE_DEVICE_MACROS 1
21032_ACEOF
21033
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021034 { echo "$as_me:$LINENO: result: yes" >&5
21035echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021036
21037else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021039sed 's/^/| /' conftest.$ac_ext >&5
21040
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021041
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021042 { echo "$as_me:$LINENO: result: no" >&5
21043echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021044
21045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021046
21047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021048 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021049
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021050# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021051# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021052{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21053echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021055/* confdefs.h. */
21056_ACEOF
21057cat confdefs.h >>conftest.$ac_ext
21058cat >>conftest.$ac_ext <<_ACEOF
21059/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021060
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021061#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021062#include <sys/socket.h>
21063#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021064#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021065
Martin v. Löwis11437992002-04-12 09:54:03 +000021066int
21067main ()
21068{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021069getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 ;
21071 return 0;
21072}
21073_ACEOF
21074rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075if { (ac_try="$ac_link"
21076case "(($ac_try" in
21077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21078 *) ac_try_echo=$ac_try;;
21079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021083 grep -v '^ *+' conftest.er1 >conftest.err
21084 rm -f conftest.er1
21085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087 (exit $ac_status); } && {
21088 test -z "$ac_c_werror_flag" ||
21089 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021090 } && test -s conftest$ac_exeext &&
21091 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021092 have_getaddrinfo=yes
21093else
21094 echo "$as_me: failed program was:" >&5
21095sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021096
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021097 have_getaddrinfo=no
21098fi
21099
21100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21101 conftest$ac_exeext conftest.$ac_ext
21102{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21103echo "${ECHO_T}$have_getaddrinfo" >&6; }
21104if test $have_getaddrinfo = yes
21105then
21106 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021107echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021108 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21109 echo $ECHO_N "(cached) $ECHO_C" >&6
21110else
21111 if test "$cross_compiling" = yes; then
21112 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021113else
Martin v. Löwis11437992002-04-12 09:54:03 +000021114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021115/* confdefs.h. */
21116_ACEOF
21117cat confdefs.h >>conftest.$ac_ext
21118cat >>conftest.$ac_ext <<_ACEOF
21119/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021120
21121#include <sys/types.h>
21122#include <netdb.h>
21123#include <string.h>
21124#include <sys/socket.h>
21125#include <netinet/in.h>
21126
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021127int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021128{
21129 int passive, gaierr, inet4 = 0, inet6 = 0;
21130 struct addrinfo hints, *ai, *aitop;
21131 char straddr[INET6_ADDRSTRLEN], strport[16];
21132
21133 for (passive = 0; passive <= 1; passive++) {
21134 memset(&hints, 0, sizeof(hints));
21135 hints.ai_family = AF_UNSPEC;
21136 hints.ai_flags = passive ? AI_PASSIVE : 0;
21137 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021138 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021139 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21140 (void)gai_strerror(gaierr);
21141 goto bad;
21142 }
21143 for (ai = aitop; ai; ai = ai->ai_next) {
21144 if (ai->ai_addr == NULL ||
21145 ai->ai_addrlen == 0 ||
21146 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21147 straddr, sizeof(straddr), strport, sizeof(strport),
21148 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21149 goto bad;
21150 }
21151 switch (ai->ai_family) {
21152 case AF_INET:
21153 if (strcmp(strport, "54321") != 0) {
21154 goto bad;
21155 }
21156 if (passive) {
21157 if (strcmp(straddr, "0.0.0.0") != 0) {
21158 goto bad;
21159 }
21160 } else {
21161 if (strcmp(straddr, "127.0.0.1") != 0) {
21162 goto bad;
21163 }
21164 }
21165 inet4++;
21166 break;
21167 case AF_INET6:
21168 if (strcmp(strport, "54321") != 0) {
21169 goto bad;
21170 }
21171 if (passive) {
21172 if (strcmp(straddr, "::") != 0) {
21173 goto bad;
21174 }
21175 } else {
21176 if (strcmp(straddr, "::1") != 0) {
21177 goto bad;
21178 }
21179 }
21180 inet6++;
21181 break;
21182 case AF_UNSPEC:
21183 goto bad;
21184 break;
21185 default:
21186 /* another family support? */
21187 break;
21188 }
21189 }
21190 }
21191
21192 if (!(inet4 == 0 || inet4 == 2))
21193 goto bad;
21194 if (!(inet6 == 0 || inet6 == 2))
21195 goto bad;
21196
21197 if (aitop)
21198 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021199 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021200
21201 bad:
21202 if (aitop)
21203 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021204 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021205}
21206
Martin v. Löwis11437992002-04-12 09:54:03 +000021207_ACEOF
21208rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021209if { (ac_try="$ac_link"
21210case "(($ac_try" in
21211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21212 *) ac_try_echo=$ac_try;;
21213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021219 { (case "(($ac_try" in
21220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21221 *) ac_try_echo=$ac_try;;
21222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021224 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021225 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021227 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021228 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021230 echo "$as_me: program exited with status $ac_status" >&5
21231echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021232sed 's/^/| /' conftest.$ac_ext >&5
21233
Martin v. Löwis11437992002-04-12 09:54:03 +000021234( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021235ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021236fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021237rm -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 +000021238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021239
21240
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021241fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021242
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021245if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021246then
21247 if test $ipv6 = yes
21248 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021249 echo 'Fatal: You must get working getaddrinfo() function.'
21250 echo ' or you can specify "--disable-ipv6"'.
21251 exit 1
21252 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021253else
Martin v. Löwis11437992002-04-12 09:54:03 +000021254
21255cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021256#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021257_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021258
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021259fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021260
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021261for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021262do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021263as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21264{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21265echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021267 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021268else
Martin v. Löwis11437992002-04-12 09:54:03 +000021269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021270/* confdefs.h. */
21271_ACEOF
21272cat confdefs.h >>conftest.$ac_ext
21273cat >>conftest.$ac_ext <<_ACEOF
21274/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021275/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21276 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21277#define $ac_func innocuous_$ac_func
21278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021279/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021280 which can conflict with char $ac_func (); below.
21281 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021282 <limits.h> exists even on freestanding compilers. */
21283
21284#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021285# include <limits.h>
21286#else
21287# include <assert.h>
21288#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021289
21290#undef $ac_func
21291
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292/* Override any GCC internal prototype to avoid an error.
21293 Use char because int might match the return type of a GCC
21294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021295#ifdef __cplusplus
21296extern "C"
21297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021298char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021299/* The GNU C library defines this for functions which it implements
21300 to always fail with ENOSYS. Some functions are actually named
21301 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021302#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021303choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021304#endif
21305
Skip Montanaro6dead952003-09-25 14:50:04 +000021306int
21307main ()
21308{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021309return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021310 ;
21311 return 0;
21312}
21313_ACEOF
21314rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021315if { (ac_try="$ac_link"
21316case "(($ac_try" in
21317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21318 *) ac_try_echo=$ac_try;;
21319esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021323 grep -v '^ *+' conftest.er1 >conftest.err
21324 rm -f conftest.er1
21325 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327 (exit $ac_status); } && {
21328 test -z "$ac_c_werror_flag" ||
21329 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021330 } && test -s conftest$ac_exeext &&
21331 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021332 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021333else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021335sed 's/^/| /' conftest.$ac_ext >&5
21336
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021339
21340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021341 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021342fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021343ac_res=`eval echo '${'$as_ac_var'}'`
21344 { echo "$as_me:$LINENO: result: $ac_res" >&5
21345echo "${ECHO_T}$ac_res" >&6; }
21346if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021347 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021348#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021349_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021351fi
21352done
21353
Michael W. Hudson54241132001-12-07 15:38:26 +000021354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021355# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021356{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21357echo $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 +000021358if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021360else
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021362/* confdefs.h. */
21363_ACEOF
21364cat confdefs.h >>conftest.$ac_ext
21365cat >>conftest.$ac_ext <<_ACEOF
21366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021367#include <sys/types.h>
21368#include <sys/time.h>
21369#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021370
Martin v. Löwis11437992002-04-12 09:54:03 +000021371int
21372main ()
21373{
21374if ((struct tm *) 0)
21375return 0;
21376 ;
21377 return 0;
21378}
21379_ACEOF
21380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381if { (ac_try="$ac_compile"
21382case "(($ac_try" in
21383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21384 *) ac_try_echo=$ac_try;;
21385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021389 grep -v '^ *+' conftest.er1 >conftest.err
21390 rm -f conftest.er1
21391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021393 (exit $ac_status); } && {
21394 test -z "$ac_c_werror_flag" ||
21395 test ! -s conftest.err
21396 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021397 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021400sed 's/^/| /' conftest.$ac_ext >&5
21401
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021404
21405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021406fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021407{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21408echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021409if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021410
21411cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021412#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021413_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021414
21415fi
21416
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021417{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21418echo $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 +000021419if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021420 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021421else
Martin v. Löwis11437992002-04-12 09:54:03 +000021422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021423/* confdefs.h. */
21424_ACEOF
21425cat confdefs.h >>conftest.$ac_ext
21426cat >>conftest.$ac_ext <<_ACEOF
21427/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021428#include <sys/types.h>
21429#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021430
Martin v. Löwis11437992002-04-12 09:54:03 +000021431int
21432main ()
21433{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021434struct tm tm;
21435 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021436 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021437 ;
21438 return 0;
21439}
21440_ACEOF
21441rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021442if { (ac_try="$ac_compile"
21443case "(($ac_try" in
21444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21445 *) ac_try_echo=$ac_try;;
21446esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021449 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021450 grep -v '^ *+' conftest.er1 >conftest.err
21451 rm -f conftest.er1
21452 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454 (exit $ac_status); } && {
21455 test -z "$ac_c_werror_flag" ||
21456 test ! -s conftest.err
21457 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021458 ac_cv_struct_tm=time.h
21459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021461sed 's/^/| /' conftest.$ac_ext >&5
21462
Martin v. Löwiseba40652007-08-30 20:10:57 +000021463 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465
21466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021467fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021468{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21469echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021470if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021471
21472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021473#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021474_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021475
21476fi
21477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021478{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21479echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021480if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021481 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021482else
Martin v. Löwis11437992002-04-12 09:54:03 +000021483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021484/* confdefs.h. */
21485_ACEOF
21486cat confdefs.h >>conftest.$ac_ext
21487cat >>conftest.$ac_ext <<_ACEOF
21488/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021489#include <sys/types.h>
21490#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021491
21492
Martin v. Löwis11437992002-04-12 09:54:03 +000021493int
21494main ()
21495{
21496static struct tm ac_aggr;
21497if (ac_aggr.tm_zone)
21498return 0;
21499 ;
21500 return 0;
21501}
21502_ACEOF
21503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021504if { (ac_try="$ac_compile"
21505case "(($ac_try" in
21506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21507 *) ac_try_echo=$ac_try;;
21508esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021512 grep -v '^ *+' conftest.er1 >conftest.err
21513 rm -f conftest.er1
21514 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021516 (exit $ac_status); } && {
21517 test -z "$ac_c_werror_flag" ||
21518 test ! -s conftest.err
21519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021520 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021522 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021523sed 's/^/| /' conftest.$ac_ext >&5
21524
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021526/* confdefs.h. */
21527_ACEOF
21528cat confdefs.h >>conftest.$ac_ext
21529cat >>conftest.$ac_ext <<_ACEOF
21530/* end confdefs.h. */
21531#include <sys/types.h>
21532#include <$ac_cv_struct_tm>
21533
21534
21535int
21536main ()
21537{
21538static struct tm ac_aggr;
21539if (sizeof ac_aggr.tm_zone)
21540return 0;
21541 ;
21542 return 0;
21543}
21544_ACEOF
21545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546if { (ac_try="$ac_compile"
21547case "(($ac_try" in
21548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21549 *) ac_try_echo=$ac_try;;
21550esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021554 grep -v '^ *+' conftest.er1 >conftest.err
21555 rm -f conftest.er1
21556 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021558 (exit $ac_status); } && {
21559 test -z "$ac_c_werror_flag" ||
21560 test ! -s conftest.err
21561 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021562 ac_cv_member_struct_tm_tm_zone=yes
21563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021565sed 's/^/| /' conftest.$ac_ext >&5
21566
Martin v. Löwiseba40652007-08-30 20:10:57 +000021567 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569
21570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021572
21573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021574fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021575{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21576echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21577if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021578
21579cat >>confdefs.h <<_ACEOF
21580#define HAVE_STRUCT_TM_TM_ZONE 1
21581_ACEOF
21582
21583
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021584fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021585
Martin v. Löwis11437992002-04-12 09:54:03 +000021586if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21587
21588cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021589#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021590_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021591
21592else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021593 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21594echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021595if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021596 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597else
21598 cat >conftest.$ac_ext <<_ACEOF
21599/* confdefs.h. */
21600_ACEOF
21601cat confdefs.h >>conftest.$ac_ext
21602cat >>conftest.$ac_ext <<_ACEOF
21603/* end confdefs.h. */
21604#include <time.h>
21605
21606int
21607main ()
21608{
21609#ifndef tzname
21610 (void) tzname;
21611#endif
21612
21613 ;
21614 return 0;
21615}
21616_ACEOF
21617rm -f conftest.$ac_objext
21618if { (ac_try="$ac_compile"
21619case "(($ac_try" in
21620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21621 *) ac_try_echo=$ac_try;;
21622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624 (eval "$ac_compile") 2>conftest.er1
21625 ac_status=$?
21626 grep -v '^ *+' conftest.er1 >conftest.err
21627 rm -f conftest.er1
21628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630 (exit $ac_status); } && {
21631 test -z "$ac_c_werror_flag" ||
21632 test ! -s conftest.err
21633 } && test -s conftest.$ac_objext; then
21634 ac_cv_have_decl_tzname=yes
21635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021636 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637sed 's/^/| /' conftest.$ac_ext >&5
21638
21639 ac_cv_have_decl_tzname=no
21640fi
21641
21642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21643fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021644{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21645echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21646if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021647
21648cat >>confdefs.h <<_ACEOF
21649#define HAVE_DECL_TZNAME 1
21650_ACEOF
21651
21652
21653else
21654 cat >>confdefs.h <<_ACEOF
21655#define HAVE_DECL_TZNAME 0
21656_ACEOF
21657
21658
21659fi
21660
21661
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021662 { echo "$as_me:$LINENO: checking for tzname" >&5
21663echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021664if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021666else
Martin v. Löwis11437992002-04-12 09:54:03 +000021667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021668/* confdefs.h. */
21669_ACEOF
21670cat confdefs.h >>conftest.$ac_ext
21671cat >>conftest.$ac_ext <<_ACEOF
21672/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021673#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674#if !HAVE_DECL_TZNAME
21675extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021677
Martin v. Löwis11437992002-04-12 09:54:03 +000021678int
21679main ()
21680{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021682 ;
21683 return 0;
21684}
21685_ACEOF
21686rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021687if { (ac_try="$ac_link"
21688case "(($ac_try" in
21689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21690 *) ac_try_echo=$ac_try;;
21691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021695 grep -v '^ *+' conftest.er1 >conftest.err
21696 rm -f conftest.er1
21697 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699 (exit $ac_status); } && {
21700 test -z "$ac_c_werror_flag" ||
21701 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021702 } && test -s conftest$ac_exeext &&
21703 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021704 ac_cv_var_tzname=yes
21705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021707sed 's/^/| /' conftest.$ac_ext >&5
21708
Martin v. Löwiseba40652007-08-30 20:10:57 +000021709 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711
21712rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021713 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021714fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021715{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21716echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021717 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021718
21719cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021720#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021723 fi
21724fi
21725
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021726{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21727echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021728if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021729 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021730else
21731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021732/* confdefs.h. */
21733_ACEOF
21734cat confdefs.h >>conftest.$ac_ext
21735cat >>conftest.$ac_ext <<_ACEOF
21736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021737$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021738int
21739main ()
21740{
21741static struct stat ac_aggr;
21742if (ac_aggr.st_rdev)
21743return 0;
21744 ;
21745 return 0;
21746}
21747_ACEOF
21748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021749if { (ac_try="$ac_compile"
21750case "(($ac_try" in
21751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21752 *) ac_try_echo=$ac_try;;
21753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021757 grep -v '^ *+' conftest.er1 >conftest.err
21758 rm -f conftest.er1
21759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021761 (exit $ac_status); } && {
21762 test -z "$ac_c_werror_flag" ||
21763 test ! -s conftest.err
21764 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021765 ac_cv_member_struct_stat_st_rdev=yes
21766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021768sed 's/^/| /' conftest.$ac_ext >&5
21769
Martin v. Löwiseba40652007-08-30 20:10:57 +000021770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021771/* confdefs.h. */
21772_ACEOF
21773cat confdefs.h >>conftest.$ac_ext
21774cat >>conftest.$ac_ext <<_ACEOF
21775/* end confdefs.h. */
21776$ac_includes_default
21777int
21778main ()
21779{
21780static struct stat ac_aggr;
21781if (sizeof ac_aggr.st_rdev)
21782return 0;
21783 ;
21784 return 0;
21785}
21786_ACEOF
21787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021788if { (ac_try="$ac_compile"
21789case "(($ac_try" in
21790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21791 *) ac_try_echo=$ac_try;;
21792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021796 grep -v '^ *+' conftest.er1 >conftest.err
21797 rm -f conftest.er1
21798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021800 (exit $ac_status); } && {
21801 test -z "$ac_c_werror_flag" ||
21802 test ! -s conftest.err
21803 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021804 ac_cv_member_struct_stat_st_rdev=yes
21805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021807sed 's/^/| /' conftest.$ac_ext >&5
21808
Martin v. Löwiseba40652007-08-30 20:10:57 +000021809 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021811
21812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021814
21815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021816fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021817{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21818echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21819if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021820
21821cat >>confdefs.h <<_ACEOF
21822#define HAVE_STRUCT_STAT_ST_RDEV 1
21823_ACEOF
21824
21825
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021826fi
21827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021828{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21829echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021830if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021831 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021832else
Martin v. Löwis11437992002-04-12 09:54:03 +000021833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021839$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021840int
21841main ()
21842{
21843static struct stat ac_aggr;
21844if (ac_aggr.st_blksize)
21845return 0;
21846 ;
21847 return 0;
21848}
21849_ACEOF
21850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021851if { (ac_try="$ac_compile"
21852case "(($ac_try" in
21853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21854 *) ac_try_echo=$ac_try;;
21855esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021859 grep -v '^ *+' conftest.er1 >conftest.err
21860 rm -f conftest.er1
21861 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863 (exit $ac_status); } && {
21864 test -z "$ac_c_werror_flag" ||
21865 test ! -s conftest.err
21866 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021870sed 's/^/| /' conftest.$ac_ext >&5
21871
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021873/* confdefs.h. */
21874_ACEOF
21875cat confdefs.h >>conftest.$ac_ext
21876cat >>conftest.$ac_ext <<_ACEOF
21877/* end confdefs.h. */
21878$ac_includes_default
21879int
21880main ()
21881{
21882static struct stat ac_aggr;
21883if (sizeof ac_aggr.st_blksize)
21884return 0;
21885 ;
21886 return 0;
21887}
21888_ACEOF
21889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021890if { (ac_try="$ac_compile"
21891case "(($ac_try" in
21892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21893 *) ac_try_echo=$ac_try;;
21894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021896 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021898 grep -v '^ *+' conftest.er1 >conftest.err
21899 rm -f conftest.er1
21900 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021902 (exit $ac_status); } && {
21903 test -z "$ac_c_werror_flag" ||
21904 test ! -s conftest.err
21905 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021906 ac_cv_member_struct_stat_st_blksize=yes
21907else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021909sed 's/^/| /' conftest.$ac_ext >&5
21910
Martin v. Löwiseba40652007-08-30 20:10:57 +000021911 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021913
21914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021916
21917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021918fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021919{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21920echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21921if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021922
Martin v. Löwis11437992002-04-12 09:54:03 +000021923cat >>confdefs.h <<_ACEOF
21924#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21925_ACEOF
21926
21927
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021928fi
21929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021930{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21931echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021932if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021933 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021934else
21935 cat >conftest.$ac_ext <<_ACEOF
21936/* confdefs.h. */
21937_ACEOF
21938cat confdefs.h >>conftest.$ac_ext
21939cat >>conftest.$ac_ext <<_ACEOF
21940/* end confdefs.h. */
21941$ac_includes_default
21942int
21943main ()
21944{
21945static struct stat ac_aggr;
21946if (ac_aggr.st_flags)
21947return 0;
21948 ;
21949 return 0;
21950}
21951_ACEOF
21952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021953if { (ac_try="$ac_compile"
21954case "(($ac_try" in
21955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21956 *) ac_try_echo=$ac_try;;
21957esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021959 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021960 ac_status=$?
21961 grep -v '^ *+' conftest.er1 >conftest.err
21962 rm -f conftest.er1
21963 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021965 (exit $ac_status); } && {
21966 test -z "$ac_c_werror_flag" ||
21967 test ! -s conftest.err
21968 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021969 ac_cv_member_struct_stat_st_flags=yes
21970else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021971 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021972sed 's/^/| /' conftest.$ac_ext >&5
21973
Martin v. Löwiseba40652007-08-30 20:10:57 +000021974 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021975/* confdefs.h. */
21976_ACEOF
21977cat confdefs.h >>conftest.$ac_ext
21978cat >>conftest.$ac_ext <<_ACEOF
21979/* end confdefs.h. */
21980$ac_includes_default
21981int
21982main ()
21983{
21984static struct stat ac_aggr;
21985if (sizeof ac_aggr.st_flags)
21986return 0;
21987 ;
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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021999 ac_status=$?
22000 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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022008 ac_cv_member_struct_stat_st_flags=yes
22009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022010 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022011sed 's/^/| /' conftest.$ac_ext >&5
22012
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022015
22016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022018
22019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022020fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022021{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22022echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22023if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022024
22025cat >>confdefs.h <<_ACEOF
22026#define HAVE_STRUCT_STAT_ST_FLAGS 1
22027_ACEOF
22028
22029
22030fi
22031
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022032{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22033echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022034if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022036else
22037 cat >conftest.$ac_ext <<_ACEOF
22038/* confdefs.h. */
22039_ACEOF
22040cat confdefs.h >>conftest.$ac_ext
22041cat >>conftest.$ac_ext <<_ACEOF
22042/* end confdefs.h. */
22043$ac_includes_default
22044int
22045main ()
22046{
22047static struct stat ac_aggr;
22048if (ac_aggr.st_gen)
22049return 0;
22050 ;
22051 return 0;
22052}
22053_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öwisebd9d5b2005-08-09 15:00:59 +000022062 ac_status=$?
22063 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
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022071 ac_cv_member_struct_stat_st_gen=yes
22072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022073 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022074sed 's/^/| /' conftest.$ac_ext >&5
22075
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022077/* confdefs.h. */
22078_ACEOF
22079cat confdefs.h >>conftest.$ac_ext
22080cat >>conftest.$ac_ext <<_ACEOF
22081/* end confdefs.h. */
22082$ac_includes_default
22083int
22084main ()
22085{
22086static struct stat ac_aggr;
22087if (sizeof ac_aggr.st_gen)
22088return 0;
22089 ;
22090 return 0;
22091}
22092_ACEOF
22093rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022094if { (ac_try="$ac_compile"
22095case "(($ac_try" in
22096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22097 *) ac_try_echo=$ac_try;;
22098esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022101 ac_status=$?
22102 grep -v '^ *+' conftest.er1 >conftest.err
22103 rm -f conftest.er1
22104 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106 (exit $ac_status); } && {
22107 test -z "$ac_c_werror_flag" ||
22108 test ! -s conftest.err
22109 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022110 ac_cv_member_struct_stat_st_gen=yes
22111else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022112 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022113sed 's/^/| /' conftest.$ac_ext >&5
22114
Martin v. Löwiseba40652007-08-30 20:10:57 +000022115 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022117
22118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022120
22121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022123{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22124echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22125if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022126
22127cat >>confdefs.h <<_ACEOF
22128#define HAVE_STRUCT_STAT_ST_GEN 1
22129_ACEOF
22130
22131
22132fi
22133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022134{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22135echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022136if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022137 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022138else
22139 cat >conftest.$ac_ext <<_ACEOF
22140/* confdefs.h. */
22141_ACEOF
22142cat confdefs.h >>conftest.$ac_ext
22143cat >>conftest.$ac_ext <<_ACEOF
22144/* end confdefs.h. */
22145$ac_includes_default
22146int
22147main ()
22148{
22149static struct stat ac_aggr;
22150if (ac_aggr.st_birthtime)
22151return 0;
22152 ;
22153 return 0;
22154}
22155_ACEOF
22156rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022157if { (ac_try="$ac_compile"
22158case "(($ac_try" in
22159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22160 *) ac_try_echo=$ac_try;;
22161esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022164 ac_status=$?
22165 grep -v '^ *+' conftest.er1 >conftest.err
22166 rm -f conftest.er1
22167 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022169 (exit $ac_status); } && {
22170 test -z "$ac_c_werror_flag" ||
22171 test ! -s conftest.err
22172 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022173 ac_cv_member_struct_stat_st_birthtime=yes
22174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022175 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022176sed 's/^/| /' conftest.$ac_ext >&5
22177
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022179/* confdefs.h. */
22180_ACEOF
22181cat confdefs.h >>conftest.$ac_ext
22182cat >>conftest.$ac_ext <<_ACEOF
22183/* end confdefs.h. */
22184$ac_includes_default
22185int
22186main ()
22187{
22188static struct stat ac_aggr;
22189if (sizeof ac_aggr.st_birthtime)
22190return 0;
22191 ;
22192 return 0;
22193}
22194_ACEOF
22195rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022196if { (ac_try="$ac_compile"
22197case "(($ac_try" in
22198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22199 *) ac_try_echo=$ac_try;;
22200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022203 ac_status=$?
22204 grep -v '^ *+' conftest.er1 >conftest.err
22205 rm -f conftest.er1
22206 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022208 (exit $ac_status); } && {
22209 test -z "$ac_c_werror_flag" ||
22210 test ! -s conftest.err
22211 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022212 ac_cv_member_struct_stat_st_birthtime=yes
22213else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022214 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022215sed 's/^/| /' conftest.$ac_ext >&5
22216
Martin v. Löwiseba40652007-08-30 20:10:57 +000022217 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022219
22220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022221fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222
22223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022225{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22226echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22227if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022228
22229cat >>confdefs.h <<_ACEOF
22230#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22231_ACEOF
22232
22233
22234fi
22235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022236{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22237echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022238if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022239 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022240else
Martin v. Löwis11437992002-04-12 09:54:03 +000022241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022242/* confdefs.h. */
22243_ACEOF
22244cat confdefs.h >>conftest.$ac_ext
22245cat >>conftest.$ac_ext <<_ACEOF
22246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022248int
22249main ()
22250{
22251static struct stat ac_aggr;
22252if (ac_aggr.st_blocks)
22253return 0;
22254 ;
22255 return 0;
22256}
22257_ACEOF
22258rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022259if { (ac_try="$ac_compile"
22260case "(($ac_try" in
22261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22262 *) ac_try_echo=$ac_try;;
22263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022267 grep -v '^ *+' conftest.er1 >conftest.err
22268 rm -f conftest.er1
22269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271 (exit $ac_status); } && {
22272 test -z "$ac_c_werror_flag" ||
22273 test ! -s conftest.err
22274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022276else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022278sed 's/^/| /' conftest.$ac_ext >&5
22279
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022281/* confdefs.h. */
22282_ACEOF
22283cat confdefs.h >>conftest.$ac_ext
22284cat >>conftest.$ac_ext <<_ACEOF
22285/* end confdefs.h. */
22286$ac_includes_default
22287int
22288main ()
22289{
22290static struct stat ac_aggr;
22291if (sizeof ac_aggr.st_blocks)
22292return 0;
22293 ;
22294 return 0;
22295}
22296_ACEOF
22297rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298if { (ac_try="$ac_compile"
22299case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022306 grep -v '^ *+' conftest.er1 >conftest.err
22307 rm -f conftest.er1
22308 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 (exit $ac_status); } && {
22311 test -z "$ac_c_werror_flag" ||
22312 test ! -s conftest.err
22313 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022314 ac_cv_member_struct_stat_st_blocks=yes
22315else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022317sed 's/^/| /' conftest.$ac_ext >&5
22318
Martin v. Löwiseba40652007-08-30 20:10:57 +000022319 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022321
22322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022324
22325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022326fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022327{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22328echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22329if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022330
Martin v. Löwis11437992002-04-12 09:54:03 +000022331cat >>confdefs.h <<_ACEOF
22332#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22333_ACEOF
22334
22335
22336cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022337#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022338_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022339
22340else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022341 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022342 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22344 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022345esac
22346
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022347fi
22348
Michael W. Hudson54241132001-12-07 15:38:26 +000022349
Martin v. Löwis11437992002-04-12 09:54:03 +000022350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022351{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22352echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022353if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022355else
Martin v. Löwis11437992002-04-12 09:54:03 +000022356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022357/* confdefs.h. */
22358_ACEOF
22359cat confdefs.h >>conftest.$ac_ext
22360cat >>conftest.$ac_ext <<_ACEOF
22361/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022362#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022363int
22364main ()
22365{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022366return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022367 ;
22368 return 0;
22369}
22370_ACEOF
22371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372if { (ac_try="$ac_compile"
22373case "(($ac_try" in
22374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22375 *) ac_try_echo=$ac_try;;
22376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022380 grep -v '^ *+' conftest.er1 >conftest.err
22381 rm -f conftest.er1
22382 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384 (exit $ac_status); } && {
22385 test -z "$ac_c_werror_flag" ||
22386 test ! -s conftest.err
22387 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022388 ac_cv_header_time_altzone=yes
22389else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022391sed 's/^/| /' conftest.$ac_ext >&5
22392
Martin v. Löwiseba40652007-08-30 20:10:57 +000022393 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022394fi
22395
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22397fi
22398
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022399{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22400echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022401if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022402
22403cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022404#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022405_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022406
22407fi
22408
Guido van Rossumda88dad1995-01-26 00:46:29 +000022409was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022410{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22411echo $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 +000022412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022413/* confdefs.h. */
22414_ACEOF
22415cat confdefs.h >>conftest.$ac_ext
22416cat >>conftest.$ac_ext <<_ACEOF
22417/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022418
22419#include <sys/types.h>
22420#include <sys/select.h>
22421#include <sys/time.h>
22422
Martin v. Löwis11437992002-04-12 09:54:03 +000022423int
22424main ()
22425{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022426;
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 ;
22428 return 0;
22429}
22430_ACEOF
22431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432if { (ac_try="$ac_compile"
22433case "(($ac_try" in
22434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22435 *) ac_try_echo=$ac_try;;
22436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022440 grep -v '^ *+' conftest.er1 >conftest.err
22441 rm -f conftest.er1
22442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444 (exit $ac_status); } && {
22445 test -z "$ac_c_werror_flag" ||
22446 test ! -s conftest.err
22447 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022448
22449
22450cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022451#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022452_ACEOF
22453
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022454 was_it_defined=yes
22455
Guido van Rossumf78abae1997-01-21 22:02:36 +000022456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022458sed 's/^/| /' conftest.$ac_ext >&5
22459
Brett Cannon19fab762007-06-02 03:02:29 +000022460
Martin v. Löwiseba40652007-08-30 20:10:57 +000022461fi
22462
22463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022464{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22465echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022467{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22468echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022469if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022470 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022471else
Martin v. Löwis11437992002-04-12 09:54:03 +000022472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022473/* confdefs.h. */
22474_ACEOF
22475cat confdefs.h >>conftest.$ac_ext
22476cat >>conftest.$ac_ext <<_ACEOF
22477/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022478
22479# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022480int
22481main ()
22482{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022483struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022484 ;
22485 return 0;
22486}
22487_ACEOF
22488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022489if { (ac_try="$ac_compile"
22490case "(($ac_try" in
22491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22492 *) ac_try_echo=$ac_try;;
22493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022497 grep -v '^ *+' conftest.er1 >conftest.err
22498 rm -f conftest.er1
22499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022501 (exit $ac_status); } && {
22502 test -z "$ac_c_werror_flag" ||
22503 test ! -s conftest.err
22504 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022505 ac_cv_struct_addrinfo=yes
22506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022508sed 's/^/| /' conftest.$ac_ext >&5
22509
Martin v. Löwiseba40652007-08-30 20:10:57 +000022510 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022511fi
22512
Martin v. Löwiseba40652007-08-30 20:10:57 +000022513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22514fi
22515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022516{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22517echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022518if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022519
22520cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022521#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022522_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022523
22524fi
22525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022526{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22527echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022528if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022529 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022530else
Martin v. Löwis11437992002-04-12 09:54:03 +000022531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022532/* confdefs.h. */
22533_ACEOF
22534cat confdefs.h >>conftest.$ac_ext
22535cat >>conftest.$ac_ext <<_ACEOF
22536/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022537
22538# include <sys/types.h>
22539# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022540int
22541main ()
22542{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022543struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022544 ;
22545 return 0;
22546}
22547_ACEOF
22548rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022549if { (ac_try="$ac_compile"
22550case "(($ac_try" in
22551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22552 *) ac_try_echo=$ac_try;;
22553esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022555 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022557 grep -v '^ *+' conftest.er1 >conftest.err
22558 rm -f conftest.er1
22559 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022561 (exit $ac_status); } && {
22562 test -z "$ac_c_werror_flag" ||
22563 test ! -s conftest.err
22564 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022565 ac_cv_struct_sockaddr_storage=yes
22566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022568sed 's/^/| /' conftest.$ac_ext >&5
22569
Martin v. Löwiseba40652007-08-30 20:10:57 +000022570 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022571fi
22572
Martin v. Löwiseba40652007-08-30 20:10:57 +000022573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22574fi
22575
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022576{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22577echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022578if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022579
22580cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022581#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022582_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022583
22584fi
22585
Guido van Rossum627b2d71993-12-24 10:39:16 +000022586# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022587
Michael W. Hudson54241132001-12-07 15:38:26 +000022588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022589{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22590echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022591if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022592 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022593else
Martin v. Löwis11437992002-04-12 09:54:03 +000022594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022595/* confdefs.h. */
22596_ACEOF
22597cat confdefs.h >>conftest.$ac_ext
22598cat >>conftest.$ac_ext <<_ACEOF
22599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022600$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022601int
22602main ()
22603{
22604static int test_array [1 - 2 * !(((char) -1) < 0)];
22605test_array [0] = 0
22606
22607 ;
22608 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022609}
Martin v. Löwis11437992002-04-12 09:54:03 +000022610_ACEOF
22611rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612if { (ac_try="$ac_compile"
22613case "(($ac_try" in
22614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22615 *) ac_try_echo=$ac_try;;
22616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022620 grep -v '^ *+' conftest.er1 >conftest.err
22621 rm -f conftest.er1
22622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022624 (exit $ac_status); } && {
22625 test -z "$ac_c_werror_flag" ||
22626 test ! -s conftest.err
22627 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022628 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022631sed 's/^/| /' conftest.$ac_ext >&5
22632
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022635
22636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022637fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022638{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22639echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022640if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022641 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022642#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022644
22645fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022647{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22648echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022649if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022651else
22652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022653/* confdefs.h. */
22654_ACEOF
22655cat confdefs.h >>conftest.$ac_ext
22656cat >>conftest.$ac_ext <<_ACEOF
22657/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022658
Martin v. Löwis11437992002-04-12 09:54:03 +000022659int
22660main ()
22661{
22662/* FIXME: Include the comments suggested by Paul. */
22663#ifndef __cplusplus
22664 /* Ultrix mips cc rejects this. */
22665 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668 char const *const *pcpcc;
22669 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022670 /* NEC SVR4.0.2 mips cc rejects this. */
22671 struct point {int x, y;};
22672 static struct point const zero = {0,0};
22673 /* AIX XL C 1.02.0.0 rejects this.
22674 It does not let you subtract one const X* pointer from another in
22675 an arm of an if-expression whose if-part is not a constant
22676 expression */
22677 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022679 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022680 ++pcpcc;
22681 ppc = (char**) pcpcc;
22682 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 { /* SCO 3.2v4 cc rejects this. */
22684 char *t;
22685 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022686
Martin v. Löwis11437992002-04-12 09:54:03 +000022687 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022689 }
22690 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22691 int x[] = {25, 17};
22692 const int *foo = &x[0];
22693 ++foo;
22694 }
22695 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22696 typedef const int *iptr;
22697 iptr p = 0;
22698 ++p;
22699 }
22700 { /* AIX XL C 1.02.0.0 rejects this saying
22701 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22702 struct s { int j; const int *ap[3]; };
22703 struct s *b; b->j = 5;
22704 }
22705 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22706 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022707 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022709 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022710#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022711
Martin v. Löwis11437992002-04-12 09:54:03 +000022712 ;
22713 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022714}
Martin v. Löwis11437992002-04-12 09:54:03 +000022715_ACEOF
22716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022717if { (ac_try="$ac_compile"
22718case "(($ac_try" in
22719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22720 *) ac_try_echo=$ac_try;;
22721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022725 grep -v '^ *+' conftest.er1 >conftest.err
22726 rm -f conftest.er1
22727 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022729 (exit $ac_status); } && {
22730 test -z "$ac_c_werror_flag" ||
22731 test ! -s conftest.err
22732 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022733 ac_cv_c_const=yes
22734else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022736sed 's/^/| /' conftest.$ac_ext >&5
22737
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022740
22741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022743{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22744echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022745if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022746
22747cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022748#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022749_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022750
22751fi
22752
Michael W. Hudson54241132001-12-07 15:38:26 +000022753
Guido van Rossumda88dad1995-01-26 00:46:29 +000022754works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022755{ echo "$as_me:$LINENO: checking for working volatile" >&5
22756echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022758/* confdefs.h. */
22759_ACEOF
22760cat confdefs.h >>conftest.$ac_ext
22761cat >>conftest.$ac_ext <<_ACEOF
22762/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022763
Martin v. Löwis11437992002-04-12 09:54:03 +000022764int
22765main ()
22766{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022767volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022768 ;
22769 return 0;
22770}
22771_ACEOF
22772rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022773if { (ac_try="$ac_compile"
22774case "(($ac_try" in
22775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22776 *) ac_try_echo=$ac_try;;
22777esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022779 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022781 grep -v '^ *+' conftest.er1 >conftest.err
22782 rm -f conftest.er1
22783 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785 (exit $ac_status); } && {
22786 test -z "$ac_c_werror_flag" ||
22787 test ! -s conftest.err
22788 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022789 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022792sed 's/^/| /' conftest.$ac_ext >&5
22793
Martin v. Löwis11437992002-04-12 09:54:03 +000022794
22795cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022796#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022797_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022798
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022799
Guido van Rossum627b2d71993-12-24 10:39:16 +000022800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022801
22802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022803{ echo "$as_me:$LINENO: result: $works" >&5
22804echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022805
Guido van Rossumda88dad1995-01-26 00:46:29 +000022806works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022807{ echo "$as_me:$LINENO: checking for working signed char" >&5
22808echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022809cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022810/* confdefs.h. */
22811_ACEOF
22812cat confdefs.h >>conftest.$ac_ext
22813cat >>conftest.$ac_ext <<_ACEOF
22814/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022815
Martin v. Löwis11437992002-04-12 09:54:03 +000022816int
22817main ()
22818{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022819signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 ;
22821 return 0;
22822}
22823_ACEOF
22824rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022825if { (ac_try="$ac_compile"
22826case "(($ac_try" in
22827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22828 *) ac_try_echo=$ac_try;;
22829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022833 grep -v '^ *+' conftest.er1 >conftest.err
22834 rm -f conftest.er1
22835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837 (exit $ac_status); } && {
22838 test -z "$ac_c_werror_flag" ||
22839 test ! -s conftest.err
22840 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022841 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022844sed 's/^/| /' conftest.$ac_ext >&5
22845
Martin v. Löwis11437992002-04-12 09:54:03 +000022846
22847cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022848#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022849_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022850
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022851
Guido van Rossum7f43da71994-08-01 12:15:30 +000022852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022853
22854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022855{ echo "$as_me:$LINENO: result: $works" >&5
22856echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022857
Guido van Rossumda88dad1995-01-26 00:46:29 +000022858have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022859{ echo "$as_me:$LINENO: checking for prototypes" >&5
22860echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022862/* confdefs.h. */
22863_ACEOF
22864cat confdefs.h >>conftest.$ac_ext
22865cat >>conftest.$ac_ext <<_ACEOF
22866/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022867int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022868int
22869main ()
22870{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022871return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022872 ;
22873 return 0;
22874}
22875_ACEOF
22876rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022877if { (ac_try="$ac_compile"
22878case "(($ac_try" in
22879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22880 *) ac_try_echo=$ac_try;;
22881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022885 grep -v '^ *+' conftest.er1 >conftest.err
22886 rm -f conftest.er1
22887 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022889 (exit $ac_status); } && {
22890 test -z "$ac_c_werror_flag" ||
22891 test ! -s conftest.err
22892 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022893
22894
22895cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022896#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022897_ACEOF
22898
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022899 have_prototypes=yes
22900
Guido van Rossumf78abae1997-01-21 22:02:36 +000022901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022903sed 's/^/| /' conftest.$ac_ext >&5
22904
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905
Guido van Rossum7f43da71994-08-01 12:15:30 +000022906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022907
22908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022909{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22910echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022911
Guido van Rossumda88dad1995-01-26 00:46:29 +000022912works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022913{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22914echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022916/* confdefs.h. */
22917_ACEOF
22918cat confdefs.h >>conftest.$ac_ext
22919cat >>conftest.$ac_ext <<_ACEOF
22920/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022921
22922#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022923int foo(int x, ...) {
22924 va_list va;
22925 va_start(va, x);
22926 va_arg(va, int);
22927 va_arg(va, char *);
22928 va_arg(va, double);
22929 return 0;
22930}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022931
Martin v. Löwis11437992002-04-12 09:54:03 +000022932int
22933main ()
22934{
Guido van Rossum90eea071996-08-30 20:58:57 +000022935return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 ;
22937 return 0;
22938}
22939_ACEOF
22940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941if { (ac_try="$ac_compile"
22942case "(($ac_try" in
22943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22944 *) ac_try_echo=$ac_try;;
22945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022949 grep -v '^ *+' conftest.er1 >conftest.err
22950 rm -f conftest.er1
22951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022953 (exit $ac_status); } && {
22954 test -z "$ac_c_werror_flag" ||
22955 test ! -s conftest.err
22956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022957
22958
22959cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022960#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022961_ACEOF
22962
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022963 works=yes
22964
Guido van Rossumf78abae1997-01-21 22:02:36 +000022965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022967sed 's/^/| /' conftest.$ac_ext >&5
22968
Martin v. Löwiseba40652007-08-30 20:10:57 +000022969
Guido van Rossum627b2d71993-12-24 10:39:16 +000022970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022971
22972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022973{ echo "$as_me:$LINENO: result: $works" >&5
22974echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022975
Martin v. Löwisd6320502004-08-12 13:45:08 +000022976# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022977{ echo "$as_me:$LINENO: checking for socketpair" >&5
22978echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022979cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022980/* confdefs.h. */
22981_ACEOF
22982cat confdefs.h >>conftest.$ac_ext
22983cat >>conftest.$ac_ext <<_ACEOF
22984/* end confdefs.h. */
22985
22986#include <sys/types.h>
22987#include <sys/socket.h>
22988
22989int
22990main ()
22991{
22992void *x=socketpair
22993 ;
22994 return 0;
22995}
22996_ACEOF
22997rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022998if { (ac_try="$ac_compile"
22999case "(($ac_try" in
23000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23001 *) ac_try_echo=$ac_try;;
23002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023006 grep -v '^ *+' conftest.er1 >conftest.err
23007 rm -f conftest.er1
23008 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010 (exit $ac_status); } && {
23011 test -z "$ac_c_werror_flag" ||
23012 test ! -s conftest.err
23013 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023014
23015cat >>confdefs.h <<\_ACEOF
23016#define HAVE_SOCKETPAIR 1
23017_ACEOF
23018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023019 { echo "$as_me:$LINENO: result: yes" >&5
23020echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023022 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023023sed 's/^/| /' conftest.$ac_ext >&5
23024
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023025 { echo "$as_me:$LINENO: result: no" >&5
23026echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023027
23028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023029
23030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023031
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023032# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023033{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23034echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023036/* confdefs.h. */
23037_ACEOF
23038cat confdefs.h >>conftest.$ac_ext
23039cat >>conftest.$ac_ext <<_ACEOF
23040/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023041#include <sys/types.h>
23042#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023043int
23044main ()
23045{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023046struct sockaddr x;
23047x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023048 ;
23049 return 0;
23050}
23051_ACEOF
23052rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023053if { (ac_try="$ac_compile"
23054case "(($ac_try" in
23055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23056 *) ac_try_echo=$ac_try;;
23057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023061 grep -v '^ *+' conftest.er1 >conftest.err
23062 rm -f conftest.er1
23063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023065 (exit $ac_status); } && {
23066 test -z "$ac_c_werror_flag" ||
23067 test ! -s conftest.err
23068 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023069 { echo "$as_me:$LINENO: result: yes" >&5
23070echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023071
23072cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023073#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023074_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023075
23076else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023078sed 's/^/| /' conftest.$ac_ext >&5
23079
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023080 { echo "$as_me:$LINENO: result: no" >&5
23081echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023083
23084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023085
Guido van Rossumda88dad1995-01-26 00:46:29 +000023086va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023087{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23088echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023090/* confdefs.h. */
23091_ACEOF
23092cat confdefs.h >>conftest.$ac_ext
23093cat >>conftest.$ac_ext <<_ACEOF
23094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023095
23096#ifdef HAVE_STDARG_PROTOTYPES
23097#include <stdarg.h>
23098#else
23099#include <varargs.h>
23100#endif
23101
Martin v. Löwis11437992002-04-12 09:54:03 +000023102int
23103main ()
23104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023105va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023106 ;
23107 return 0;
23108}
23109_ACEOF
23110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111if { (ac_try="$ac_compile"
23112case "(($ac_try" in
23113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23114 *) ac_try_echo=$ac_try;;
23115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023119 grep -v '^ *+' conftest.er1 >conftest.err
23120 rm -f conftest.er1
23121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 (exit $ac_status); } && {
23124 test -z "$ac_c_werror_flag" ||
23125 test ! -s conftest.err
23126 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023127 :
23128else
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öwis11437992002-04-12 09:54:03 +000023132
23133
23134cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023135#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023136_ACEOF
23137
Guido van Rossumda88dad1995-01-26 00:46:29 +000023138 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023139
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023141
23142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023143{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23144echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023145
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023146# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023147
23148
23149
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023150{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23151echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023152if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023153 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023154else
Martin v. Löwis11437992002-04-12 09:54:03 +000023155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023156/* confdefs.h. */
23157_ACEOF
23158cat confdefs.h >>conftest.$ac_ext
23159cat >>conftest.$ac_ext <<_ACEOF
23160/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023161/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23162 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23163#define gethostbyname_r innocuous_gethostbyname_r
23164
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023165/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023166 which can conflict with char gethostbyname_r (); below.
23167 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023168 <limits.h> exists even on freestanding compilers. */
23169
23170#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023171# include <limits.h>
23172#else
23173# include <assert.h>
23174#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023175
23176#undef gethostbyname_r
23177
Martin v. Löwiseba40652007-08-30 20:10:57 +000023178/* Override any GCC internal prototype to avoid an error.
23179 Use char because int might match the return type of a GCC
23180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023181#ifdef __cplusplus
23182extern "C"
23183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023184char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023185/* The GNU C library defines this for functions which it implements
23186 to always fail with ENOSYS. Some functions are actually named
23187 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023188#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023189choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023190#endif
23191
Skip Montanaro6dead952003-09-25 14:50:04 +000023192int
23193main ()
23194{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023195return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023196 ;
23197 return 0;
23198}
23199_ACEOF
23200rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023201if { (ac_try="$ac_link"
23202case "(($ac_try" in
23203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23204 *) ac_try_echo=$ac_try;;
23205esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023209 grep -v '^ *+' conftest.er1 >conftest.err
23210 rm -f conftest.er1
23211 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023213 (exit $ac_status); } && {
23214 test -z "$ac_c_werror_flag" ||
23215 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023216 } && test -s conftest$ac_exeext &&
23217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023218 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023221sed 's/^/| /' conftest.$ac_ext >&5
23222
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023225
23226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023227 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023228fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023229{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23230echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23231if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023232
Martin v. Löwis11437992002-04-12 09:54:03 +000023233 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023234#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023235_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023237 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23238echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023239 OLD_CFLAGS=$CFLAGS
23240 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023242/* confdefs.h. */
23243_ACEOF
23244cat confdefs.h >>conftest.$ac_ext
23245cat >>conftest.$ac_ext <<_ACEOF
23246/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023247
23248# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023249
Martin v. Löwis11437992002-04-12 09:54:03 +000023250int
23251main ()
23252{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023253
23254 char *name;
23255 struct hostent *he, *res;
23256 char buffer[2048];
23257 int buflen = 2048;
23258 int h_errnop;
23259
23260 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023261
23262 ;
23263 return 0;
23264}
23265_ACEOF
23266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023267if { (ac_try="$ac_compile"
23268case "(($ac_try" in
23269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23270 *) ac_try_echo=$ac_try;;
23271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023275 grep -v '^ *+' conftest.er1 >conftest.err
23276 rm -f conftest.er1
23277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023279 (exit $ac_status); } && {
23280 test -z "$ac_c_werror_flag" ||
23281 test ! -s conftest.err
23282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023283
23284 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023285#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023286_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023287
Martin v. Löwis11437992002-04-12 09:54:03 +000023288
23289cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023290#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023291_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023292
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023293 { echo "$as_me:$LINENO: result: yes" >&5
23294echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023296else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023298sed 's/^/| /' conftest.$ac_ext >&5
23299
Martin v. Löwis11437992002-04-12 09:54:03 +000023300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023301 { echo "$as_me:$LINENO: result: no" >&5
23302echo "${ECHO_T}no" >&6; }
23303 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23304echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023306/* confdefs.h. */
23307_ACEOF
23308cat confdefs.h >>conftest.$ac_ext
23309cat >>conftest.$ac_ext <<_ACEOF
23310/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023311
23312# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023313
Martin v. Löwis11437992002-04-12 09:54:03 +000023314int
23315main ()
23316{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023317
23318 char *name;
23319 struct hostent *he;
23320 char buffer[2048];
23321 int buflen = 2048;
23322 int h_errnop;
23323
23324 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023325
23326 ;
23327 return 0;
23328}
23329_ACEOF
23330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023331if { (ac_try="$ac_compile"
23332case "(($ac_try" in
23333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23334 *) ac_try_echo=$ac_try;;
23335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023339 grep -v '^ *+' conftest.er1 >conftest.err
23340 rm -f conftest.er1
23341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343 (exit $ac_status); } && {
23344 test -z "$ac_c_werror_flag" ||
23345 test ! -s conftest.err
23346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023347
23348 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023349#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023350_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023351
Martin v. Löwis11437992002-04-12 09:54:03 +000023352
23353cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023354#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023355_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023357 { echo "$as_me:$LINENO: result: yes" >&5
23358echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023362sed 's/^/| /' conftest.$ac_ext >&5
23363
Martin v. Löwis11437992002-04-12 09:54:03 +000023364
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023365 { echo "$as_me:$LINENO: result: no" >&5
23366echo "${ECHO_T}no" >&6; }
23367 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23368echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023370/* confdefs.h. */
23371_ACEOF
23372cat confdefs.h >>conftest.$ac_ext
23373cat >>conftest.$ac_ext <<_ACEOF
23374/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023375
23376# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023377
Martin v. Löwis11437992002-04-12 09:54:03 +000023378int
23379main ()
23380{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023381
23382 char *name;
23383 struct hostent *he;
23384 struct hostent_data data;
23385
23386 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023387
23388 ;
23389 return 0;
23390}
23391_ACEOF
23392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393if { (ac_try="$ac_compile"
23394case "(($ac_try" in
23395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23396 *) ac_try_echo=$ac_try;;
23397esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023401 grep -v '^ *+' conftest.er1 >conftest.err
23402 rm -f conftest.er1
23403 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405 (exit $ac_status); } && {
23406 test -z "$ac_c_werror_flag" ||
23407 test ! -s conftest.err
23408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023409
23410 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023411#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023412_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023413
Martin v. Löwis11437992002-04-12 09:54:03 +000023414
23415cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023416#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023417_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023419 { echo "$as_me:$LINENO: result: yes" >&5
23420echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023421
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023424sed 's/^/| /' conftest.$ac_ext >&5
23425
Martin v. Löwis11437992002-04-12 09:54:03 +000023426
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023427 { echo "$as_me:$LINENO: result: no" >&5
23428echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023430fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023431
23432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023435
23436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023437
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023439
23440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023441 CFLAGS=$OLD_CFLAGS
23442
23443else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023444
Martin v. Löwis11437992002-04-12 09:54:03 +000023445
23446for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023447do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023448as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23449{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23450echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023451if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023453else
Martin v. Löwis11437992002-04-12 09:54:03 +000023454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023455/* confdefs.h. */
23456_ACEOF
23457cat confdefs.h >>conftest.$ac_ext
23458cat >>conftest.$ac_ext <<_ACEOF
23459/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023460/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23461 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23462#define $ac_func innocuous_$ac_func
23463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023464/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023465 which can conflict with char $ac_func (); below.
23466 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023467 <limits.h> exists even on freestanding compilers. */
23468
23469#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023470# include <limits.h>
23471#else
23472# include <assert.h>
23473#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023474
23475#undef $ac_func
23476
Martin v. Löwiseba40652007-08-30 20:10:57 +000023477/* Override any GCC internal prototype to avoid an error.
23478 Use char because int might match the return type of a GCC
23479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023480#ifdef __cplusplus
23481extern "C"
23482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023483char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023484/* The GNU C library defines this for functions which it implements
23485 to always fail with ENOSYS. Some functions are actually named
23486 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023488choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023489#endif
23490
Skip Montanaro6dead952003-09-25 14:50:04 +000023491int
23492main ()
23493{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023495 ;
23496 return 0;
23497}
23498_ACEOF
23499rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023500if { (ac_try="$ac_link"
23501case "(($ac_try" in
23502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23503 *) ac_try_echo=$ac_try;;
23504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023506 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023508 grep -v '^ *+' conftest.er1 >conftest.err
23509 rm -f conftest.er1
23510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023512 (exit $ac_status); } && {
23513 test -z "$ac_c_werror_flag" ||
23514 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023515 } && test -s conftest$ac_exeext &&
23516 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023517 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023518else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023520sed 's/^/| /' conftest.$ac_ext >&5
23521
Martin v. Löwiseba40652007-08-30 20:10:57 +000023522 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023524
23525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023526 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023527fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023528ac_res=`eval echo '${'$as_ac_var'}'`
23529 { echo "$as_me:$LINENO: result: $ac_res" >&5
23530echo "${ECHO_T}$ac_res" >&6; }
23531if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023533#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023534_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023536fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023537done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023538
Michael W. Hudson54241132001-12-07 15:38:26 +000023539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023540fi
23541
Michael W. Hudson54241132001-12-07 15:38:26 +000023542
23543
23544
23545
23546
23547
Guido van Rossum627b2d71993-12-24 10:39:16 +000023548# checks for system services
23549# (none yet)
23550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023551# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023552{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23553echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023554if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023555 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023556else
Martin v. Löwis11437992002-04-12 09:54:03 +000023557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023558/* confdefs.h. */
23559_ACEOF
23560cat confdefs.h >>conftest.$ac_ext
23561cat >>conftest.$ac_ext <<_ACEOF
23562/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023563/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23564 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23565#define __fpu_control innocuous___fpu_control
23566
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023567/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023568 which can conflict with char __fpu_control (); below.
23569 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023570 <limits.h> exists even on freestanding compilers. */
23571
23572#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023573# include <limits.h>
23574#else
23575# include <assert.h>
23576#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023577
23578#undef __fpu_control
23579
Martin v. Löwiseba40652007-08-30 20:10:57 +000023580/* Override any GCC internal prototype to avoid an error.
23581 Use char because int might match the return type of a GCC
23582 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023583#ifdef __cplusplus
23584extern "C"
23585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023586char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023587/* The GNU C library defines this for functions which it implements
23588 to always fail with ENOSYS. Some functions are actually named
23589 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023590#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023591choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023592#endif
23593
Skip Montanaro6dead952003-09-25 14:50:04 +000023594int
23595main ()
23596{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023597return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023598 ;
23599 return 0;
23600}
23601_ACEOF
23602rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023603if { (ac_try="$ac_link"
23604case "(($ac_try" in
23605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23606 *) ac_try_echo=$ac_try;;
23607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023611 grep -v '^ *+' conftest.er1 >conftest.err
23612 rm -f conftest.er1
23613 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023615 (exit $ac_status); } && {
23616 test -z "$ac_c_werror_flag" ||
23617 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023618 } && test -s conftest$ac_exeext &&
23619 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023620 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023621else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023623sed 's/^/| /' conftest.$ac_ext >&5
23624
Martin v. Löwiseba40652007-08-30 20:10:57 +000023625 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023627
23628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023629 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023630fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023631{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23632echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23633if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023634 :
23635else
Martin v. Löwis11437992002-04-12 09:54:03 +000023636
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023637{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23638echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023639if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023640 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023641else
Martin v. Löwis11437992002-04-12 09:54:03 +000023642 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023643LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023644cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023645/* confdefs.h. */
23646_ACEOF
23647cat confdefs.h >>conftest.$ac_ext
23648cat >>conftest.$ac_ext <<_ACEOF
23649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023650
Martin v. Löwiseba40652007-08-30 20:10:57 +000023651/* Override any GCC internal prototype to avoid an error.
23652 Use char because int might match the return type of a GCC
23653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023654#ifdef __cplusplus
23655extern "C"
23656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023657char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023658int
23659main ()
23660{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023661return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023662 ;
23663 return 0;
23664}
23665_ACEOF
23666rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667if { (ac_try="$ac_link"
23668case "(($ac_try" in
23669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23670 *) ac_try_echo=$ac_try;;
23671esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023675 grep -v '^ *+' conftest.er1 >conftest.err
23676 rm -f conftest.er1
23677 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023679 (exit $ac_status); } && {
23680 test -z "$ac_c_werror_flag" ||
23681 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023682 } && test -s conftest$ac_exeext &&
23683 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023684 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023687sed 's/^/| /' conftest.$ac_ext >&5
23688
Martin v. Löwiseba40652007-08-30 20:10:57 +000023689 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691
23692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023694LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023695fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023696{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23697echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23698if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023699 cat >>confdefs.h <<_ACEOF
23700#define HAVE_LIBIEEE 1
23701_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023702
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023703 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023704
Guido van Rossum627b2d71993-12-24 10:39:16 +000023705fi
23706
Michael W. Hudson54241132001-12-07 15:38:26 +000023707
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023708fi
23709
Michael W. Hudson54241132001-12-07 15:38:26 +000023710
Guido van Rossum7f253911997-05-09 02:42:48 +000023711# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023712{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23713echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023714
Martin v. Löwiseba40652007-08-30 20:10:57 +000023715# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023716if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023717 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023718if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023719then
23720
23721cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023722#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023723_ACEOF
23724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023725 { echo "$as_me:$LINENO: result: yes" >&5
23726echo "${ECHO_T}yes" >&6; }
23727else { echo "$as_me:$LINENO: result: no" >&5
23728echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023729fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023730else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023731 { echo "$as_me:$LINENO: result: no" >&5
23732echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023733fi
23734
Guido van Rossum7f253911997-05-09 02:42:48 +000023735
Guido van Rossum7f43da71994-08-01 12:15:30 +000023736# check for --with-libm=...
23737
Guido van Rossum563e7081996-09-10 18:20:48 +000023738case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023739Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023740BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023741*) LIBM=-lm
23742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023743{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23744echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023745
Martin v. Löwiseba40652007-08-30 20:10:57 +000023746# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023747if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023748 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023749if test "$withval" = no
23750then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023751 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23752echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023753elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023754then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023755 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23756echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23757else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23758echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023759 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023760fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023761else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023762 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23763echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023764fi
23765
Guido van Rossum7f43da71994-08-01 12:15:30 +000023766
23767# check for --with-libc=...
23768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023769{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23770echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023771
Martin v. Löwiseba40652007-08-30 20:10:57 +000023772# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023773if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023774 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023775if test "$withval" = no
23776then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023777 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23778echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023779elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023780then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023781 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23782echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23783else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23784echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023785 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023786fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023788 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23789echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023790fi
23791
Guido van Rossum7f43da71994-08-01 12:15:30 +000023792
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023793# **************************************************
23794# * Check for various properties of floating point *
23795# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023796
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023797{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23798echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23799if test "${ac_cv_little_endian_double+set}" = set; then
23800 echo $ECHO_N "(cached) $ECHO_C" >&6
23801else
23802
23803if test "$cross_compiling" = yes; then
23804 ac_cv_little_endian_double=no
23805else
23806 cat >conftest.$ac_ext <<_ACEOF
23807/* confdefs.h. */
23808_ACEOF
23809cat confdefs.h >>conftest.$ac_ext
23810cat >>conftest.$ac_ext <<_ACEOF
23811/* end confdefs.h. */
23812
23813#include <string.h>
23814int main() {
23815 double x = 9006104071832581.0;
23816 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23817 return 0;
23818 else
23819 return 1;
23820}
23821
23822_ACEOF
23823rm -f conftest$ac_exeext
23824if { (ac_try="$ac_link"
23825case "(($ac_try" in
23826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23827 *) ac_try_echo=$ac_try;;
23828esac
23829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23830 (eval "$ac_link") 2>&5
23831 ac_status=$?
23832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23834 { (case "(($ac_try" in
23835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23836 *) ac_try_echo=$ac_try;;
23837esac
23838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23839 (eval "$ac_try") 2>&5
23840 ac_status=$?
23841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23842 (exit $ac_status); }; }; then
23843 ac_cv_little_endian_double=yes
23844else
23845 echo "$as_me: program exited with status $ac_status" >&5
23846echo "$as_me: failed program was:" >&5
23847sed 's/^/| /' conftest.$ac_ext >&5
23848
23849( exit $ac_status )
23850ac_cv_little_endian_double=no
23851fi
23852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23853fi
23854
23855
23856fi
23857
23858{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23859echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23860if test "$ac_cv_little_endian_double" = yes
23861then
23862
23863cat >>confdefs.h <<\_ACEOF
23864#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23865_ACEOF
23866
23867fi
23868
23869{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23870echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23871if test "${ac_cv_big_endian_double+set}" = set; then
23872 echo $ECHO_N "(cached) $ECHO_C" >&6
23873else
23874
23875if test "$cross_compiling" = yes; then
23876 ac_cv_big_endian_double=no
23877else
23878 cat >conftest.$ac_ext <<_ACEOF
23879/* confdefs.h. */
23880_ACEOF
23881cat confdefs.h >>conftest.$ac_ext
23882cat >>conftest.$ac_ext <<_ACEOF
23883/* end confdefs.h. */
23884
23885#include <string.h>
23886int main() {
23887 double x = 9006104071832581.0;
23888 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23889 return 0;
23890 else
23891 return 1;
23892}
23893
23894_ACEOF
23895rm -f conftest$ac_exeext
23896if { (ac_try="$ac_link"
23897case "(($ac_try" in
23898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23899 *) ac_try_echo=$ac_try;;
23900esac
23901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23902 (eval "$ac_link") 2>&5
23903 ac_status=$?
23904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23905 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23906 { (case "(($ac_try" in
23907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23908 *) ac_try_echo=$ac_try;;
23909esac
23910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23911 (eval "$ac_try") 2>&5
23912 ac_status=$?
23913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23914 (exit $ac_status); }; }; then
23915 ac_cv_big_endian_double=yes
23916else
23917 echo "$as_me: program exited with status $ac_status" >&5
23918echo "$as_me: failed program was:" >&5
23919sed 's/^/| /' conftest.$ac_ext >&5
23920
23921( exit $ac_status )
23922ac_cv_big_endian_double=no
23923fi
23924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23925fi
23926
23927
23928fi
23929
23930{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23931echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23932if test "$ac_cv_big_endian_double" = yes
23933then
23934
23935cat >>confdefs.h <<\_ACEOF
23936#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23937_ACEOF
23938
23939fi
23940
23941# Some ARM platforms use a mixed-endian representation for doubles.
23942# While Python doesn't currently have full support for these platforms
23943# (see e.g., issue 1762561), we can at least make sure that float <-> string
23944# conversions work.
23945{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23946echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23947if test "${ac_cv_mixed_endian_double+set}" = set; then
23948 echo $ECHO_N "(cached) $ECHO_C" >&6
23949else
23950
23951if test "$cross_compiling" = yes; then
23952 ac_cv_mixed_endian_double=no
23953else
23954 cat >conftest.$ac_ext <<_ACEOF
23955/* confdefs.h. */
23956_ACEOF
23957cat confdefs.h >>conftest.$ac_ext
23958cat >>conftest.$ac_ext <<_ACEOF
23959/* end confdefs.h. */
23960
23961#include <string.h>
23962int main() {
23963 double x = 9006104071832581.0;
23964 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23965 return 0;
23966 else
23967 return 1;
23968}
23969
23970_ACEOF
23971rm -f conftest$ac_exeext
23972if { (ac_try="$ac_link"
23973case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
23977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23978 (eval "$ac_link") 2>&5
23979 ac_status=$?
23980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23982 { (case "(($ac_try" in
23983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23984 *) ac_try_echo=$ac_try;;
23985esac
23986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23987 (eval "$ac_try") 2>&5
23988 ac_status=$?
23989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23990 (exit $ac_status); }; }; then
23991 ac_cv_mixed_endian_double=yes
23992else
23993 echo "$as_me: program exited with status $ac_status" >&5
23994echo "$as_me: failed program was:" >&5
23995sed 's/^/| /' conftest.$ac_ext >&5
23996
23997( exit $ac_status )
23998ac_cv_mixed_endian_double=no
23999fi
24000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24001fi
24002
24003
24004fi
24005
24006{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24007echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24008if test "$ac_cv_mixed_endian_double" = yes
24009then
24010
24011cat >>confdefs.h <<\_ACEOF
24012#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24013_ACEOF
24014
24015fi
24016
24017# The short float repr introduced in Python 3.1 requires the
24018# correctly-rounded string <-> double conversion functions from
24019# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24020# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024021# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024022# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024023
24024# This inline assembler syntax may also work for suncc and icc,
24025# so we try it on all platforms.
24026
24027{ echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024028echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024029cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024030/* confdefs.h. */
24031_ACEOF
24032cat confdefs.h >>conftest.$ac_ext
24033cat >>conftest.$ac_ext <<_ACEOF
24034/* end confdefs.h. */
24035
24036int
24037main ()
24038{
24039
Mark Dickinsona548dee2009-11-15 13:12:43 +000024040 unsigned short cw;
24041 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24042 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024043
24044 ;
24045 return 0;
24046}
24047_ACEOF
24048rm -f conftest.$ac_objext
24049if { (ac_try="$ac_compile"
24050case "(($ac_try" in
24051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24052 *) ac_try_echo=$ac_try;;
24053esac
24054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24055 (eval "$ac_compile") 2>conftest.er1
24056 ac_status=$?
24057 grep -v '^ *+' conftest.er1 >conftest.err
24058 rm -f conftest.er1
24059 cat conftest.err >&5
24060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24061 (exit $ac_status); } && {
24062 test -z "$ac_c_werror_flag" ||
24063 test ! -s conftest.err
24064 } && test -s conftest.$ac_objext; then
24065 have_gcc_asm_for_x87=yes
24066else
24067 echo "$as_me: failed program was:" >&5
24068sed 's/^/| /' conftest.$ac_ext >&5
24069
24070 have_gcc_asm_for_x87=no
24071fi
24072
24073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024074{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024075echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024076if test "$have_gcc_asm_for_x87" = yes
24077then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024078
24079cat >>confdefs.h <<\_ACEOF
24080#define HAVE_GCC_ASM_FOR_X87 1
24081_ACEOF
24082
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024083fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024084
Mark Dickinson04b27232009-01-04 12:29:36 +000024085# Detect whether system arithmetic is subject to x87-style double
24086# rounding issues. The result of this test has little meaning on non
24087# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24088# mode is round-to-nearest and double rounding issues are present, and
24089# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024090{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24091echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024092# $BASECFLAGS may affect the result
24093ac_save_cc="$CC"
24094CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024095if test "$cross_compiling" = yes; then
24096 ac_cv_x87_double_rounding=no
24097else
24098 cat >conftest.$ac_ext <<_ACEOF
24099/* confdefs.h. */
24100_ACEOF
24101cat confdefs.h >>conftest.$ac_ext
24102cat >>conftest.$ac_ext <<_ACEOF
24103/* end confdefs.h. */
24104
24105#include <stdlib.h>
24106#include <math.h>
24107int main() {
24108 volatile double x, y, z;
24109 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24110 x = 0.99999999999999989; /* 1-2**-53 */
24111 y = 1./x;
24112 if (y != 1.)
24113 exit(0);
24114 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24115 x = 1e16;
24116 y = 2.99999;
24117 z = x + y;
24118 if (z != 1e16+4.)
24119 exit(0);
24120 /* both tests show evidence of double rounding */
24121 exit(1);
24122}
24123
24124_ACEOF
24125rm -f conftest$ac_exeext
24126if { (ac_try="$ac_link"
24127case "(($ac_try" in
24128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24129 *) ac_try_echo=$ac_try;;
24130esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024132 (eval "$ac_link") 2>&5
24133 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024135 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24136 { (case "(($ac_try" in
24137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24138 *) ac_try_echo=$ac_try;;
24139esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024141 (eval "$ac_try") 2>&5
24142 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024144 (exit $ac_status); }; }; then
24145 ac_cv_x87_double_rounding=no
24146else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024147 echo "$as_me: program exited with status $ac_status" >&5
24148echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024149sed 's/^/| /' conftest.$ac_ext >&5
24150
24151( exit $ac_status )
24152ac_cv_x87_double_rounding=yes
24153fi
24154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24155fi
24156
24157
Mark Dickinson99abd142009-10-24 13:44:16 +000024158CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024159{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24160echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024161if test "$ac_cv_x87_double_rounding" = yes
24162then
24163
24164cat >>confdefs.h <<\_ACEOF
24165#define X87_DOUBLE_ROUNDING 1
24166_ACEOF
24167
24168fi
24169
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024170# ************************************
24171# * Check for mathematical functions *
24172# ************************************
24173
24174LIBS_SAVE=$LIBS
24175LIBS="$LIBS $LIBM"
24176
Mark Dickinson265d7382008-04-21 22:32:24 +000024177# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24178# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024179{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24180echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024181if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024182 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024183else
24184
24185if test "$cross_compiling" = yes; then
24186 ac_cv_tanh_preserves_zero_sign=no
24187else
24188 cat >conftest.$ac_ext <<_ACEOF
24189/* confdefs.h. */
24190_ACEOF
24191cat confdefs.h >>conftest.$ac_ext
24192cat >>conftest.$ac_ext <<_ACEOF
24193/* end confdefs.h. */
24194
24195#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024196#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024197int main() {
24198 /* return 0 if either negative zeros don't exist
24199 on this platform or if negative zeros exist
24200 and tanh(-0.) == -0. */
24201 if (atan2(0., -1.) == atan2(-0., -1.) ||
24202 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24203 else exit(1);
24204}
24205
24206_ACEOF
24207rm -f conftest$ac_exeext
24208if { (ac_try="$ac_link"
24209case "(($ac_try" in
24210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24211 *) ac_try_echo=$ac_try;;
24212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024214 (eval "$ac_link") 2>&5
24215 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24218 { (case "(($ac_try" in
24219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24220 *) ac_try_echo=$ac_try;;
24221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024223 (eval "$ac_try") 2>&5
24224 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024226 (exit $ac_status); }; }; then
24227 ac_cv_tanh_preserves_zero_sign=yes
24228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024229 echo "$as_me: program exited with status $ac_status" >&5
24230echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024231sed 's/^/| /' conftest.$ac_ext >&5
24232
24233( exit $ac_status )
24234ac_cv_tanh_preserves_zero_sign=no
24235fi
24236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24237fi
24238
24239
24240fi
24241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024242{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24243echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024244if test "$ac_cv_tanh_preserves_zero_sign" = yes
24245then
24246
24247cat >>confdefs.h <<\_ACEOF
24248#define TANH_PRESERVES_ZERO_SIGN 1
24249_ACEOF
24250
24251fi
24252
Martin v. Löwis11437992002-04-12 09:54:03 +000024253
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024254
Michael W. Hudson54241132001-12-07 15:38:26 +000024255
Christian Heimes0a8143f2007-12-18 23:22:54 +000024256
24257
24258
24259
24260
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024261
Mark Dickinson65898e02009-09-05 10:27:00 +000024262for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24263do
24264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24265{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24267if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24268 echo $ECHO_N "(cached) $ECHO_C" >&6
24269else
24270 cat >conftest.$ac_ext <<_ACEOF
24271/* confdefs.h. */
24272_ACEOF
24273cat confdefs.h >>conftest.$ac_ext
24274cat >>conftest.$ac_ext <<_ACEOF
24275/* end confdefs.h. */
24276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24278#define $ac_func innocuous_$ac_func
24279
24280/* System header to define __stub macros and hopefully few prototypes,
24281 which can conflict with char $ac_func (); below.
24282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24283 <limits.h> exists even on freestanding compilers. */
24284
24285#ifdef __STDC__
24286# include <limits.h>
24287#else
24288# include <assert.h>
24289#endif
24290
24291#undef $ac_func
24292
24293/* Override any GCC internal prototype to avoid an error.
24294 Use char because int might match the return type of a GCC
24295 builtin and then its argument prototype would still apply. */
24296#ifdef __cplusplus
24297extern "C"
24298#endif
24299char $ac_func ();
24300/* The GNU C library defines this for functions which it implements
24301 to always fail with ENOSYS. Some functions are actually named
24302 something starting with __ and the normal name is an alias. */
24303#if defined __stub_$ac_func || defined __stub___$ac_func
24304choke me
24305#endif
24306
24307int
24308main ()
24309{
24310return $ac_func ();
24311 ;
24312 return 0;
24313}
24314_ACEOF
24315rm -f conftest.$ac_objext conftest$ac_exeext
24316if { (ac_try="$ac_link"
24317case "(($ac_try" in
24318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24319 *) ac_try_echo=$ac_try;;
24320esac
24321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24322 (eval "$ac_link") 2>conftest.er1
24323 ac_status=$?
24324 grep -v '^ *+' conftest.er1 >conftest.err
24325 rm -f conftest.er1
24326 cat conftest.err >&5
24327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24328 (exit $ac_status); } && {
24329 test -z "$ac_c_werror_flag" ||
24330 test ! -s conftest.err
24331 } && test -s conftest$ac_exeext &&
24332 $as_test_x conftest$ac_exeext; then
24333 eval "$as_ac_var=yes"
24334else
24335 echo "$as_me: failed program was:" >&5
24336sed 's/^/| /' conftest.$ac_ext >&5
24337
24338 eval "$as_ac_var=no"
24339fi
24340
24341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24342 conftest$ac_exeext conftest.$ac_ext
24343fi
24344ac_res=`eval echo '${'$as_ac_var'}'`
24345 { echo "$as_me:$LINENO: result: $ac_res" >&5
24346echo "${ECHO_T}$ac_res" >&6; }
24347if test `eval echo '${'$as_ac_var'}'` = yes; then
24348 cat >>confdefs.h <<_ACEOF
24349#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24350_ACEOF
24351
24352fi
24353done
24354
24355
24356
24357
24358
24359
24360for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024361do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024362as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24363{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24364echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024365if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024366 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024367else
24368 cat >conftest.$ac_ext <<_ACEOF
24369/* confdefs.h. */
24370_ACEOF
24371cat confdefs.h >>conftest.$ac_ext
24372cat >>conftest.$ac_ext <<_ACEOF
24373/* end confdefs.h. */
24374/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24375 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24376#define $ac_func innocuous_$ac_func
24377
24378/* System header to define __stub macros and hopefully few prototypes,
24379 which can conflict with char $ac_func (); below.
24380 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24381 <limits.h> exists even on freestanding compilers. */
24382
24383#ifdef __STDC__
24384# include <limits.h>
24385#else
24386# include <assert.h>
24387#endif
24388
24389#undef $ac_func
24390
24391/* Override any GCC internal prototype to avoid an error.
24392 Use char because int might match the return type of a GCC
24393 builtin and then its argument prototype would still apply. */
24394#ifdef __cplusplus
24395extern "C"
24396#endif
24397char $ac_func ();
24398/* The GNU C library defines this for functions which it implements
24399 to always fail with ENOSYS. Some functions are actually named
24400 something starting with __ and the normal name is an alias. */
24401#if defined __stub_$ac_func || defined __stub___$ac_func
24402choke me
24403#endif
24404
24405int
24406main ()
24407{
24408return $ac_func ();
24409 ;
24410 return 0;
24411}
24412_ACEOF
24413rm -f conftest.$ac_objext conftest$ac_exeext
24414if { (ac_try="$ac_link"
24415case "(($ac_try" in
24416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24417 *) ac_try_echo=$ac_try;;
24418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024420 (eval "$ac_link") 2>conftest.er1
24421 ac_status=$?
24422 grep -v '^ *+' conftest.er1 >conftest.err
24423 rm -f conftest.er1
24424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024426 (exit $ac_status); } && {
24427 test -z "$ac_c_werror_flag" ||
24428 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024429 } && test -s conftest$ac_exeext &&
24430 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024431 eval "$as_ac_var=yes"
24432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024433 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024434sed 's/^/| /' conftest.$ac_ext >&5
24435
24436 eval "$as_ac_var=no"
24437fi
24438
24439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24440 conftest$ac_exeext conftest.$ac_ext
24441fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024442ac_res=`eval echo '${'$as_ac_var'}'`
24443 { echo "$as_me:$LINENO: result: $ac_res" >&5
24444echo "${ECHO_T}$ac_res" >&6; }
24445if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024446 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024447#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024448_ACEOF
24449
24450fi
24451done
24452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024453{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24454echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024455if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024456 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024457else
24458 cat >conftest.$ac_ext <<_ACEOF
24459/* confdefs.h. */
24460_ACEOF
24461cat confdefs.h >>conftest.$ac_ext
24462cat >>conftest.$ac_ext <<_ACEOF
24463/* end confdefs.h. */
24464#include <math.h>
24465
24466int
24467main ()
24468{
24469#ifndef isinf
24470 (void) isinf;
24471#endif
24472
24473 ;
24474 return 0;
24475}
24476_ACEOF
24477rm -f conftest.$ac_objext
24478if { (ac_try="$ac_compile"
24479case "(($ac_try" in
24480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24481 *) ac_try_echo=$ac_try;;
24482esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024484 (eval "$ac_compile") 2>conftest.er1
24485 ac_status=$?
24486 grep -v '^ *+' conftest.er1 >conftest.err
24487 rm -f conftest.er1
24488 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024490 (exit $ac_status); } && {
24491 test -z "$ac_c_werror_flag" ||
24492 test ! -s conftest.err
24493 } && test -s conftest.$ac_objext; then
24494 ac_cv_have_decl_isinf=yes
24495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024496 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024497sed 's/^/| /' conftest.$ac_ext >&5
24498
24499 ac_cv_have_decl_isinf=no
24500fi
24501
24502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24503fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024504{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24505echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24506if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024507
24508cat >>confdefs.h <<_ACEOF
24509#define HAVE_DECL_ISINF 1
24510_ACEOF
24511
24512
24513else
24514 cat >>confdefs.h <<_ACEOF
24515#define HAVE_DECL_ISINF 0
24516_ACEOF
24517
24518
24519fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024520{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24521echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024522if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024523 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024524else
24525 cat >conftest.$ac_ext <<_ACEOF
24526/* confdefs.h. */
24527_ACEOF
24528cat confdefs.h >>conftest.$ac_ext
24529cat >>conftest.$ac_ext <<_ACEOF
24530/* end confdefs.h. */
24531#include <math.h>
24532
24533int
24534main ()
24535{
24536#ifndef isnan
24537 (void) isnan;
24538#endif
24539
24540 ;
24541 return 0;
24542}
24543_ACEOF
24544rm -f conftest.$ac_objext
24545if { (ac_try="$ac_compile"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024551 (eval "$ac_compile") 2>conftest.er1
24552 ac_status=$?
24553 grep -v '^ *+' conftest.er1 >conftest.err
24554 rm -f conftest.er1
24555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024557 (exit $ac_status); } && {
24558 test -z "$ac_c_werror_flag" ||
24559 test ! -s conftest.err
24560 } && test -s conftest.$ac_objext; then
24561 ac_cv_have_decl_isnan=yes
24562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024563 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024564sed 's/^/| /' conftest.$ac_ext >&5
24565
24566 ac_cv_have_decl_isnan=no
24567fi
24568
24569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24570fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024571{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24572echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24573if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024574
24575cat >>confdefs.h <<_ACEOF
24576#define HAVE_DECL_ISNAN 1
24577_ACEOF
24578
24579
24580else
24581 cat >>confdefs.h <<_ACEOF
24582#define HAVE_DECL_ISNAN 0
24583_ACEOF
24584
24585
24586fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024587{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24588echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024589if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024590 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024591else
24592 cat >conftest.$ac_ext <<_ACEOF
24593/* confdefs.h. */
24594_ACEOF
24595cat confdefs.h >>conftest.$ac_ext
24596cat >>conftest.$ac_ext <<_ACEOF
24597/* end confdefs.h. */
24598#include <math.h>
24599
24600int
24601main ()
24602{
24603#ifndef isfinite
24604 (void) isfinite;
24605#endif
24606
24607 ;
24608 return 0;
24609}
24610_ACEOF
24611rm -f conftest.$ac_objext
24612if { (ac_try="$ac_compile"
24613case "(($ac_try" in
24614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24615 *) ac_try_echo=$ac_try;;
24616esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024618 (eval "$ac_compile") 2>conftest.er1
24619 ac_status=$?
24620 grep -v '^ *+' conftest.er1 >conftest.err
24621 rm -f conftest.er1
24622 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024624 (exit $ac_status); } && {
24625 test -z "$ac_c_werror_flag" ||
24626 test ! -s conftest.err
24627 } && test -s conftest.$ac_objext; then
24628 ac_cv_have_decl_isfinite=yes
24629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024630 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024631sed 's/^/| /' conftest.$ac_ext >&5
24632
24633 ac_cv_have_decl_isfinite=no
24634fi
24635
24636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24637fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024638{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24639echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24640if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024641
24642cat >>confdefs.h <<_ACEOF
24643#define HAVE_DECL_ISFINITE 1
24644_ACEOF
24645
24646
24647else
24648 cat >>confdefs.h <<_ACEOF
24649#define HAVE_DECL_ISFINITE 0
24650_ACEOF
24651
24652
24653fi
24654
24655
Christian Heimes0a8143f2007-12-18 23:22:54 +000024656
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024657LIBS=$LIBS_SAVE
24658
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024659# For multiprocessing module, check that sem_open
24660# actually works. For FreeBSD versions <= 7.2,
24661# the kernel module that provides POSIX semaphores
24662# isn't loaded by default, so an attempt to call
24663# sem_open results in a 'Signal 12' error.
24664{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24665echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24666if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24667 echo $ECHO_N "(cached) $ECHO_C" >&6
24668else
24669 if test "$cross_compiling" = yes; then
24670 ac_cv_posix_semaphores_enabled=yes
24671else
24672 cat >conftest.$ac_ext <<_ACEOF
24673/* confdefs.h. */
24674_ACEOF
24675cat confdefs.h >>conftest.$ac_ext
24676cat >>conftest.$ac_ext <<_ACEOF
24677/* end confdefs.h. */
24678
24679#include <unistd.h>
24680#include <fcntl.h>
24681#include <stdio.h>
24682#include <semaphore.h>
24683#include <sys/stat.h>
24684
24685int main(void) {
24686 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24687 if (a == SEM_FAILED) {
24688 perror("sem_open");
24689 return 1;
24690 }
24691 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024692 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024693 return 0;
24694}
24695
24696_ACEOF
24697rm -f conftest$ac_exeext
24698if { (ac_try="$ac_link"
24699case "(($ac_try" in
24700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24701 *) ac_try_echo=$ac_try;;
24702esac
24703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24704 (eval "$ac_link") 2>&5
24705 ac_status=$?
24706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24707 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24708 { (case "(($ac_try" in
24709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24710 *) ac_try_echo=$ac_try;;
24711esac
24712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24713 (eval "$ac_try") 2>&5
24714 ac_status=$?
24715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24716 (exit $ac_status); }; }; then
24717 ac_cv_posix_semaphores_enabled=yes
24718else
24719 echo "$as_me: program exited with status $ac_status" >&5
24720echo "$as_me: failed program was:" >&5
24721sed 's/^/| /' conftest.$ac_ext >&5
24722
24723( exit $ac_status )
24724ac_cv_posix_semaphores_enabled=no
24725fi
24726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24727fi
24728
24729
24730
24731fi
24732
24733{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24734echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24735if test $ac_cv_posix_semaphores_enabled = no
24736then
24737
24738cat >>confdefs.h <<\_ACEOF
24739#define POSIX_SEMAPHORES_NOT_ENABLED 1
24740_ACEOF
24741
24742fi
24743
24744# Multiprocessing check for broken sem_getvalue
24745{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24746echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24747if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24748 echo $ECHO_N "(cached) $ECHO_C" >&6
24749else
24750 if test "$cross_compiling" = yes; then
24751 ac_cv_broken_sem_getvalue=yes
24752else
24753 cat >conftest.$ac_ext <<_ACEOF
24754/* confdefs.h. */
24755_ACEOF
24756cat confdefs.h >>conftest.$ac_ext
24757cat >>conftest.$ac_ext <<_ACEOF
24758/* end confdefs.h. */
24759
24760#include <unistd.h>
24761#include <fcntl.h>
24762#include <stdio.h>
24763#include <semaphore.h>
24764#include <sys/stat.h>
24765
24766int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024767 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024768 int count;
24769 int res;
24770 if(a==SEM_FAILED){
24771 perror("sem_open");
24772 return 1;
24773
24774 }
24775 res = sem_getvalue(a, &count);
24776 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024777 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024778 return res==-1 ? 1 : 0;
24779}
24780
24781_ACEOF
24782rm -f conftest$ac_exeext
24783if { (ac_try="$ac_link"
24784case "(($ac_try" in
24785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24786 *) ac_try_echo=$ac_try;;
24787esac
24788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24789 (eval "$ac_link") 2>&5
24790 ac_status=$?
24791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24793 { (case "(($ac_try" in
24794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24795 *) ac_try_echo=$ac_try;;
24796esac
24797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24798 (eval "$ac_try") 2>&5
24799 ac_status=$?
24800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24801 (exit $ac_status); }; }; then
24802 ac_cv_broken_sem_getvalue=no
24803else
24804 echo "$as_me: program exited with status $ac_status" >&5
24805echo "$as_me: failed program was:" >&5
24806sed 's/^/| /' conftest.$ac_ext >&5
24807
24808( exit $ac_status )
24809ac_cv_broken_sem_getvalue=yes
24810fi
24811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24812fi
24813
24814
24815
24816fi
24817
24818{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24819echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24820if test $ac_cv_broken_sem_getvalue = yes
24821then
24822
24823cat >>confdefs.h <<\_ACEOF
24824#define HAVE_BROKEN_SEM_GETVALUE 1
24825_ACEOF
24826
24827fi
24828
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024829# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024830{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24831echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024832# Check whether --enable-big-digits was given.
24833if test "${enable_big_digits+set}" = set; then
24834 enableval=$enable_big_digits; case $enable_big_digits in
24835yes)
24836 enable_big_digits=30 ;;
24837no)
24838 enable_big_digits=15 ;;
2483915|30)
24840 ;;
24841*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024842 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24843echo "$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 +000024844 { (exit 1); exit 1; }; } ;;
24845esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024846{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24847echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024848
24849cat >>confdefs.h <<_ACEOF
24850#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24851_ACEOF
24852
24853
24854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024855 { echo "$as_me:$LINENO: result: no value specified" >&5
24856echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024857fi
24858
24859
Guido van Rossumef2255b2000-03-10 22:30:29 +000024860# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024861if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024862 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24863echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024864if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024866fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024867{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24868echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024869else
Martin v. Löwis11437992002-04-12 09:54:03 +000024870 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024871{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24872echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024873cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024874/* confdefs.h. */
24875_ACEOF
24876cat confdefs.h >>conftest.$ac_ext
24877cat >>conftest.$ac_ext <<_ACEOF
24878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024879$ac_includes_default
24880#include <wchar.h>
24881_ACEOF
24882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883if { (ac_try="$ac_compile"
24884case "(($ac_try" in
24885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24886 *) ac_try_echo=$ac_try;;
24887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024891 grep -v '^ *+' conftest.er1 >conftest.err
24892 rm -f conftest.er1
24893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024895 (exit $ac_status); } && {
24896 test -z "$ac_c_werror_flag" ||
24897 test ! -s conftest.err
24898 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 ac_header_compiler=yes
24900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024902sed 's/^/| /' conftest.$ac_ext >&5
24903
Martin v. Löwiseba40652007-08-30 20:10:57 +000024904 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024906
24907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024908{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24909echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024910
24911# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024912{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24913echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024915/* confdefs.h. */
24916_ACEOF
24917cat confdefs.h >>conftest.$ac_ext
24918cat >>conftest.$ac_ext <<_ACEOF
24919/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024920#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024921_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024922if { (ac_try="$ac_cpp conftest.$ac_ext"
24923case "(($ac_try" in
24924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24925 *) ac_try_echo=$ac_try;;
24926esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024928 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024930 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024931 rm -f conftest.er1
24932 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024934 (exit $ac_status); } >/dev/null && {
24935 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24936 test ! -s conftest.err
24937 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024938 ac_header_preproc=yes
24939else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024941sed 's/^/| /' conftest.$ac_ext >&5
24942
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024945
Martin v. Löwis11437992002-04-12 09:54:03 +000024946rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024947{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24948echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024949
24950# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024951case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24952 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024953 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24954echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24955 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24956echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024957 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024958 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024959 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024960 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24961echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24962 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24963echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24964 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24965echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24966 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24967echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24968 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24969echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24970 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24971echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024972 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024973## -------------------------------------- ##
24974## Report this to http://bugs.python.org/ ##
24975## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024976_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024978 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024980{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24981echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024982if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024984else
24985 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024986fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024987{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24988echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024989
24990fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024991if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024992
24993
24994cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024995#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024996_ACEOF
24997
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024998 wchar_h="yes"
24999
Guido van Rossumef2255b2000-03-10 22:30:29 +000025000else
Martin v. Löwis11437992002-04-12 09:54:03 +000025001 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025002
25003fi
25004
Michael W. Hudson54241132001-12-07 15:38:26 +000025005
Martin v. Löwis11437992002-04-12 09:54:03 +000025006
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025007# determine wchar_t size
25008if test "$wchar_h" = yes
25009then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025010 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25011echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25012if test "${ac_cv_type_wchar_t+set}" = set; then
25013 echo $ECHO_N "(cached) $ECHO_C" >&6
25014else
25015 cat >conftest.$ac_ext <<_ACEOF
25016/* confdefs.h. */
25017_ACEOF
25018cat confdefs.h >>conftest.$ac_ext
25019cat >>conftest.$ac_ext <<_ACEOF
25020/* end confdefs.h. */
25021#include <wchar.h>
25022
25023typedef wchar_t ac__type_new_;
25024int
25025main ()
25026{
25027if ((ac__type_new_ *) 0)
25028 return 0;
25029if (sizeof (ac__type_new_))
25030 return 0;
25031 ;
25032 return 0;
25033}
25034_ACEOF
25035rm -f conftest.$ac_objext
25036if { (ac_try="$ac_compile"
25037case "(($ac_try" in
25038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25039 *) ac_try_echo=$ac_try;;
25040esac
25041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25042 (eval "$ac_compile") 2>conftest.er1
25043 ac_status=$?
25044 grep -v '^ *+' conftest.er1 >conftest.err
25045 rm -f conftest.er1
25046 cat conftest.err >&5
25047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25048 (exit $ac_status); } && {
25049 test -z "$ac_c_werror_flag" ||
25050 test ! -s conftest.err
25051 } && test -s conftest.$ac_objext; then
25052 ac_cv_type_wchar_t=yes
25053else
25054 echo "$as_me: failed program was:" >&5
25055sed 's/^/| /' conftest.$ac_ext >&5
25056
25057 ac_cv_type_wchar_t=no
25058fi
25059
25060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25061fi
25062{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25063echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25064
25065# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25068# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025069{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25070echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025071if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025073else
Martin v. Löwis11437992002-04-12 09:54:03 +000025074 if test "$cross_compiling" = yes; then
25075 # Depending upon the size, compute the lo and hi bounds.
25076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025077/* confdefs.h. */
25078_ACEOF
25079cat confdefs.h >>conftest.$ac_ext
25080cat >>conftest.$ac_ext <<_ACEOF
25081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025082#include <wchar.h>
25083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025084 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025085int
25086main ()
25087{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025089test_array [0] = 0
25090
25091 ;
25092 return 0;
25093}
25094_ACEOF
25095rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025096if { (ac_try="$ac_compile"
25097case "(($ac_try" in
25098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25099 *) ac_try_echo=$ac_try;;
25100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025104 grep -v '^ *+' conftest.er1 >conftest.err
25105 rm -f conftest.er1
25106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025108 (exit $ac_status); } && {
25109 test -z "$ac_c_werror_flag" ||
25110 test ! -s conftest.err
25111 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 ac_lo=0 ac_mid=0
25113 while :; do
25114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025115/* confdefs.h. */
25116_ACEOF
25117cat confdefs.h >>conftest.$ac_ext
25118cat >>conftest.$ac_ext <<_ACEOF
25119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025120#include <wchar.h>
25121
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025122 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025123int
25124main ()
25125{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025126static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025127test_array [0] = 0
25128
25129 ;
25130 return 0;
25131}
25132_ACEOF
25133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025134if { (ac_try="$ac_compile"
25135case "(($ac_try" in
25136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25137 *) ac_try_echo=$ac_try;;
25138esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025142 grep -v '^ *+' conftest.er1 >conftest.err
25143 rm -f conftest.er1
25144 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025146 (exit $ac_status); } && {
25147 test -z "$ac_c_werror_flag" ||
25148 test ! -s conftest.err
25149 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025150 ac_hi=$ac_mid; break
25151else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025153sed 's/^/| /' conftest.$ac_ext >&5
25154
Martin v. Löwiseba40652007-08-30 20:10:57 +000025155 ac_lo=`expr $ac_mid + 1`
25156 if test $ac_lo -le $ac_mid; then
25157 ac_lo= ac_hi=
25158 break
25159 fi
25160 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025161fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025162
25163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025164 done
25165else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025166 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Martin v. Löwiseba40652007-08-30 20:10:57 +000025169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025170/* confdefs.h. */
25171_ACEOF
25172cat confdefs.h >>conftest.$ac_ext
25173cat >>conftest.$ac_ext <<_ACEOF
25174/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025175#include <wchar.h>
25176
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025177 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025178int
25179main ()
25180{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025182test_array [0] = 0
25183
25184 ;
25185 return 0;
25186}
25187_ACEOF
25188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025189if { (ac_try="$ac_compile"
25190case "(($ac_try" in
25191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25192 *) ac_try_echo=$ac_try;;
25193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025197 grep -v '^ *+' conftest.er1 >conftest.err
25198 rm -f conftest.er1
25199 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025201 (exit $ac_status); } && {
25202 test -z "$ac_c_werror_flag" ||
25203 test ! -s conftest.err
25204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025205 ac_hi=-1 ac_mid=-1
25206 while :; do
25207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025208/* confdefs.h. */
25209_ACEOF
25210cat confdefs.h >>conftest.$ac_ext
25211cat >>conftest.$ac_ext <<_ACEOF
25212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025213#include <wchar.h>
25214
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025215 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025216int
25217main ()
25218{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025220test_array [0] = 0
25221
25222 ;
25223 return 0;
25224}
25225_ACEOF
25226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025227if { (ac_try="$ac_compile"
25228case "(($ac_try" in
25229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25230 *) ac_try_echo=$ac_try;;
25231esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025235 grep -v '^ *+' conftest.er1 >conftest.err
25236 rm -f conftest.er1
25237 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025239 (exit $ac_status); } && {
25240 test -z "$ac_c_werror_flag" ||
25241 test ! -s conftest.err
25242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025243 ac_lo=$ac_mid; break
25244else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025246sed 's/^/| /' conftest.$ac_ext >&5
25247
Martin v. Löwiseba40652007-08-30 20:10:57 +000025248 ac_hi=`expr '(' $ac_mid ')' - 1`
25249 if test $ac_mid -le $ac_hi; then
25250 ac_lo= ac_hi=
25251 break
25252 fi
25253 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255
25256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025257 done
25258else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025259 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025260sed 's/^/| /' conftest.$ac_ext >&5
25261
Martin v. Löwiseba40652007-08-30 20:10:57 +000025262 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025264
25265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267
25268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025269# Binary search between lo and hi bounds.
25270while test "x$ac_lo" != "x$ac_hi"; do
25271 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025273/* confdefs.h. */
25274_ACEOF
25275cat confdefs.h >>conftest.$ac_ext
25276cat >>conftest.$ac_ext <<_ACEOF
25277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025278#include <wchar.h>
25279
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025280 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025281int
25282main ()
25283{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025285test_array [0] = 0
25286
25287 ;
25288 return 0;
25289}
25290_ACEOF
25291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025292if { (ac_try="$ac_compile"
25293case "(($ac_try" in
25294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25295 *) ac_try_echo=$ac_try;;
25296esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025300 grep -v '^ *+' conftest.er1 >conftest.err
25301 rm -f conftest.er1
25302 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025304 (exit $ac_status); } && {
25305 test -z "$ac_c_werror_flag" ||
25306 test ! -s conftest.err
25307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025308 ac_hi=$ac_mid
25309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025311sed 's/^/| /' conftest.$ac_ext >&5
25312
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025315
25316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025317done
25318case $ac_lo in
25319?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025321 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025322See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025323echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025324See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025325 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025326 else
25327 ac_cv_sizeof_wchar_t=0
25328 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025329esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025330else
Martin v. Löwis11437992002-04-12 09:54:03 +000025331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025332/* confdefs.h. */
25333_ACEOF
25334cat confdefs.h >>conftest.$ac_ext
25335cat >>conftest.$ac_ext <<_ACEOF
25336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025337#include <wchar.h>
25338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025339 typedef wchar_t ac__type_sizeof_;
25340static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25341static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025342#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025343#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025344int
25345main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025346{
Martin v. Löwis11437992002-04-12 09:54:03 +000025347
25348 FILE *f = fopen ("conftest.val", "w");
25349 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025350 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025351 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025352 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025353 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025354 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025355 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025356 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025357 }
25358 else
25359 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025360 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025363 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025364 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025366
25367 ;
25368 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025369}
Martin v. Löwis11437992002-04-12 09:54:03 +000025370_ACEOF
25371rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372if { (ac_try="$ac_link"
25373case "(($ac_try" in
25374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25375 *) ac_try_echo=$ac_try;;
25376esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025378 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025379 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025382 { (case "(($ac_try" in
25383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25384 *) ac_try_echo=$ac_try;;
25385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025387 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025388 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025390 (exit $ac_status); }; }; then
25391 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025392else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025393 echo "$as_me: program exited with status $ac_status" >&5
25394echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025395sed 's/^/| /' conftest.$ac_ext >&5
25396
Martin v. Löwis11437992002-04-12 09:54:03 +000025397( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025398if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025399 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025400See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025402See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025403 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025404 else
25405 ac_cv_sizeof_wchar_t=0
25406 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025408rm -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 +000025409fi
25410rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025411fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025412{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25413echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025414
25415
25416
Martin v. Löwis11437992002-04-12 09:54:03 +000025417cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025418#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025419_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025420
Michael W. Hudson54241132001-12-07 15:38:26 +000025421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025422fi
25423
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025424{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25425echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025426have_ucs4_tcl=no
25427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025428/* confdefs.h. */
25429_ACEOF
25430cat confdefs.h >>conftest.$ac_ext
25431cat >>conftest.$ac_ext <<_ACEOF
25432/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025433
25434#include <tcl.h>
25435#if TCL_UTF_MAX != 6
25436# error "NOT UCS4_TCL"
25437#endif
25438int
25439main ()
25440{
25441
25442 ;
25443 return 0;
25444}
25445_ACEOF
25446rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025447if { (ac_try="$ac_compile"
25448case "(($ac_try" in
25449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25450 *) ac_try_echo=$ac_try;;
25451esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025455 grep -v '^ *+' conftest.er1 >conftest.err
25456 rm -f conftest.er1
25457 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025459 (exit $ac_status); } && {
25460 test -z "$ac_c_werror_flag" ||
25461 test ! -s conftest.err
25462 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025463
25464
25465cat >>confdefs.h <<\_ACEOF
25466#define HAVE_UCS4_TCL 1
25467_ACEOF
25468
25469 have_ucs4_tcl=yes
25470
25471else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025473sed 's/^/| /' conftest.$ac_ext >&5
25474
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477
25478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025479{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25480echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025481
Skip Montanaro6dead952003-09-25 14:50:04 +000025482# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025483if test "$wchar_h" = yes
25484then
25485 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025486 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25487echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025488 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025489 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025490else
25491
25492 if test "$cross_compiling" = yes; then
25493 ac_cv_wchar_t_signed=yes
25494else
25495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025496/* confdefs.h. */
25497_ACEOF
25498cat confdefs.h >>conftest.$ac_ext
25499cat >>conftest.$ac_ext <<_ACEOF
25500/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025501
25502 #include <wchar.h>
25503 int main()
25504 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025505 /* Success: exit code 0 */
25506 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025507 }
25508
25509_ACEOF
25510rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511if { (ac_try="$ac_link"
25512case "(($ac_try" in
25513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25514 *) ac_try_echo=$ac_try;;
25515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025517 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025518 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025521 { (case "(($ac_try" in
25522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25523 *) ac_try_echo=$ac_try;;
25524esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025526 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025527 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025529 (exit $ac_status); }; }; then
25530 ac_cv_wchar_t_signed=yes
25531else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025532 echo "$as_me: program exited with status $ac_status" >&5
25533echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025534sed 's/^/| /' conftest.$ac_ext >&5
25535
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025536( exit $ac_status )
25537ac_cv_wchar_t_signed=no
25538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025539rm -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 +000025540fi
25541
Martin v. Löwiseba40652007-08-30 20:10:57 +000025542
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025543fi
25544
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025545 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25546echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025547fi
25548
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025549{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25550echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025551# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025552if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025554else
25555 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025556fi
25557
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025558
25559if test $enable_unicode = yes
25560then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025561 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025562 case "$have_ucs4_tcl" in
25563 yes) enable_unicode="ucs4"
25564 ;;
25565 *) enable_unicode="ucs2"
25566 ;;
25567 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025568fi
25569
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025570
25571
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025572case "$enable_unicode" in
25573ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025574 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025575#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025576_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025577
25578 ;;
25579ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025580 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025581#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025582_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025583
25584 ;;
25585esac
25586
Michael W. Hudson54241132001-12-07 15:38:26 +000025587
Martin v. Löwis11437992002-04-12 09:54:03 +000025588
25589
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025591if test "$enable_unicode" = "no"
25592then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025593 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025594 { echo "$as_me:$LINENO: result: not used" >&5
25595echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025596else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025597 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025598
25599cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025600#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025601_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025602
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025603
25604 # wchar_t is only usable if it maps to an unsigned type
25605 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025606 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025607 then
25608 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025609
Martin v. Löwis11437992002-04-12 09:54:03 +000025610cat >>confdefs.h <<\_ACEOF
25611#define HAVE_USABLE_WCHAR_T 1
25612_ACEOF
25613
25614 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025615#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025616_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025617
25618 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25619 then
25620 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025621 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025622#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025623_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025624
25625 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25626 then
25627 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025628 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025629#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025630_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025631
25632 else
25633 PY_UNICODE_TYPE="no type found"
25634 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025635 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25636echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025637fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025638
25639# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025640{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25641echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025642if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025643 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025644else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025645 # See if sys/param.h defines the BYTE_ORDER macro.
25646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025647/* confdefs.h. */
25648_ACEOF
25649cat confdefs.h >>conftest.$ac_ext
25650cat >>conftest.$ac_ext <<_ACEOF
25651/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025652#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025653#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025654
Martin v. Löwis11437992002-04-12 09:54:03 +000025655int
25656main ()
25657{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025658#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25659 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25660 bogus endian macros
25661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025662
25663 ;
25664 return 0;
25665}
25666_ACEOF
25667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025668if { (ac_try="$ac_compile"
25669case "(($ac_try" in
25670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25671 *) ac_try_echo=$ac_try;;
25672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025676 grep -v '^ *+' conftest.er1 >conftest.err
25677 rm -f conftest.er1
25678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025680 (exit $ac_status); } && {
25681 test -z "$ac_c_werror_flag" ||
25682 test ! -s conftest.err
25683 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025684 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025686/* confdefs.h. */
25687_ACEOF
25688cat confdefs.h >>conftest.$ac_ext
25689cat >>conftest.$ac_ext <<_ACEOF
25690/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025691#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025692#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025693
Martin v. Löwis11437992002-04-12 09:54:03 +000025694int
25695main ()
25696{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025697#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025698 not big endian
25699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025700
25701 ;
25702 return 0;
25703}
25704_ACEOF
25705rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025706if { (ac_try="$ac_compile"
25707case "(($ac_try" in
25708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25709 *) ac_try_echo=$ac_try;;
25710esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025714 grep -v '^ *+' conftest.er1 >conftest.err
25715 rm -f conftest.er1
25716 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718 (exit $ac_status); } && {
25719 test -z "$ac_c_werror_flag" ||
25720 test ! -s conftest.err
25721 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025722 ac_cv_c_bigendian=yes
25723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025725sed 's/^/| /' conftest.$ac_ext >&5
25726
Martin v. Löwiseba40652007-08-30 20:10:57 +000025727 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729
25730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025733sed 's/^/| /' conftest.$ac_ext >&5
25734
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025735 # It does not; compile a test program.
25736if test "$cross_compiling" = yes; then
25737 # try to guess the endianness by grepping values into an object file
25738 ac_cv_c_bigendian=unknown
25739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025740/* confdefs.h. */
25741_ACEOF
25742cat confdefs.h >>conftest.$ac_ext
25743cat >>conftest.$ac_ext <<_ACEOF
25744/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025745short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25746short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25747void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25748short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25749short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25750void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025751int
25752main ()
25753{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025754 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025755 ;
25756 return 0;
25757}
25758_ACEOF
25759rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025760if { (ac_try="$ac_compile"
25761case "(($ac_try" in
25762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25763 *) ac_try_echo=$ac_try;;
25764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025768 grep -v '^ *+' conftest.er1 >conftest.err
25769 rm -f conftest.er1
25770 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025772 (exit $ac_status); } && {
25773 test -z "$ac_c_werror_flag" ||
25774 test ! -s conftest.err
25775 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025776 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025777 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025778fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025779if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25780 if test "$ac_cv_c_bigendian" = unknown; then
25781 ac_cv_c_bigendian=no
25782 else
25783 # finding both strings is unlikely to happen, but who knows?
25784 ac_cv_c_bigendian=unknown
25785 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025786fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025789sed 's/^/| /' conftest.$ac_ext >&5
25790
Martin v. Löwiseba40652007-08-30 20:10:57 +000025791
Martin v. Löwis11437992002-04-12 09:54:03 +000025792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025793
25794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025795else
25796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025797/* confdefs.h. */
25798_ACEOF
25799cat confdefs.h >>conftest.$ac_ext
25800cat >>conftest.$ac_ext <<_ACEOF
25801/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025802$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025803int
25804main ()
25805{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025806
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025807 /* Are we little or big endian? From Harbison&Steele. */
25808 union
25809 {
25810 long int l;
25811 char c[sizeof (long int)];
25812 } u;
25813 u.l = 1;
25814 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025815
25816 ;
25817 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025818}
Martin v. Löwis11437992002-04-12 09:54:03 +000025819_ACEOF
25820rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025821if { (ac_try="$ac_link"
25822case "(($ac_try" in
25823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25824 *) ac_try_echo=$ac_try;;
25825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025828 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025830 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831 { (case "(($ac_try" in
25832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25833 *) ac_try_echo=$ac_try;;
25834esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025836 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025837 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025839 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025840 ac_cv_c_bigendian=no
25841else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025842 echo "$as_me: program exited with status $ac_status" >&5
25843echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025844sed 's/^/| /' conftest.$ac_ext >&5
25845
Martin v. Löwis11437992002-04-12 09:54:03 +000025846( exit $ac_status )
25847ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025849rm -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 +000025850fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025851
25852
Martin v. Löwis11437992002-04-12 09:54:03 +000025853fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025854
25855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25856fi
25857{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25858echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25859case $ac_cv_c_bigendian in
25860 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025861
25862cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025864_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025865 ;;
25866 no)
25867 ;;
25868 *)
25869 { { echo "$as_me:$LINENO: error: unknown endianness
25870presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25871echo "$as_me: error: unknown endianness
25872presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025873 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025874esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025875
Michael W. Hudson54241132001-12-07 15:38:26 +000025876
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025877# Check whether right shifting a negative integer extends the sign bit
25878# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025879{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25880echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025881if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025882 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025883else
Martin v. Löwis11437992002-04-12 09:54:03 +000025884
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025885if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025886 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025887else
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025889/* confdefs.h. */
25890_ACEOF
25891cat confdefs.h >>conftest.$ac_ext
25892cat >>conftest.$ac_ext <<_ACEOF
25893/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025894
25895int main()
25896{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025897 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025898}
25899
Martin v. Löwis11437992002-04-12 09:54:03 +000025900_ACEOF
25901rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025902if { (ac_try="$ac_link"
25903case "(($ac_try" in
25904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25905 *) ac_try_echo=$ac_try;;
25906esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025909 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912 { (case "(($ac_try" in
25913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25914 *) ac_try_echo=$ac_try;;
25915esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025918 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025920 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025921 ac_cv_rshift_extends_sign=yes
25922else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025923 echo "$as_me: program exited with status $ac_status" >&5
25924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025925sed 's/^/| /' conftest.$ac_ext >&5
25926
Martin v. Löwis11437992002-04-12 09:54:03 +000025927( exit $ac_status )
25928ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025930rm -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 +000025931fi
25932
Martin v. Löwiseba40652007-08-30 20:10:57 +000025933
25934fi
25935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025936{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25937echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025938if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025939then
Martin v. Löwis11437992002-04-12 09:54:03 +000025940
25941cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025942#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025943_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025944
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025945fi
25946
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025947# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025948{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25949echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025950if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025952else
Martin v. Löwis11437992002-04-12 09:54:03 +000025953
25954cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025955/* confdefs.h. */
25956_ACEOF
25957cat confdefs.h >>conftest.$ac_ext
25958cat >>conftest.$ac_ext <<_ACEOF
25959/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025960#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025961int
25962main ()
25963{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025964
25965 FILE *f = fopen("/dev/null", "r");
25966 flockfile(f);
25967 getc_unlocked(f);
25968 funlockfile(f);
25969
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 ;
25971 return 0;
25972}
25973_ACEOF
25974rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025975if { (ac_try="$ac_link"
25976case "(($ac_try" in
25977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25978 *) ac_try_echo=$ac_try;;
25979esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025981 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025983 grep -v '^ *+' conftest.er1 >conftest.err
25984 rm -f conftest.er1
25985 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025987 (exit $ac_status); } && {
25988 test -z "$ac_c_werror_flag" ||
25989 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025990 } && test -s conftest$ac_exeext &&
25991 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025992 ac_cv_have_getc_unlocked=yes
25993else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025995sed 's/^/| /' conftest.$ac_ext >&5
25996
Martin v. Löwiseba40652007-08-30 20:10:57 +000025997 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025999
26000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026001 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026002fi
26003
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026004{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26005echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026006if test "$ac_cv_have_getc_unlocked" = yes
26007then
Martin v. Löwis11437992002-04-12 09:54:03 +000026008
26009cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026010#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026011_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026012
26013fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026014
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026015# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026016# save the value of LIBS so we don't actually link Python with readline
26017LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026018
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026019# On some systems we need to link readline to a termcap compatible
26020# library. NOTE: Keep the precedence of listed libraries synchronised
26021# with setup.py.
26022py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026023{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26024echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026025for py_libtermcap in "" ncursesw ncurses curses termcap; do
26026 if test -z "$py_libtermcap"; then
26027 READLINE_LIBS="-lreadline"
26028 else
26029 READLINE_LIBS="-lreadline -l$py_libtermcap"
26030 fi
26031 LIBS="$READLINE_LIBS $LIBS_no_readline"
26032 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026033/* confdefs.h. */
26034_ACEOF
26035cat confdefs.h >>conftest.$ac_ext
26036cat >>conftest.$ac_ext <<_ACEOF
26037/* end confdefs.h. */
26038
Martin v. Löwiseba40652007-08-30 20:10:57 +000026039/* Override any GCC internal prototype to avoid an error.
26040 Use char because int might match the return type of a GCC
26041 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026042#ifdef __cplusplus
26043extern "C"
26044#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026045char readline ();
26046int
26047main ()
26048{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026049return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026050 ;
26051 return 0;
26052}
26053_ACEOF
26054rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026055if { (ac_try="$ac_link"
26056case "(($ac_try" in
26057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26058 *) ac_try_echo=$ac_try;;
26059esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026061 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026062 ac_status=$?
26063 grep -v '^ *+' conftest.er1 >conftest.err
26064 rm -f conftest.er1
26065 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067 (exit $ac_status); } && {
26068 test -z "$ac_c_werror_flag" ||
26069 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026070 } && test -s conftest$ac_exeext &&
26071 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026072 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026074 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026075sed 's/^/| /' conftest.$ac_ext >&5
26076
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026077
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026079
26080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026081 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026082 if test $py_cv_lib_readline = yes; then
26083 break
26084 fi
26085done
26086# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26087#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026088if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026089 { echo "$as_me:$LINENO: result: none" >&5
26090echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026091else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026092 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26093echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026094
26095cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026096#define HAVE_LIBREADLINE 1
26097_ACEOF
26098
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026099fi
26100
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026101# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026102{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26103echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026104if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026105 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026106else
26107 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026108LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026109cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026110/* confdefs.h. */
26111_ACEOF
26112cat confdefs.h >>conftest.$ac_ext
26113cat >>conftest.$ac_ext <<_ACEOF
26114/* end confdefs.h. */
26115
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116/* Override any GCC internal prototype to avoid an error.
26117 Use char because int might match the return type of a GCC
26118 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026119#ifdef __cplusplus
26120extern "C"
26121#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026122char rl_callback_handler_install ();
26123int
26124main ()
26125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026126return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026127 ;
26128 return 0;
26129}
26130_ACEOF
26131rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026132if { (ac_try="$ac_link"
26133case "(($ac_try" in
26134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26135 *) ac_try_echo=$ac_try;;
26136esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026138 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026140 grep -v '^ *+' conftest.er1 >conftest.err
26141 rm -f conftest.er1
26142 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026144 (exit $ac_status); } && {
26145 test -z "$ac_c_werror_flag" ||
26146 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026147 } && test -s conftest$ac_exeext &&
26148 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026149 ac_cv_lib_readline_rl_callback_handler_install=yes
26150else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026151 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026152sed 's/^/| /' conftest.$ac_ext >&5
26153
Martin v. Löwiseba40652007-08-30 20:10:57 +000026154 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026156
26157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026158 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026159LIBS=$ac_check_lib_save_LIBS
26160fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026161{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26162echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26163if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026164
26165cat >>confdefs.h <<\_ACEOF
26166#define HAVE_RL_CALLBACK 1
26167_ACEOF
26168
26169fi
26170
26171
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026172# check for readline 2.2
26173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026174/* confdefs.h. */
26175_ACEOF
26176cat confdefs.h >>conftest.$ac_ext
26177cat >>conftest.$ac_ext <<_ACEOF
26178/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026179#include <readline/readline.h>
26180_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026181if { (ac_try="$ac_cpp conftest.$ac_ext"
26182case "(($ac_try" in
26183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26184 *) ac_try_echo=$ac_try;;
26185esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026187 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026188 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026189 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026190 rm -f conftest.er1
26191 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193 (exit $ac_status); } >/dev/null && {
26194 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26195 test ! -s conftest.err
26196 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026197 have_readline=yes
26198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026200sed 's/^/| /' conftest.$ac_ext >&5
26201
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026202 have_readline=no
26203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026204
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026205rm -f conftest.err conftest.$ac_ext
26206if test $have_readline = yes
26207then
26208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026209/* confdefs.h. */
26210_ACEOF
26211cat confdefs.h >>conftest.$ac_ext
26212cat >>conftest.$ac_ext <<_ACEOF
26213/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026214#include <readline/readline.h>
26215
26216_ACEOF
26217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026218 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026219
26220cat >>confdefs.h <<\_ACEOF
26221#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26222_ACEOF
26223
26224fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026225rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026226
26227 cat >conftest.$ac_ext <<_ACEOF
26228/* confdefs.h. */
26229_ACEOF
26230cat confdefs.h >>conftest.$ac_ext
26231cat >>conftest.$ac_ext <<_ACEOF
26232/* end confdefs.h. */
26233#include <readline/readline.h>
26234
26235_ACEOF
26236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26237 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26238
26239cat >>confdefs.h <<\_ACEOF
26240#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26241_ACEOF
26242
26243fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026244rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026245
26246fi
26247
Martin v. Löwis0daad592001-09-30 21:09:59 +000026248# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026249{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26250echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026251if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026253else
Martin v. Löwis11437992002-04-12 09:54:03 +000026254 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026255LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026257/* confdefs.h. */
26258_ACEOF
26259cat confdefs.h >>conftest.$ac_ext
26260cat >>conftest.$ac_ext <<_ACEOF
26261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026262
Martin v. Löwiseba40652007-08-30 20:10:57 +000026263/* Override any GCC internal prototype to avoid an error.
26264 Use char because int might match the return type of a GCC
26265 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026266#ifdef __cplusplus
26267extern "C"
26268#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026269char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026270int
26271main ()
26272{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026273return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026274 ;
26275 return 0;
26276}
26277_ACEOF
26278rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279if { (ac_try="$ac_link"
26280case "(($ac_try" in
26281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26282 *) ac_try_echo=$ac_try;;
26283esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026285 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026287 grep -v '^ *+' conftest.er1 >conftest.err
26288 rm -f conftest.er1
26289 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026291 (exit $ac_status); } && {
26292 test -z "$ac_c_werror_flag" ||
26293 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026294 } && test -s conftest$ac_exeext &&
26295 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026296 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026299sed 's/^/| /' conftest.$ac_ext >&5
26300
Martin v. Löwiseba40652007-08-30 20:10:57 +000026301 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026303
26304rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026306LIBS=$ac_check_lib_save_LIBS
26307fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026308{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26309echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26310if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026311
Martin v. Löwis11437992002-04-12 09:54:03 +000026312cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026313#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026314_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026315
Martin v. Löwis0daad592001-09-30 21:09:59 +000026316fi
26317
Michael W. Hudson54241132001-12-07 15:38:26 +000026318
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026319# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026320{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26321echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026322if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026323 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026324else
26325 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026326LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026327cat >conftest.$ac_ext <<_ACEOF
26328/* confdefs.h. */
26329_ACEOF
26330cat confdefs.h >>conftest.$ac_ext
26331cat >>conftest.$ac_ext <<_ACEOF
26332/* end confdefs.h. */
26333
26334/* Override any GCC internal prototype to avoid an error.
26335 Use char because int might match the return type of a GCC
26336 builtin and then its argument prototype would still apply. */
26337#ifdef __cplusplus
26338extern "C"
26339#endif
26340char rl_completion_display_matches_hook ();
26341int
26342main ()
26343{
26344return rl_completion_display_matches_hook ();
26345 ;
26346 return 0;
26347}
26348_ACEOF
26349rm -f conftest.$ac_objext conftest$ac_exeext
26350if { (ac_try="$ac_link"
26351case "(($ac_try" in
26352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26353 *) ac_try_echo=$ac_try;;
26354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026356 (eval "$ac_link") 2>conftest.er1
26357 ac_status=$?
26358 grep -v '^ *+' conftest.er1 >conftest.err
26359 rm -f conftest.er1
26360 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026362 (exit $ac_status); } && {
26363 test -z "$ac_c_werror_flag" ||
26364 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026365 } && test -s conftest$ac_exeext &&
26366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026367 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26368else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026369 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026370sed 's/^/| /' conftest.$ac_ext >&5
26371
26372 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26373fi
26374
26375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26376 conftest$ac_exeext conftest.$ac_ext
26377LIBS=$ac_check_lib_save_LIBS
26378fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026379{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26380echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26381if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026382
26383cat >>confdefs.h <<\_ACEOF
26384#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26385_ACEOF
26386
26387fi
26388
26389
Martin v. Löwis0daad592001-09-30 21:09:59 +000026390# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026391{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26392echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026393if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026395else
Martin v. Löwis11437992002-04-12 09:54:03 +000026396 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026397LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026398cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026399/* confdefs.h. */
26400_ACEOF
26401cat confdefs.h >>conftest.$ac_ext
26402cat >>conftest.$ac_ext <<_ACEOF
26403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026404
Martin v. Löwiseba40652007-08-30 20:10:57 +000026405/* Override any GCC internal prototype to avoid an error.
26406 Use char because int might match the return type of a GCC
26407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026408#ifdef __cplusplus
26409extern "C"
26410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026411char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026412int
26413main ()
26414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026415return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026416 ;
26417 return 0;
26418}
26419_ACEOF
26420rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026421if { (ac_try="$ac_link"
26422case "(($ac_try" in
26423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26424 *) ac_try_echo=$ac_try;;
26425esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026427 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026429 grep -v '^ *+' conftest.er1 >conftest.err
26430 rm -f conftest.er1
26431 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026433 (exit $ac_status); } && {
26434 test -z "$ac_c_werror_flag" ||
26435 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 } && test -s conftest$ac_exeext &&
26437 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026438 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026439else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026441sed 's/^/| /' conftest.$ac_ext >&5
26442
Martin v. Löwiseba40652007-08-30 20:10:57 +000026443 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026445
26446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026448LIBS=$ac_check_lib_save_LIBS
26449fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026450{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26451echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26452if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026453
Martin v. Löwis11437992002-04-12 09:54:03 +000026454cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026455#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026456_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026457
Guido van Rossum353ae582001-07-10 16:45:32 +000026458fi
26459
Jack Jansendd19cf82001-12-06 22:36:17 +000026460
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026461# also in readline 4.2
26462cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026463/* confdefs.h. */
26464_ACEOF
26465cat confdefs.h >>conftest.$ac_ext
26466cat >>conftest.$ac_ext <<_ACEOF
26467/* end confdefs.h. */
26468#include <readline/readline.h>
26469_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026470if { (ac_try="$ac_cpp conftest.$ac_ext"
26471case "(($ac_try" in
26472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26473 *) ac_try_echo=$ac_try;;
26474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026476 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026477 ac_status=$?
26478 grep -v '^ *+' conftest.er1 >conftest.err
26479 rm -f conftest.er1
26480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026482 (exit $ac_status); } >/dev/null && {
26483 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26484 test ! -s conftest.err
26485 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026486 have_readline=yes
26487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026488 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026489sed 's/^/| /' conftest.$ac_ext >&5
26490
26491 have_readline=no
26492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026493
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026494rm -f conftest.err conftest.$ac_ext
26495if test $have_readline = yes
26496then
26497 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026498/* confdefs.h. */
26499_ACEOF
26500cat confdefs.h >>conftest.$ac_ext
26501cat >>conftest.$ac_ext <<_ACEOF
26502/* end confdefs.h. */
26503#include <readline/readline.h>
26504
26505_ACEOF
26506if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26507 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26508
26509cat >>confdefs.h <<\_ACEOF
26510#define HAVE_RL_CATCH_SIGNAL 1
26511_ACEOF
26512
26513fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026514rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026515
26516fi
26517
Martin v. Löwis82bca632006-02-10 20:49:30 +000026518# End of readline checks: restore LIBS
26519LIBS=$LIBS_no_readline
26520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026521{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26522echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026523if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026524 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026525else
Martin v. Löwis11437992002-04-12 09:54:03 +000026526
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026527if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026528 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026529else
Martin v. Löwis11437992002-04-12 09:54:03 +000026530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026531/* confdefs.h. */
26532_ACEOF
26533cat confdefs.h >>conftest.$ac_ext
26534cat >>conftest.$ac_ext <<_ACEOF
26535/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026536
26537int main()
26538{
26539 int val1 = nice(1);
26540 if (val1 != -1 && val1 == nice(2))
26541 exit(0);
26542 exit(1);
26543}
26544
Martin v. Löwis11437992002-04-12 09:54:03 +000026545_ACEOF
26546rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026547if { (ac_try="$ac_link"
26548case "(($ac_try" in
26549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26550 *) ac_try_echo=$ac_try;;
26551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026553 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026554 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557 { (case "(($ac_try" in
26558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26559 *) ac_try_echo=$ac_try;;
26560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026562 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026563 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026565 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026566 ac_cv_broken_nice=yes
26567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026568 echo "$as_me: program exited with status $ac_status" >&5
26569echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026570sed 's/^/| /' conftest.$ac_ext >&5
26571
Martin v. Löwis11437992002-04-12 09:54:03 +000026572( exit $ac_status )
26573ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026575rm -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 +000026576fi
26577
Martin v. Löwiseba40652007-08-30 20:10:57 +000026578
26579fi
26580
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026581{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26582echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026583if test "$ac_cv_broken_nice" = yes
26584then
Martin v. Löwis11437992002-04-12 09:54:03 +000026585
26586cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026587#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026588_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026589
26590fi
26591
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026592{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26593echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026594if test "${ac_cv_broken_poll+set}" = set; then
26595 echo $ECHO_N "(cached) $ECHO_C" >&6
26596else
26597 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026598 ac_cv_broken_poll=no
26599else
26600 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026601/* confdefs.h. */
26602_ACEOF
26603cat confdefs.h >>conftest.$ac_ext
26604cat >>conftest.$ac_ext <<_ACEOF
26605/* end confdefs.h. */
26606
26607#include <poll.h>
26608
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026609int main()
26610{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026611 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026612 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026613
26614 close (42);
26615
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026616 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026617 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026618 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026619 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026620 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026621 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026622 return 1;
26623}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026624
26625_ACEOF
26626rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026627if { (ac_try="$ac_link"
26628case "(($ac_try" in
26629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26630 *) ac_try_echo=$ac_try;;
26631esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026633 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026634 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026636 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026637 { (case "(($ac_try" in
26638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26639 *) ac_try_echo=$ac_try;;
26640esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026642 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026643 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026645 (exit $ac_status); }; }; then
26646 ac_cv_broken_poll=yes
26647else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026648 echo "$as_me: program exited with status $ac_status" >&5
26649echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026650sed 's/^/| /' conftest.$ac_ext >&5
26651
26652( exit $ac_status )
26653ac_cv_broken_poll=no
26654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026655rm -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 +000026656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026657
26658
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026659fi
26660
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026661{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26662echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026663if test "$ac_cv_broken_poll" = yes
26664then
26665
26666cat >>confdefs.h <<\_ACEOF
26667#define HAVE_BROKEN_POLL 1
26668_ACEOF
26669
26670fi
26671
Brett Cannon43802422005-02-10 20:48:03 +000026672# 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 +000026673# (which is not required by ISO C or UNIX spec) and/or if we support
26674# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026675{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26676echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026677if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026678 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026679else
26680 cat >conftest.$ac_ext <<_ACEOF
26681/* confdefs.h. */
26682_ACEOF
26683cat confdefs.h >>conftest.$ac_ext
26684cat >>conftest.$ac_ext <<_ACEOF
26685/* end confdefs.h. */
26686#include <sys/types.h>
26687#include <$ac_cv_struct_tm>
26688
26689
26690int
26691main ()
26692{
26693static struct tm ac_aggr;
26694if (ac_aggr.tm_zone)
26695return 0;
26696 ;
26697 return 0;
26698}
26699_ACEOF
26700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026701if { (ac_try="$ac_compile"
26702case "(($ac_try" in
26703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26704 *) ac_try_echo=$ac_try;;
26705esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026707 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026708 ac_status=$?
26709 grep -v '^ *+' conftest.er1 >conftest.err
26710 rm -f conftest.er1
26711 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026713 (exit $ac_status); } && {
26714 test -z "$ac_c_werror_flag" ||
26715 test ! -s conftest.err
26716 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026717 ac_cv_member_struct_tm_tm_zone=yes
26718else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026719 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026720sed 's/^/| /' conftest.$ac_ext >&5
26721
Martin v. Löwiseba40652007-08-30 20:10:57 +000026722 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026723/* confdefs.h. */
26724_ACEOF
26725cat confdefs.h >>conftest.$ac_ext
26726cat >>conftest.$ac_ext <<_ACEOF
26727/* end confdefs.h. */
26728#include <sys/types.h>
26729#include <$ac_cv_struct_tm>
26730
26731
26732int
26733main ()
26734{
26735static struct tm ac_aggr;
26736if (sizeof ac_aggr.tm_zone)
26737return 0;
26738 ;
26739 return 0;
26740}
26741_ACEOF
26742rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026743if { (ac_try="$ac_compile"
26744case "(($ac_try" in
26745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26746 *) ac_try_echo=$ac_try;;
26747esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026749 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026750 ac_status=$?
26751 grep -v '^ *+' conftest.er1 >conftest.err
26752 rm -f conftest.er1
26753 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026755 (exit $ac_status); } && {
26756 test -z "$ac_c_werror_flag" ||
26757 test ! -s conftest.err
26758 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026759 ac_cv_member_struct_tm_tm_zone=yes
26760else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026761 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026762sed 's/^/| /' conftest.$ac_ext >&5
26763
Martin v. Löwiseba40652007-08-30 20:10:57 +000026764 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026766
26767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026769
26770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026771fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026772{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26773echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26774if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026775
26776cat >>confdefs.h <<_ACEOF
26777#define HAVE_STRUCT_TM_TM_ZONE 1
26778_ACEOF
26779
26780
26781fi
26782
26783if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26784
26785cat >>confdefs.h <<\_ACEOF
26786#define HAVE_TM_ZONE 1
26787_ACEOF
26788
26789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026790 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26791echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026792if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026793 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026794else
26795 cat >conftest.$ac_ext <<_ACEOF
26796/* confdefs.h. */
26797_ACEOF
26798cat confdefs.h >>conftest.$ac_ext
26799cat >>conftest.$ac_ext <<_ACEOF
26800/* end confdefs.h. */
26801#include <time.h>
26802
26803int
26804main ()
26805{
26806#ifndef tzname
26807 (void) tzname;
26808#endif
26809
26810 ;
26811 return 0;
26812}
26813_ACEOF
26814rm -f conftest.$ac_objext
26815if { (ac_try="$ac_compile"
26816case "(($ac_try" in
26817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26818 *) ac_try_echo=$ac_try;;
26819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026821 (eval "$ac_compile") 2>conftest.er1
26822 ac_status=$?
26823 grep -v '^ *+' conftest.er1 >conftest.err
26824 rm -f conftest.er1
26825 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026827 (exit $ac_status); } && {
26828 test -z "$ac_c_werror_flag" ||
26829 test ! -s conftest.err
26830 } && test -s conftest.$ac_objext; then
26831 ac_cv_have_decl_tzname=yes
26832else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026833 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026834sed 's/^/| /' conftest.$ac_ext >&5
26835
26836 ac_cv_have_decl_tzname=no
26837fi
26838
26839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026841{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26842echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26843if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026844
26845cat >>confdefs.h <<_ACEOF
26846#define HAVE_DECL_TZNAME 1
26847_ACEOF
26848
26849
26850else
26851 cat >>confdefs.h <<_ACEOF
26852#define HAVE_DECL_TZNAME 0
26853_ACEOF
26854
26855
26856fi
26857
26858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026859 { echo "$as_me:$LINENO: checking for tzname" >&5
26860echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026861if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026862 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026863else
26864 cat >conftest.$ac_ext <<_ACEOF
26865/* confdefs.h. */
26866_ACEOF
26867cat confdefs.h >>conftest.$ac_ext
26868cat >>conftest.$ac_ext <<_ACEOF
26869/* end confdefs.h. */
26870#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026871#if !HAVE_DECL_TZNAME
26872extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026873#endif
26874
26875int
26876main ()
26877{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026878return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026879 ;
26880 return 0;
26881}
26882_ACEOF
26883rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026884if { (ac_try="$ac_link"
26885case "(($ac_try" in
26886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26887 *) ac_try_echo=$ac_try;;
26888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026890 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026891 ac_status=$?
26892 grep -v '^ *+' conftest.er1 >conftest.err
26893 rm -f conftest.er1
26894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026896 (exit $ac_status); } && {
26897 test -z "$ac_c_werror_flag" ||
26898 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026899 } && test -s conftest$ac_exeext &&
26900 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026901 ac_cv_var_tzname=yes
26902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026903 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026904sed 's/^/| /' conftest.$ac_ext >&5
26905
Martin v. Löwiseba40652007-08-30 20:10:57 +000026906 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026908
26909rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026910 conftest$ac_exeext conftest.$ac_ext
26911fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026912{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26913echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026914 if test $ac_cv_var_tzname = yes; then
26915
26916cat >>confdefs.h <<\_ACEOF
26917#define HAVE_TZNAME 1
26918_ACEOF
26919
26920 fi
26921fi
26922
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026923
Martin v. Löwis1d459062005-03-14 21:23:33 +000026924# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026925{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26926echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026927if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026929else
26930
26931if test "$cross_compiling" = yes; then
26932 ac_cv_working_tzset=no
26933else
26934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026935/* confdefs.h. */
26936_ACEOF
26937cat confdefs.h >>conftest.$ac_ext
26938cat >>conftest.$ac_ext <<_ACEOF
26939/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026940
26941#include <stdlib.h>
26942#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026943#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026944
26945#if HAVE_TZNAME
26946extern char *tzname[];
26947#endif
26948
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026949int main()
26950{
Brett Cannon18367812003-09-19 00:59:16 +000026951 /* Note that we need to ensure that not only does tzset(3)
26952 do 'something' with localtime, but it works as documented
26953 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026954 This includes making sure that tzname is set properly if
26955 tm->tm_zone does not exist since it is the alternative way
26956 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026957
26958 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026959 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026960 */
26961
Martin v. Löwis1d459062005-03-14 21:23:33 +000026962 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026963 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26964
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026965 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026966 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026967 if (localtime(&groundhogday)->tm_hour != 0)
26968 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026969#if HAVE_TZNAME
26970 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26971 if (strcmp(tzname[0], "UTC") ||
26972 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26973 exit(1);
26974#endif
Brett Cannon18367812003-09-19 00:59:16 +000026975
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026976 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026977 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026978 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026979 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026980#if HAVE_TZNAME
26981 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26982 exit(1);
26983#endif
Brett Cannon18367812003-09-19 00:59:16 +000026984
26985 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26986 tzset();
26987 if (localtime(&groundhogday)->tm_hour != 11)
26988 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026989#if HAVE_TZNAME
26990 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26991 exit(1);
26992#endif
26993
26994#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026995 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26996 exit(1);
26997 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26998 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026999#endif
Brett Cannon18367812003-09-19 00:59:16 +000027000
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027001 exit(0);
27002}
27003
27004_ACEOF
27005rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027006if { (ac_try="$ac_link"
27007case "(($ac_try" in
27008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27009 *) ac_try_echo=$ac_try;;
27010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027012 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027013 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027015 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027016 { (case "(($ac_try" in
27017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27018 *) ac_try_echo=$ac_try;;
27019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027021 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027024 (exit $ac_status); }; }; then
27025 ac_cv_working_tzset=yes
27026else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027027 echo "$as_me: program exited with status $ac_status" >&5
27028echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027029sed 's/^/| /' conftest.$ac_ext >&5
27030
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027031( exit $ac_status )
27032ac_cv_working_tzset=no
27033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027034rm -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 +000027035fi
27036
Martin v. Löwiseba40652007-08-30 20:10:57 +000027037
27038fi
27039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027040{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27041echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027042if test "$ac_cv_working_tzset" = yes
27043then
27044
27045cat >>confdefs.h <<\_ACEOF
27046#define HAVE_WORKING_TZSET 1
27047_ACEOF
27048
27049fi
27050
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027051# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027052{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27053echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027054if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027055 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027056else
27057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027058/* confdefs.h. */
27059_ACEOF
27060cat confdefs.h >>conftest.$ac_ext
27061cat >>conftest.$ac_ext <<_ACEOF
27062/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027063#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027064int
27065main ()
27066{
27067
27068struct stat st;
27069st.st_mtim.tv_nsec = 1;
27070
27071 ;
27072 return 0;
27073}
27074_ACEOF
27075rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027076if { (ac_try="$ac_compile"
27077case "(($ac_try" in
27078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27079 *) ac_try_echo=$ac_try;;
27080esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027084 grep -v '^ *+' conftest.er1 >conftest.err
27085 rm -f conftest.er1
27086 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027088 (exit $ac_status); } && {
27089 test -z "$ac_c_werror_flag" ||
27090 test ! -s conftest.err
27091 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027092 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027093else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027095sed 's/^/| /' conftest.$ac_ext >&5
27096
Martin v. Löwiseba40652007-08-30 20:10:57 +000027097 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027098fi
27099
Martin v. Löwiseba40652007-08-30 20:10:57 +000027100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27101fi
27102
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027103{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27104echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027105if test "$ac_cv_stat_tv_nsec" = yes
27106then
27107
27108cat >>confdefs.h <<\_ACEOF
27109#define HAVE_STAT_TV_NSEC 1
27110_ACEOF
27111
27112fi
27113
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027114# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027115{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27116echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027117if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027118 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027119else
27120 cat >conftest.$ac_ext <<_ACEOF
27121/* confdefs.h. */
27122_ACEOF
27123cat confdefs.h >>conftest.$ac_ext
27124cat >>conftest.$ac_ext <<_ACEOF
27125/* end confdefs.h. */
27126#include <sys/stat.h>
27127int
27128main ()
27129{
27130
27131struct stat st;
27132st.st_mtimespec.tv_nsec = 1;
27133
27134 ;
27135 return 0;
27136}
27137_ACEOF
27138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027139if { (ac_try="$ac_compile"
27140case "(($ac_try" in
27141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27142 *) ac_try_echo=$ac_try;;
27143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027146 ac_status=$?
27147 grep -v '^ *+' conftest.er1 >conftest.err
27148 rm -f conftest.er1
27149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027151 (exit $ac_status); } && {
27152 test -z "$ac_c_werror_flag" ||
27153 test ! -s conftest.err
27154 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027155 ac_cv_stat_tv_nsec2=yes
27156else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027157 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027158sed 's/^/| /' conftest.$ac_ext >&5
27159
Martin v. Löwiseba40652007-08-30 20:10:57 +000027160 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027161fi
27162
Martin v. Löwiseba40652007-08-30 20:10:57 +000027163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27164fi
27165
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027166{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27167echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027168if test "$ac_cv_stat_tv_nsec2" = yes
27169then
27170
27171cat >>confdefs.h <<\_ACEOF
27172#define HAVE_STAT_TV_NSEC2 1
27173_ACEOF
27174
27175fi
27176
Jack Jansen666b1e72001-10-31 12:11:48 +000027177# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027178{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27179echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027180if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027181 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027182else
Martin v. Löwis11437992002-04-12 09:54:03 +000027183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027184/* confdefs.h. */
27185_ACEOF
27186cat confdefs.h >>conftest.$ac_ext
27187cat >>conftest.$ac_ext <<_ACEOF
27188/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027189#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027190int
27191main ()
27192{
Jack Jansen666b1e72001-10-31 12:11:48 +000027193
27194 int rtn;
27195 rtn = mvwdelch(0,0,0);
27196
Martin v. Löwis11437992002-04-12 09:54:03 +000027197 ;
27198 return 0;
27199}
27200_ACEOF
27201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027202if { (ac_try="$ac_compile"
27203case "(($ac_try" in
27204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27205 *) ac_try_echo=$ac_try;;
27206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027210 grep -v '^ *+' conftest.er1 >conftest.err
27211 rm -f conftest.er1
27212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027214 (exit $ac_status); } && {
27215 test -z "$ac_c_werror_flag" ||
27216 test ! -s conftest.err
27217 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027218 ac_cv_mvwdelch_is_expression=yes
27219else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027221sed 's/^/| /' conftest.$ac_ext >&5
27222
Martin v. Löwiseba40652007-08-30 20:10:57 +000027223 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027224fi
27225
Martin v. Löwiseba40652007-08-30 20:10:57 +000027226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27227fi
27228
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027229{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27230echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027231
27232if test "$ac_cv_mvwdelch_is_expression" = yes
27233then
Martin v. Löwis11437992002-04-12 09:54:03 +000027234
27235cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027236#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027237_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027238
27239fi
27240
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027241{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27242echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027243if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027244 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027245else
Martin v. Löwis11437992002-04-12 09:54:03 +000027246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027247/* confdefs.h. */
27248_ACEOF
27249cat confdefs.h >>conftest.$ac_ext
27250cat >>conftest.$ac_ext <<_ACEOF
27251/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027252#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027253int
27254main ()
27255{
Jack Jansen666b1e72001-10-31 12:11:48 +000027256
27257 WINDOW *w;
27258 w->_flags = 0;
27259
Martin v. Löwis11437992002-04-12 09:54:03 +000027260 ;
27261 return 0;
27262}
27263_ACEOF
27264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027265if { (ac_try="$ac_compile"
27266case "(($ac_try" in
27267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27268 *) ac_try_echo=$ac_try;;
27269esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027273 grep -v '^ *+' conftest.er1 >conftest.err
27274 rm -f conftest.er1
27275 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027277 (exit $ac_status); } && {
27278 test -z "$ac_c_werror_flag" ||
27279 test ! -s conftest.err
27280 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027281 ac_cv_window_has_flags=yes
27282else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027284sed 's/^/| /' conftest.$ac_ext >&5
27285
Martin v. Löwiseba40652007-08-30 20:10:57 +000027286 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027287fi
27288
Martin v. Löwiseba40652007-08-30 20:10:57 +000027289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27290fi
27291
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027292{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27293echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027294
Jack Jansen666b1e72001-10-31 12:11:48 +000027295
27296if test "$ac_cv_window_has_flags" = yes
27297then
Martin v. Löwis11437992002-04-12 09:54:03 +000027298
27299cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027300#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027301_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027302
27303fi
27304
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027305{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27306echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027307cat >conftest.$ac_ext <<_ACEOF
27308/* confdefs.h. */
27309_ACEOF
27310cat confdefs.h >>conftest.$ac_ext
27311cat >>conftest.$ac_ext <<_ACEOF
27312/* end confdefs.h. */
27313#include <curses.h>
27314int
27315main ()
27316{
27317void *x=is_term_resized
27318 ;
27319 return 0;
27320}
27321_ACEOF
27322rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027323if { (ac_try="$ac_compile"
27324case "(($ac_try" in
27325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27326 *) ac_try_echo=$ac_try;;
27327esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027329 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027330 ac_status=$?
27331 grep -v '^ *+' conftest.er1 >conftest.err
27332 rm -f conftest.er1
27333 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027335 (exit $ac_status); } && {
27336 test -z "$ac_c_werror_flag" ||
27337 test ! -s conftest.err
27338 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027339
27340cat >>confdefs.h <<\_ACEOF
27341#define HAVE_CURSES_IS_TERM_RESIZED 1
27342_ACEOF
27343
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027344 { echo "$as_me:$LINENO: result: yes" >&5
27345echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027346else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027347 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027348sed 's/^/| /' conftest.$ac_ext >&5
27349
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027350 { echo "$as_me:$LINENO: result: no" >&5
27351echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027352
27353fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027354
Martin v. Löwiseba40652007-08-30 20:10:57 +000027355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027357{ echo "$as_me:$LINENO: checking for resize_term" >&5
27358echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027359cat >conftest.$ac_ext <<_ACEOF
27360/* confdefs.h. */
27361_ACEOF
27362cat confdefs.h >>conftest.$ac_ext
27363cat >>conftest.$ac_ext <<_ACEOF
27364/* end confdefs.h. */
27365#include <curses.h>
27366int
27367main ()
27368{
27369void *x=resize_term
27370 ;
27371 return 0;
27372}
27373_ACEOF
27374rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027375if { (ac_try="$ac_compile"
27376case "(($ac_try" in
27377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27378 *) ac_try_echo=$ac_try;;
27379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027381 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027382 ac_status=$?
27383 grep -v '^ *+' conftest.er1 >conftest.err
27384 rm -f conftest.er1
27385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027387 (exit $ac_status); } && {
27388 test -z "$ac_c_werror_flag" ||
27389 test ! -s conftest.err
27390 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027391
27392cat >>confdefs.h <<\_ACEOF
27393#define HAVE_CURSES_RESIZE_TERM 1
27394_ACEOF
27395
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027396 { echo "$as_me:$LINENO: result: yes" >&5
27397echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027399 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027400sed 's/^/| /' conftest.$ac_ext >&5
27401
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027402 { echo "$as_me:$LINENO: result: no" >&5
27403echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027404
27405fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027406
Martin v. Löwiseba40652007-08-30 20:10:57 +000027407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27408
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027409{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27410echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027411cat >conftest.$ac_ext <<_ACEOF
27412/* confdefs.h. */
27413_ACEOF
27414cat confdefs.h >>conftest.$ac_ext
27415cat >>conftest.$ac_ext <<_ACEOF
27416/* end confdefs.h. */
27417#include <curses.h>
27418int
27419main ()
27420{
27421void *x=resizeterm
27422 ;
27423 return 0;
27424}
27425_ACEOF
27426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027427if { (ac_try="$ac_compile"
27428case "(($ac_try" in
27429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27430 *) ac_try_echo=$ac_try;;
27431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027433 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027434 ac_status=$?
27435 grep -v '^ *+' conftest.er1 >conftest.err
27436 rm -f conftest.er1
27437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027439 (exit $ac_status); } && {
27440 test -z "$ac_c_werror_flag" ||
27441 test ! -s conftest.err
27442 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027443
27444cat >>confdefs.h <<\_ACEOF
27445#define HAVE_CURSES_RESIZETERM 1
27446_ACEOF
27447
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027448 { echo "$as_me:$LINENO: result: yes" >&5
27449echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027451 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027452sed 's/^/| /' conftest.$ac_ext >&5
27453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027454 { echo "$as_me:$LINENO: result: no" >&5
27455echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027456
27457fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027458
Martin v. Löwiseba40652007-08-30 20:10:57 +000027459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027461{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27462echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027463
27464if test -r /dev/ptmx
27465then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027466 { echo "$as_me:$LINENO: result: yes" >&5
27467echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027468
27469cat >>confdefs.h <<\_ACEOF
27470#define HAVE_DEV_PTMX 1
27471_ACEOF
27472
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027473else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027474 { echo "$as_me:$LINENO: result: no" >&5
27475echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027476fi
27477
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27479echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027480
27481if test -r /dev/ptc
27482then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027483 { echo "$as_me:$LINENO: result: yes" >&5
27484echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027485
27486cat >>confdefs.h <<\_ACEOF
27487#define HAVE_DEV_PTC 1
27488_ACEOF
27489
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027491 { echo "$as_me:$LINENO: result: no" >&5
27492echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027493fi
27494
Mark Dickinson82864d12009-11-15 16:18:58 +000027495if test "$have_long_long" = yes
27496then
27497 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27498echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27499 if test "${ac_cv_have_long_long_format+set}" = set; then
27500 echo $ECHO_N "(cached) $ECHO_C" >&6
27501else
27502 if test "$cross_compiling" = yes; then
27503 ac_cv_have_long_long_format=no
27504else
27505 cat >conftest.$ac_ext <<_ACEOF
27506/* confdefs.h. */
27507_ACEOF
27508cat confdefs.h >>conftest.$ac_ext
27509cat >>conftest.$ac_ext <<_ACEOF
27510/* end confdefs.h. */
27511
27512 #include <stdio.h>
27513 #include <stddef.h>
27514 #include <string.h>
27515
27516 #ifdef HAVE_SYS_TYPES_H
27517 #include <sys/types.h>
27518 #endif
27519
27520 int main()
27521 {
27522 char buffer[256];
27523
27524 if (sprintf(buffer, "%lld", (long long)123) < 0)
27525 return 1;
27526 if (strcmp(buffer, "123"))
27527 return 1;
27528
27529 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27530 return 1;
27531 if (strcmp(buffer, "-123"))
27532 return 1;
27533
27534 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27535 return 1;
27536 if (strcmp(buffer, "123"))
27537 return 1;
27538
27539 return 0;
27540 }
27541
27542_ACEOF
27543rm -f conftest$ac_exeext
27544if { (ac_try="$ac_link"
27545case "(($ac_try" in
27546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27547 *) ac_try_echo=$ac_try;;
27548esac
27549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27550 (eval "$ac_link") 2>&5
27551 ac_status=$?
27552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27554 { (case "(($ac_try" in
27555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27556 *) ac_try_echo=$ac_try;;
27557esac
27558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27559 (eval "$ac_try") 2>&5
27560 ac_status=$?
27561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27562 (exit $ac_status); }; }; then
27563 ac_cv_have_long_long_format=yes
27564else
27565 echo "$as_me: program exited with status $ac_status" >&5
27566echo "$as_me: failed program was:" >&5
27567sed 's/^/| /' conftest.$ac_ext >&5
27568
27569( exit $ac_status )
27570ac_cv_have_long_long_format=no
27571fi
27572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27573fi
27574
27575
27576
27577fi
27578
27579 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27580echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27581fi
27582
Mark Dickinson5ce84742009-12-31 20:48:04 +000027583if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027584then
27585
27586cat >>confdefs.h <<\_ACEOF
27587#define PY_FORMAT_LONG_LONG "ll"
27588_ACEOF
27589
27590fi
27591
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027592if test $ac_sys_system = Darwin
27593then
27594 LIBS="$LIBS -framework CoreFoundation"
27595fi
27596
Mark Dickinson82864d12009-11-15 16:18:58 +000027597
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027598{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27599echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027600if test "${ac_cv_have_size_t_format+set}" = set; then
27601 echo $ECHO_N "(cached) $ECHO_C" >&6
27602else
27603 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027604 ac_cv_have_size_t_format="cross -- assuming yes"
27605
Brett Cannon09d12362006-05-11 05:11:33 +000027606else
27607 cat >conftest.$ac_ext <<_ACEOF
27608/* confdefs.h. */
27609_ACEOF
27610cat confdefs.h >>conftest.$ac_ext
27611cat >>conftest.$ac_ext <<_ACEOF
27612/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027613
Brett Cannon09d12362006-05-11 05:11:33 +000027614#include <stdio.h>
27615#include <stddef.h>
27616#include <string.h>
27617
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027618#ifdef HAVE_SYS_TYPES_H
27619#include <sys/types.h>
27620#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027621
27622#ifdef HAVE_SSIZE_T
27623typedef ssize_t Py_ssize_t;
27624#elif SIZEOF_VOID_P == SIZEOF_LONG
27625typedef long Py_ssize_t;
27626#else
27627typedef int Py_ssize_t;
27628#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027629
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027630int main()
27631{
27632 char buffer[256];
27633
Brett Cannon09d12362006-05-11 05:11:33 +000027634 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27635 return 1;
27636
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027637 if (strcmp(buffer, "123"))
27638 return 1;
27639
27640 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27641 return 1;
27642
27643 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027644 return 1;
27645
27646 return 0;
27647}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027648
Brett Cannon09d12362006-05-11 05:11:33 +000027649_ACEOF
27650rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027651if { (ac_try="$ac_link"
27652case "(($ac_try" in
27653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27654 *) ac_try_echo=$ac_try;;
27655esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027657 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027658 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027661 { (case "(($ac_try" in
27662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27663 *) ac_try_echo=$ac_try;;
27664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027666 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027667 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027669 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027670 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027671else
27672 echo "$as_me: program exited with status $ac_status" >&5
27673echo "$as_me: failed program was:" >&5
27674sed 's/^/| /' conftest.$ac_ext >&5
27675
27676( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027677ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027678fi
27679rm -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 +000027680fi
27681
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027682
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027683fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027684{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27685echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027686if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027687
27688cat >>confdefs.h <<\_ACEOF
27689#define PY_FORMAT_SIZE_T "z"
27690_ACEOF
27691
27692fi
27693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027694{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27695echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027696if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027698else
Martin v. Löwis11437992002-04-12 09:54:03 +000027699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027700/* confdefs.h. */
27701_ACEOF
27702cat confdefs.h >>conftest.$ac_ext
27703cat >>conftest.$ac_ext <<_ACEOF
27704/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027705
27706#ifdef HAVE_SYS_TYPES_H
27707#include <sys/types.h>
27708#endif
27709#ifdef HAVE_SYS_SOCKET_H
27710#include <sys/socket.h>
27711#endif
27712
27713
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027714typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027715int
27716main ()
27717{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027718if ((ac__type_new_ *) 0)
27719 return 0;
27720if (sizeof (ac__type_new_))
27721 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027722 ;
27723 return 0;
27724}
27725_ACEOF
27726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027727if { (ac_try="$ac_compile"
27728case "(($ac_try" in
27729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27730 *) ac_try_echo=$ac_try;;
27731esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027735 grep -v '^ *+' conftest.er1 >conftest.err
27736 rm -f conftest.er1
27737 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027739 (exit $ac_status); } && {
27740 test -z "$ac_c_werror_flag" ||
27741 test ! -s conftest.err
27742 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027743 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027744else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027746sed 's/^/| /' conftest.$ac_ext >&5
27747
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027748 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027750
27751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027752fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027753{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27754echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27755if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027756 :
27757else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027758
Martin v. Löwis01c04012002-11-11 14:58:44 +000027759cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027760#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027761_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027762
27763fi
27764
Michael W. Hudson54241132001-12-07 15:38:26 +000027765
Michael W. Hudson54241132001-12-07 15:38:26 +000027766
27767
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027768for h in `(cd $srcdir;echo Python/thread_*.h)`
27769do
27770 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27771done
27772
Michael W. Hudson54241132001-12-07 15:38:26 +000027773
Neal Norwitzd24499d2005-12-18 21:36:39 +000027774SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027775{ echo "$as_me:$LINENO: checking for build directories" >&5
27776echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027777for dir in $SRCDIRS; do
27778 if test ! -d $dir; then
27779 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027780 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027781done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027782{ echo "$as_me:$LINENO: result: done" >&5
27783echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027784
Guido van Rossum627b2d71993-12-24 10:39:16 +000027785# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027786ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027787
Martin v. Löwis11437992002-04-12 09:54:03 +000027788cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027789# This file is a shell script that caches the results of configure
27790# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027791# scripts and configure runs, see configure's option --config-cache.
27792# It is not useful on other systems. If it contains results you don't
27793# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027794#
Martin v. Löwis11437992002-04-12 09:54:03 +000027795# config.status only pays attention to the cache file if you give it
27796# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027797#
Skip Montanaro6dead952003-09-25 14:50:04 +000027798# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027799# loading this file, other *unset* `ac_cv_foo' will be assigned the
27800# following values.
27801
27802_ACEOF
27803
Guido van Rossumf78abae1997-01-21 22:02:36 +000027804# The following way of writing the cache mishandles newlines in values,
27805# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027806# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027807# Ultrix sh set writes to stderr and can't be redirected directly,
27808# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027809(
27810 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27811 eval ac_val=\$$ac_var
27812 case $ac_val in #(
27813 *${as_nl}*)
27814 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027815 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27816echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027817 esac
27818 case $ac_var in #(
27819 _ | IFS | as_nl) ;; #(
27820 *) $as_unset $ac_var ;;
27821 esac ;;
27822 esac
27823 done
27824
Martin v. Löwis11437992002-04-12 09:54:03 +000027825 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027826 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27827 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027828 # `set' does not quote correctly, so add quotes (double-quote
27829 # substitution turns \\\\ into \\, and sed turns \\ into \).
27830 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027831 "s/'/'\\\\''/g;
27832 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027833 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027834 *)
27835 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027836 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027837 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027838 esac |
27839 sort
27840) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027841 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027844 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027845 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27846 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027847 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27848 :end' >>confcache
27849if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27850 if test -w "$cache_file"; then
27851 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027852 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27853echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027855 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027856 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27857echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027858 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027859fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027860rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027861
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027862test "x$prefix" = xNONE && prefix=$ac_default_prefix
27863# Let make expand exec_prefix.
27864test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027865
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027866DEFS=-DHAVE_CONFIG_H
27867
Skip Montanaro6dead952003-09-25 14:50:04 +000027868ac_libobjs=
27869ac_ltlibobjs=
27870for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27871 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027872 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027873 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027874 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27875 # will be set to the directory where LIBOBJS objects are built.
27876 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27877 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027878done
27879LIBOBJS=$ac_libobjs
27880
27881LTLIBOBJS=$ac_ltlibobjs
27882
27883
Martin v. Löwis11437992002-04-12 09:54:03 +000027884
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027885: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027886ac_clean_files_save=$ac_clean_files
27887ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027888{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27889echo "$as_me: creating $CONFIG_STATUS" >&6;}
27890cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027891#! $SHELL
27892# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027893# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027894# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027895# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027896
Martin v. Löwis11437992002-04-12 09:54:03 +000027897debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027898ac_cs_recheck=false
27899ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027900SHELL=\${CONFIG_SHELL-$SHELL}
27901_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027902
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027903cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027904## --------------------- ##
27905## M4sh Initialization. ##
27906## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027907
Martin v. Löwiseba40652007-08-30 20:10:57 +000027908# Be more Bourne compatible
27909DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027910if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27911 emulate sh
27912 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027913 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027914 # is contrary to our usage. Disable this feature.
27915 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027916 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027917else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027918 case `(set -o) 2>/dev/null` in
27919 *posix*) set -o posix ;;
27920esac
27921
Martin v. Löwis11437992002-04-12 09:54:03 +000027922fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027923
Skip Montanaro6dead952003-09-25 14:50:04 +000027924
Martin v. Löwis11437992002-04-12 09:54:03 +000027925
27926
Martin v. Löwiseba40652007-08-30 20:10:57 +000027927# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027928# Avoid depending upon Character Ranges.
27929as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27930as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27931as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27932as_cr_digits='0123456789'
27933as_cr_alnum=$as_cr_Letters$as_cr_digits
27934
27935# The user is always right.
27936if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027937 echo "#! /bin/sh" >conf$$.sh
27938 echo "exit 0" >>conf$$.sh
27939 chmod +x conf$$.sh
27940 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27941 PATH_SEPARATOR=';'
27942 else
27943 PATH_SEPARATOR=:
27944 fi
27945 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027946fi
27947
Martin v. Löwiseba40652007-08-30 20:10:57 +000027948# Support unset when possible.
27949if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27950 as_unset=unset
27951else
27952 as_unset=false
27953fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027954
Martin v. Löwiseba40652007-08-30 20:10:57 +000027955
27956# IFS
27957# We need space, tab and new line, in precisely that order. Quoting is
27958# there to prevent editors from complaining about space-tab.
27959# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27960# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027961as_nl='
27962'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027963IFS=" "" $as_nl"
27964
27965# Find who we are. Look in the path if we contain no directory separator.
27966case $0 in
27967 *[\\/]* ) as_myself=$0 ;;
27968 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027969for as_dir in $PATH
27970do
27971 IFS=$as_save_IFS
27972 test -z "$as_dir" && as_dir=.
27973 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27974done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027975IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027976
Martin v. Löwiseba40652007-08-30 20:10:57 +000027977 ;;
27978esac
27979# We did not find ourselves, most probably we were run as `sh COMMAND'
27980# in which case we are not to be found in the path.
27981if test "x$as_myself" = x; then
27982 as_myself=$0
27983fi
27984if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027985 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027986 { (exit 1); exit 1; }
27987fi
27988
27989# Work around bugs in pre-3.0 UWIN ksh.
27990for as_var in ENV MAIL MAILPATH
27991do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27992done
27993PS1='$ '
27994PS2='> '
27995PS4='+ '
27996
27997# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027998for as_var in \
27999 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28000 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28001 LC_TELEPHONE LC_TIME
28002do
28003 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28004 eval $as_var=C; export $as_var
28005 else
28006 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28007 fi
28008done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028009
28010# Required to use basename.
28011if expr a : '\(a\)' >/dev/null 2>&1 &&
28012 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28013 as_expr=expr
28014else
28015 as_expr=false
28016fi
28017
28018if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28019 as_basename=basename
28020else
28021 as_basename=false
28022fi
28023
28024
28025# Name of the executable.
28026as_me=`$as_basename -- "$0" ||
28027$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28028 X"$0" : 'X\(//\)$' \| \
28029 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028030echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028031 sed '/^.*\/\([^/][^/]*\)\/*$/{
28032 s//\1/
28033 q
28034 }
28035 /^X\/\(\/\/\)$/{
28036 s//\1/
28037 q
28038 }
28039 /^X\/\(\/\).*/{
28040 s//\1/
28041 q
28042 }
28043 s/.*/./; q'`
28044
28045# CDPATH.
28046$as_unset CDPATH
28047
28048
28049
Martin v. Löwis11437992002-04-12 09:54:03 +000028050 as_lineno_1=$LINENO
28051 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028052 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028053 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028054
Martin v. Löwis11437992002-04-12 09:54:03 +000028055 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28056 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028057 # line-number line after each line using $LINENO; the second 'sed'
28058 # does the real work. The second script uses 'N' to pair each
28059 # line-number line with the line containing $LINENO, and appends
28060 # trailing '-' during substitution so that $LINENO is not a special
28061 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028062 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028063 # scripts with optimization help from Paolo Bonzini. Blame Lee
28064 # E. McMahon (1931-1989) for sed's syntax. :-)
28065 sed -n '
28066 p
28067 /[$]LINENO/=
28068 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028069 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028070 s/[$]LINENO.*/&-/
28071 t lineno
28072 b
28073 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028074 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028075 :loop
28076 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028077 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028078 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028079 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028080 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028081 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028082 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028083
Martin v. Löwis11437992002-04-12 09:54:03 +000028084 # Don't try to exec as it changes $[0], causing all sort of problems
28085 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028086 # original and so on. Autoconf is especially sensitive to this).
28087 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028088 # Exit status is that of the last command.
28089 exit
28090}
28091
28092
Martin v. Löwiseba40652007-08-30 20:10:57 +000028093if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28094 as_dirname=dirname
28095else
28096 as_dirname=false
28097fi
28098
28099ECHO_C= ECHO_N= ECHO_T=
28100case `echo -n x` in
28101-n*)
28102 case `echo 'x\c'` in
28103 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28104 *) ECHO_C='\c';;
28105 esac;;
28106*)
28107 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028109
Martin v. Löwiseba40652007-08-30 20:10:57 +000028110if expr a : '\(a\)' >/dev/null 2>&1 &&
28111 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028112 as_expr=expr
28113else
28114 as_expr=false
28115fi
28116
28117rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028118if test -d conf$$.dir; then
28119 rm -f conf$$.dir/conf$$.file
28120else
28121 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028122 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028124echo >conf$$.file
28125if ln -s conf$$.file conf$$ 2>/dev/null; then
28126 as_ln_s='ln -s'
28127 # ... but there are two gotchas:
28128 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28129 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28130 # In both cases, we have to default to `cp -p'.
28131 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028132 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028133elif ln conf$$.file conf$$ 2>/dev/null; then
28134 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028135else
28136 as_ln_s='cp -p'
28137fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028138rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28139rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028140
Skip Montanaro6dead952003-09-25 14:50:04 +000028141if mkdir -p . 2>/dev/null; then
28142 as_mkdir_p=:
28143else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028144 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028145 as_mkdir_p=false
28146fi
28147
Martin v. Löwiseba40652007-08-30 20:10:57 +000028148if test -x / >/dev/null 2>&1; then
28149 as_test_x='test -x'
28150else
28151 if ls -dL / >/dev/null 2>&1; then
28152 as_ls_L_option=L
28153 else
28154 as_ls_L_option=
28155 fi
28156 as_test_x='
28157 eval sh -c '\''
28158 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028159 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028160 else
28161 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028162 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028163 esac;
28164 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28165 ???[sx]*):;;*)false;;esac;fi
28166 '\'' sh
28167 '
28168fi
28169as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028170
28171# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028172as_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 +000028173
28174# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028175as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028176
28177
Martin v. Löwis11437992002-04-12 09:54:03 +000028178exec 6>&1
28179
Martin v. Löwiseba40652007-08-30 20:10:57 +000028180# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028181# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028182# values after options handling.
28183ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028184This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028185generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028186
28187 CONFIG_FILES = $CONFIG_FILES
28188 CONFIG_HEADERS = $CONFIG_HEADERS
28189 CONFIG_LINKS = $CONFIG_LINKS
28190 CONFIG_COMMANDS = $CONFIG_COMMANDS
28191 $ $0 $@
28192
Martin v. Löwiseba40652007-08-30 20:10:57 +000028193on `(hostname || uname -n) 2>/dev/null | sed 1q`
28194"
28195
Martin v. Löwis11437992002-04-12 09:54:03 +000028196_ACEOF
28197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028198cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028199# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028200config_files="$ac_config_files"
28201config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028202
Martin v. Löwiseba40652007-08-30 20:10:57 +000028203_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028204
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028205cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028206ac_cs_usage="\
28207\`$as_me' instantiates files from templates according to the
28208current configuration.
28209
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028210Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028211
28212 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028213 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028214 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028215 -d, --debug don't remove temporary files
28216 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028217 --file=FILE[:TEMPLATE]
28218 instantiate the configuration file FILE
28219 --header=FILE[:TEMPLATE]
28220 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028221
28222Configuration files:
28223$config_files
28224
28225Configuration headers:
28226$config_headers
28227
28228Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028229
Martin v. Löwiseba40652007-08-30 20:10:57 +000028230_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028231cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028232ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028233python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028234configured by $0, generated by GNU Autoconf 2.61,
28235 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028237Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028238This config.status script is free software; the Free Software Foundation
28239gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028240
28241ac_pwd='$ac_pwd'
28242srcdir='$srcdir'
28243INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028244_ACEOF
28245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028246cat >>$CONFIG_STATUS <<\_ACEOF
28247# If no file are specified by the user, then we need to provide default
28248# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028249ac_need_defaults=:
28250while test $# != 0
28251do
28252 case $1 in
28253 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028254 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28255 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028256 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028257 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028258 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028259 ac_option=$1
28260 ac_optarg=$2
28261 ac_shift=shift
28262 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028263 esac
28264
Skip Montanaro6dead952003-09-25 14:50:04 +000028265 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028266 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028267 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28268 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028269 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028270 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028271 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028272 debug=: ;;
28273 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028274 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028275 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028276 ac_need_defaults=false;;
28277 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028278 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028279 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028280 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028281 --he | --h)
28282 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028283 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028284Try \`$0 --help' for more information." >&2
28285 { (exit 1); exit 1; }; };;
28286 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028287 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028288 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28289 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28290 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028291
28292 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028293 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028294Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028295 { (exit 1); exit 1; }; } ;;
28296
Martin v. Löwiseba40652007-08-30 20:10:57 +000028297 *) ac_config_targets="$ac_config_targets $1"
28298 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028299
28300 esac
28301 shift
28302done
28303
Skip Montanaro6dead952003-09-25 14:50:04 +000028304ac_configure_extra_args=
28305
28306if $ac_cs_silent; then
28307 exec 6>/dev/null
28308 ac_configure_extra_args="$ac_configure_extra_args --silent"
28309fi
28310
28311_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028312cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028313if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028314 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28315 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028316 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028317 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028318fi
28319
Martin v. Löwis11437992002-04-12 09:54:03 +000028320_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028321cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028322exec 5>>config.log
28323{
28324 echo
28325 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28326## Running $as_me. ##
28327_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028328 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028329} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028330
Martin v. Löwiseba40652007-08-30 20:10:57 +000028331_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028332cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028333_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028334
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028335cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028336
28337# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028338for ac_config_target in $ac_config_targets
28339do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028340 case $ac_config_target in
28341 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28342 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28343 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28344 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028345 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28346 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028347 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28348 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028349 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028351 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28352echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028353 { (exit 1); exit 1; }; };;
28354 esac
28355done
28356
Martin v. Löwiseba40652007-08-30 20:10:57 +000028357
Martin v. Löwis11437992002-04-12 09:54:03 +000028358# If the user did not use the arguments to specify the items to instantiate,
28359# then the envvar interface is used. Set only those that are not.
28360# We use the long form for the default assignment because of an extremely
28361# bizarre bug on SunOS 4.1.3.
28362if $ac_need_defaults; then
28363 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28364 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28365fi
28366
Skip Montanaro6dead952003-09-25 14:50:04 +000028367# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028368# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028369# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028370# Hook for its removal unless debugging.
28371# Note that there is a small window in which the directory will not be cleaned:
28372# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028373$debug ||
28374{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028375 tmp=
28376 trap 'exit_status=$?
28377 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28378' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028379 trap '{ (exit 1); exit 1; }' 1 2 13 15
28380}
Martin v. Löwis11437992002-04-12 09:54:03 +000028381# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028382
Martin v. Löwis11437992002-04-12 09:54:03 +000028383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028384 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028385 test -n "$tmp" && test -d "$tmp"
28386} ||
28387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028388 tmp=./conf$$-$RANDOM
28389 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028390} ||
28391{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028392 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028393 { (exit 1); exit 1; }
28394}
28395
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028396#
28397# Set up the sed scripts for CONFIG_FILES section.
28398#
28399
28400# No need to generate the scripts if there are no CONFIG_FILES.
28401# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028402if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028403
28404_ACEOF
28405
Martin v. Löwiseba40652007-08-30 20:10:57 +000028406
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028407
Martin v. Löwiseba40652007-08-30 20:10:57 +000028408ac_delim='%!_!# '
28409for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028410 cat >conf$$subs.sed <<_ACEOF
28411SHELL!$SHELL$ac_delim
28412PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28413PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28414PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28415PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28416PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28417PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28418exec_prefix!$exec_prefix$ac_delim
28419prefix!$prefix$ac_delim
28420program_transform_name!$program_transform_name$ac_delim
28421bindir!$bindir$ac_delim
28422sbindir!$sbindir$ac_delim
28423libexecdir!$libexecdir$ac_delim
28424datarootdir!$datarootdir$ac_delim
28425datadir!$datadir$ac_delim
28426sysconfdir!$sysconfdir$ac_delim
28427sharedstatedir!$sharedstatedir$ac_delim
28428localstatedir!$localstatedir$ac_delim
28429includedir!$includedir$ac_delim
28430oldincludedir!$oldincludedir$ac_delim
28431docdir!$docdir$ac_delim
28432infodir!$infodir$ac_delim
28433htmldir!$htmldir$ac_delim
28434dvidir!$dvidir$ac_delim
28435pdfdir!$pdfdir$ac_delim
28436psdir!$psdir$ac_delim
28437libdir!$libdir$ac_delim
28438localedir!$localedir$ac_delim
28439mandir!$mandir$ac_delim
28440DEFS!$DEFS$ac_delim
28441ECHO_C!$ECHO_C$ac_delim
28442ECHO_N!$ECHO_N$ac_delim
28443ECHO_T!$ECHO_T$ac_delim
28444LIBS!$LIBS$ac_delim
28445build_alias!$build_alias$ac_delim
28446host_alias!$host_alias$ac_delim
28447target_alias!$target_alias$ac_delim
28448VERSION!$VERSION$ac_delim
28449SOVERSION!$SOVERSION$ac_delim
28450CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28451UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28452ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028453LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028454PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28455PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28456PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28457PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28458PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28459FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28460FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28461FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28462FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28463FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28464MACHDEP!$MACHDEP$ac_delim
28465SGI_ABI!$SGI_ABI$ac_delim
28466EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28467EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28468CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28469EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28470CC!$CC$ac_delim
28471CFLAGS!$CFLAGS$ac_delim
28472LDFLAGS!$LDFLAGS$ac_delim
28473CPPFLAGS!$CPPFLAGS$ac_delim
28474ac_ct_CC!$ac_ct_CC$ac_delim
28475EXEEXT!$EXEEXT$ac_delim
28476OBJEXT!$OBJEXT$ac_delim
28477CXX!$CXX$ac_delim
28478MAINCC!$MAINCC$ac_delim
28479CPP!$CPP$ac_delim
28480GREP!$GREP$ac_delim
28481EGREP!$EGREP$ac_delim
28482BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28483LIBRARY!$LIBRARY$ac_delim
28484LDLIBRARY!$LDLIBRARY$ac_delim
28485DLLLIBRARY!$DLLLIBRARY$ac_delim
28486BLDLIBRARY!$BLDLIBRARY$ac_delim
28487LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28488INSTSONAME!$INSTSONAME$ac_delim
28489RUNSHARED!$RUNSHARED$ac_delim
28490LINKCC!$LINKCC$ac_delim
28491GNULD!$GNULD$ac_delim
28492RANLIB!$RANLIB$ac_delim
28493AR!$AR$ac_delim
28494ARFLAGS!$ARFLAGS$ac_delim
28495SVNVERSION!$SVNVERSION$ac_delim
28496INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28497INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28498INSTALL_DATA!$INSTALL_DATA$ac_delim
28499LN!$LN$ac_delim
28500OPT!$OPT$ac_delim
28501BASECFLAGS!$BASECFLAGS$ac_delim
28502UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28503OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28504LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28505SO!$SO$ac_delim
28506LDSHARED!$LDSHARED$ac_delim
28507BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028508_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028509
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028510 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 +000028511 break
28512 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028513 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28514echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028515 { (exit 1); exit 1; }; }
28516 else
28517 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028518 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028519done
28520
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028521ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28522if test -n "$ac_eof"; then
28523 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28524 ac_eof=`expr $ac_eof + 1`
28525fi
28526
28527cat >>$CONFIG_STATUS <<_ACEOF
28528cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28529/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028530_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028531sed '
28532s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28533s/^/s,@/; s/!/@,|#_!!_#|/
28534:n
28535t n
28536s/'"$ac_delim"'$/,g/; t
28537s/$/\\/; p
28538N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28539' >>$CONFIG_STATUS <conf$$subs.sed
28540rm -f conf$$subs.sed
28541cat >>$CONFIG_STATUS <<_ACEOF
28542CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028543_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028544
28545
28546ac_delim='%!_!# '
28547for ac_last_try in false false false false false :; do
28548 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028549CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028550LINKFORSHARED!$LINKFORSHARED$ac_delim
28551CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28552SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028553PKG_CONFIG!$PKG_CONFIG$ac_delim
28554LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028555USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28556SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28557USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28558LDLAST!$LDLAST$ac_delim
28559THREADOBJ!$THREADOBJ$ac_delim
28560DLINCLDIR!$DLINCLDIR$ac_delim
28561DYNLOADFILE!$DYNLOADFILE$ac_delim
28562MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28563TRUE!$TRUE$ac_delim
28564LIBOBJS!$LIBOBJS$ac_delim
28565HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28566HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28567HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28568HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28569HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28570LIBM!$LIBM$ac_delim
28571LIBC!$LIBC$ac_delim
28572UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28573THREADHEADERS!$THREADHEADERS$ac_delim
28574SRCDIRS!$SRCDIRS$ac_delim
28575LTLIBOBJS!$LTLIBOBJS$ac_delim
28576_ACEOF
28577
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028578 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028579 break
28580 elif $ac_last_try; then
28581 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28582echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028583 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028584 else
28585 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28586 fi
28587done
28588
28589ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28590if test -n "$ac_eof"; then
28591 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28592 ac_eof=`expr $ac_eof + 1`
28593fi
28594
28595cat >>$CONFIG_STATUS <<_ACEOF
28596cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028598_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028599sed '
28600s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28601s/^/s,@/; s/!/@,|#_!!_#|/
28602:n
28603t n
28604s/'"$ac_delim"'$/,g/; t
28605s/$/\\/; p
28606N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28607' >>$CONFIG_STATUS <conf$$subs.sed
28608rm -f conf$$subs.sed
28609cat >>$CONFIG_STATUS <<_ACEOF
28610:end
28611s/|#_!!_#|//g
28612CEOF$ac_eof
28613_ACEOF
28614
Martin v. Löwiseba40652007-08-30 20:10:57 +000028615
28616# VPATH may cause trouble with some makes, so we remove $(srcdir),
28617# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28618# trailing colons and then remove the whole line if VPATH becomes empty
28619# (actually we leave an empty line to preserve line numbers).
28620if test "x$srcdir" = x.; then
28621 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28622s/:*\$(srcdir):*/:/
28623s/:*\${srcdir}:*/:/
28624s/:*@srcdir@:*/:/
28625s/^\([^=]*=[ ]*\):*/\1/
28626s/:*$//
28627s/^[^=]*=[ ]*$//
28628}'
28629fi
28630
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028631cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028632fi # test -n "$CONFIG_FILES"
28633
Martin v. Löwiseba40652007-08-30 20:10:57 +000028634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028635for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028636do
28637 case $ac_tag in
28638 :[FHLC]) ac_mode=$ac_tag; continue;;
28639 esac
28640 case $ac_mode$ac_tag in
28641 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028642 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28643echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028644 { (exit 1); exit 1; }; };;
28645 :[FH]-) ac_tag=-:-;;
28646 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28647 esac
28648 ac_save_IFS=$IFS
28649 IFS=:
28650 set x $ac_tag
28651 IFS=$ac_save_IFS
28652 shift
28653 ac_file=$1
28654 shift
28655
28656 case $ac_mode in
28657 :L) ac_source=$1;;
28658 :[FH])
28659 ac_file_inputs=
28660 for ac_f
28661 do
28662 case $ac_f in
28663 -) ac_f="$tmp/stdin";;
28664 *) # Look for the file first in the build tree, then in the source tree
28665 # (if the path is not absolute). The absolute path cannot be DOS-style,
28666 # because $ac_f cannot contain `:'.
28667 test -f "$ac_f" ||
28668 case $ac_f in
28669 [\\/$]*) false;;
28670 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28671 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028672 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28673echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028674 { (exit 1); exit 1; }; };;
28675 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028676 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028677 done
28678
28679 # Let's still pretend it is `configure' which instantiates (i.e., don't
28680 # use $as_me), people would be surprised to read:
28681 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028682 configure_input="Generated from "`IFS=:
28683 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028684 if test x"$ac_file" != x-; then
28685 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028686 { echo "$as_me:$LINENO: creating $ac_file" >&5
28687echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028688 fi
28689
28690 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028691 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028692 esac
28693 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028694 esac
28695
Martin v. Löwiseba40652007-08-30 20:10:57 +000028696 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028697$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028698 X"$ac_file" : 'X\(//\)[^/]' \| \
28699 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028700 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028701echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28703 s//\1/
28704 q
28705 }
28706 /^X\(\/\/\)[^/].*/{
28707 s//\1/
28708 q
28709 }
28710 /^X\(\/\/\)$/{
28711 s//\1/
28712 q
28713 }
28714 /^X\(\/\).*/{
28715 s//\1/
28716 q
28717 }
28718 s/.*/./; q'`
28719 { as_dir="$ac_dir"
28720 case $as_dir in #(
28721 -*) as_dir=./$as_dir;;
28722 esac
28723 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028724 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028725 while :; do
28726 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028727 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028728 *) as_qdir=$as_dir;;
28729 esac
28730 as_dirs="'$as_qdir' $as_dirs"
28731 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028732$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028733 X"$as_dir" : 'X\(//\)[^/]' \| \
28734 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028735 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028736echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028737 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28738 s//\1/
28739 q
28740 }
28741 /^X\(\/\/\)[^/].*/{
28742 s//\1/
28743 q
28744 }
28745 /^X\(\/\/\)$/{
28746 s//\1/
28747 q
28748 }
28749 /^X\(\/\).*/{
28750 s//\1/
28751 q
28752 }
28753 s/.*/./; q'`
28754 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028755 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028756 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028757 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28758echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028759 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028760 ac_builddir=.
28761
Martin v. Löwiseba40652007-08-30 20:10:57 +000028762case "$ac_dir" in
28763.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28764*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028765 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028766 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028767 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028768 case $ac_top_builddir_sub in
28769 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28770 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28771 esac ;;
28772esac
28773ac_abs_top_builddir=$ac_pwd
28774ac_abs_builddir=$ac_pwd$ac_dir_suffix
28775# for backward compatibility:
28776ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028777
28778case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028779 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028780 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028781 ac_top_srcdir=$ac_top_builddir_sub
28782 ac_abs_top_srcdir=$ac_pwd ;;
28783 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028784 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028785 ac_top_srcdir=$srcdir
28786 ac_abs_top_srcdir=$srcdir ;;
28787 *) # Relative name.
28788 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28789 ac_top_srcdir=$ac_top_build_prefix$srcdir
28790 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028791esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028792ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028793
Martin v. Löwis11437992002-04-12 09:54:03 +000028794
Martin v. Löwiseba40652007-08-30 20:10:57 +000028795 case $ac_mode in
28796 :F)
28797 #
28798 # CONFIG_FILE
28799 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028800
28801 case $INSTALL in
28802 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028803 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028804 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028805_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028806
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028807cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028808# If the template does not know about datarootdir, expand it.
28809# FIXME: This hack should be removed a few years after 2.60.
28810ac_datarootdir_hack=; ac_datarootdir_seen=
28811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028812case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028813 p
28814 q
28815}
28816/@datadir@/p
28817/@docdir@/p
28818/@infodir@/p
28819/@localedir@/p
28820/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028821' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028822*datarootdir*) ac_datarootdir_seen=yes;;
28823*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028824 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28825echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028826_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028827cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028828 ac_datarootdir_hack='
28829 s&@datadir@&$datadir&g
28830 s&@docdir@&$docdir&g
28831 s&@infodir@&$infodir&g
28832 s&@localedir@&$localedir&g
28833 s&@mandir@&$mandir&g
28834 s&\\\${datarootdir}&$datarootdir&g' ;;
28835esac
28836_ACEOF
28837
28838# Neutralize VPATH when `$srcdir' = `.'.
28839# Shell code in configure.ac might set extrasub.
28840# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028841cat >>$CONFIG_STATUS <<_ACEOF
28842 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028843$extrasub
28844_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028845cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028846:t
28847/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028848s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028849s&@top_builddir@&$ac_top_builddir_sub&;t t
28850s&@srcdir@&$ac_srcdir&;t t
28851s&@abs_srcdir@&$ac_abs_srcdir&;t t
28852s&@top_srcdir@&$ac_top_srcdir&;t t
28853s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28854s&@builddir@&$ac_builddir&;t t
28855s&@abs_builddir@&$ac_abs_builddir&;t t
28856s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28857s&@INSTALL@&$ac_INSTALL&;t t
28858$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028859" $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 +000028860
Martin v. Löwiseba40652007-08-30 20:10:57 +000028861test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28862 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28863 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028864 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028865which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028866echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028867which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028868
Martin v. Löwiseba40652007-08-30 20:10:57 +000028869 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028870 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028871 -) cat "$tmp/out"; rm -f "$tmp/out";;
28872 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28873 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028874 ;;
28875 :H)
28876 #
28877 # CONFIG_HEADER
28878 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028879_ACEOF
28880
28881# Transform confdefs.h into a sed script `conftest.defines', that
28882# substitutes the proper values into config.h.in to produce config.h.
28883rm -f conftest.defines conftest.tail
28884# First, append a space to every undef/define line, to ease matching.
28885echo 's/$/ /' >conftest.defines
28886# Then, protect against being on the right side of a sed subst, or in
28887# an unquoted here document, in config.status. If some macros were
28888# called several times there might be several #defines for the same
28889# symbol, which is useless. But do not sort them, since the last
28890# AC_DEFINE must be honored.
28891ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28892# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28893# NAME is the cpp macro being defined, VALUE is the value it is being given.
28894# PARAMS is the parameter list in the macro definition--in most cases, it's
28895# just an empty string.
28896ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28897ac_dB='\\)[ (].*,\\1define\\2'
28898ac_dC=' '
28899ac_dD=' ,'
28900
28901uniq confdefs.h |
28902 sed -n '
28903 t rset
28904 :rset
28905 s/^[ ]*#[ ]*define[ ][ ]*//
28906 t ok
28907 d
28908 :ok
28909 s/[\\&,]/\\&/g
28910 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28911 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28912 ' >>conftest.defines
28913
28914# Remove the space that was appended to ease matching.
28915# Then replace #undef with comments. This is necessary, for
28916# example, in the case of _POSIX_SOURCE, which is predefined and required
28917# on some systems where configure will not decide to define it.
28918# (The regexp can be short, since the line contains either #define or #undef.)
28919echo 's/ $//
28920s,^[ #]*u.*,/* & */,' >>conftest.defines
28921
28922# Break up conftest.defines:
28923ac_max_sed_lines=50
28924
28925# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28926# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28927# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28928# et cetera.
28929ac_in='$ac_file_inputs'
28930ac_out='"$tmp/out1"'
28931ac_nxt='"$tmp/out2"'
28932
28933while :
28934do
28935 # Write a here document:
28936 cat >>$CONFIG_STATUS <<_ACEOF
28937 # First, check the format of the line:
28938 cat >"\$tmp/defines.sed" <<\\CEOF
28939/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28940/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28941b
28942:def
28943_ACEOF
28944 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28945 echo 'CEOF
28946 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28947 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28948 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28949 grep . conftest.tail >/dev/null || break
28950 rm -f conftest.defines
28951 mv conftest.tail conftest.defines
28952done
28953rm -f conftest.defines conftest.tail
28954
28955echo "ac_result=$ac_in" >>$CONFIG_STATUS
28956cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028957 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028958 echo "/* $configure_input */" >"$tmp/config.h"
28959 cat "$ac_result" >>"$tmp/config.h"
28960 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28961 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28962echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028963 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028964 rm -f $ac_file
28965 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028966 fi
28967 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028968 echo "/* $configure_input */"
28969 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028970 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028971 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028972 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028973
Martin v. Löwiseba40652007-08-30 20:10:57 +000028974
28975 esac
28976
28977done # for ac_tag
28978
Guido van Rossum627b2d71993-12-24 10:39:16 +000028979
Martin v. Löwis11437992002-04-12 09:54:03 +000028980{ (exit 0); exit 0; }
28981_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028982chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028983ac_clean_files=$ac_clean_files_save
28984
28985
28986# configure is writing to config.log, and then calls config.status.
28987# config.status does its own redirection, appending to config.log.
28988# Unfortunately, on DOS this fails, as config.log is still kept open
28989# by configure, so config.status won't be able to write to it; its
28990# output is simply discarded. So we exec the FD to /dev/null,
28991# effectively closing config.log, so it can be properly (re)opened and
28992# appended to by config.status. When coming back to configure, we
28993# need to make the FD available again.
28994if test "$no_create" != yes; then
28995 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028996 ac_config_status_args=
28997 test "$silent" = yes &&
28998 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028999 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029000 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029001 exec 5>>config.log
29002 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29003 # would make configure fail if this is the last instruction.
29004 $ac_cs_success || { (exit 1); exit 1; }
29005fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029006
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029007
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029008echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029009if test ! -f Modules/Setup
29010then
29011 cp $srcdir/Modules/Setup.dist Modules/Setup
29012fi
29013
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029014echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029015if test ! -f Modules/Setup.local
29016then
29017 echo "# Edit this file for local setup changes" >Modules/Setup.local
29018fi
29019
29020echo "creating Makefile"
29021$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29022 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029023 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029024
29025case $ac_sys_system in
29026BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029027 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029028
29029 Support for BeOS is deprecated as of Python 2.6.
29030 See PEP 11 for the gory details.
29031 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029032echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029033
29034 Support for BeOS is deprecated as of Python 2.6.
29035 See PEP 11 for the gory details.
29036 " >&2;}
29037 ;;
29038*) ;;
29039esac
29040
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029041mv config.c Modules