blob: 8ca3fe0b1a7f30d281096eb0441446aeb39f005e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson3b2abe92010-03-14 15:06:14 +00002# From configure.in Revision: 78962 .
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
Benjamin Peterson32810672010-03-09 21:43:36 +00004599if test "${OPT-unset}" == "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004600then
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
Benjamin Peterson3b2abe92010-03-14 15:06:14 +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 Petersone9e07bf2010-03-09 21:46:54 +000015613if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015614 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15615set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15616{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15617echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15618if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15619 echo $ECHO_N "(cached) $ECHO_C" >&6
15620else
15621 case $PKG_CONFIG in
15622 [\\/]* | ?:[\\/]*)
15623 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15624 ;;
15625 *)
15626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15627for as_dir in $PATH
15628do
15629 IFS=$as_save_IFS
15630 test -z "$as_dir" && as_dir=.
15631 for ac_exec_ext in '' $ac_executable_extensions; do
15632 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15633 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15634 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15635 break 2
15636 fi
15637done
15638done
15639IFS=$as_save_IFS
15640
15641 ;;
15642esac
15643fi
15644PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15645if test -n "$PKG_CONFIG"; then
15646 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15647echo "${ECHO_T}$PKG_CONFIG" >&6; }
15648else
15649 { echo "$as_me:$LINENO: result: no" >&5
15650echo "${ECHO_T}no" >&6; }
15651fi
15652
15653
15654fi
15655if test -z "$ac_cv_path_PKG_CONFIG"; then
15656 ac_pt_PKG_CONFIG=$PKG_CONFIG
15657 # Extract the first word of "pkg-config", so it can be a program name with args.
15658set dummy pkg-config; ac_word=$2
15659{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15660echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15661if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15662 echo $ECHO_N "(cached) $ECHO_C" >&6
15663else
15664 case $ac_pt_PKG_CONFIG in
15665 [\\/]* | ?:[\\/]*)
15666 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15667 ;;
15668 *)
15669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15670for as_dir in $PATH
15671do
15672 IFS=$as_save_IFS
15673 test -z "$as_dir" && as_dir=.
15674 for ac_exec_ext in '' $ac_executable_extensions; do
15675 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15676 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15677 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15678 break 2
15679 fi
15680done
15681done
15682IFS=$as_save_IFS
15683
15684 ;;
15685esac
15686fi
15687ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15688if test -n "$ac_pt_PKG_CONFIG"; then
15689 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15690echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15691else
15692 { echo "$as_me:$LINENO: result: no" >&5
15693echo "${ECHO_T}no" >&6; }
15694fi
15695
15696 if test "x$ac_pt_PKG_CONFIG" = x; then
15697 PKG_CONFIG=""
15698 else
15699 case $cross_compiling:$ac_tool_warned in
15700yes:)
15701{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15702whose name does not start with the host triplet. If you think this
15703configuration is useful to you, please write to autoconf@gnu.org." >&5
15704echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15705whose name does not start with the host triplet. If you think this
15706configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15707ac_tool_warned=yes ;;
15708esac
15709 PKG_CONFIG=$ac_pt_PKG_CONFIG
15710 fi
15711else
15712 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15713fi
15714
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015715
15716# Check for use of the system expat library
15717{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15718echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15719
15720# Check whether --with-system_expat was given.
15721if test "${with_system_expat+set}" = set; then
15722 withval=$with_system_expat;
15723fi
15724
15725
15726{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15727echo "${ECHO_T}$with_system_expat" >&6; }
15728
15729# Check for use of the system libffi library
15730{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15731echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15732
15733# Check whether --with-system_ffi was given.
15734if test "${with_system_ffi+set}" = set; then
15735 withval=$with_system_ffi;
15736fi
15737
15738
15739if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015740 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15741else
15742 LIBFFI_INCLUDEDIR=""
15743fi
15744
15745
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015746{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15747echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015748
Benjamin Peterson867475c2009-04-29 20:36:25 +000015749# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015750{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15751echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015752
15753# Check whether --with-dbmliborder was given.
15754if test "${with_dbmliborder+set}" = set; then
15755 withval=$with_dbmliborder;
15756if test x$with_dbmliborder = xyes
15757then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015758{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15759echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015760 { (exit 1); exit 1; }; }
15761else
15762 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15763 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15764 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015765 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15766echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015767 { (exit 1); exit 1; }; }
15768 fi
15769 done
15770fi
15771fi
15772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015773{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15774echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015775
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015776# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015777
15778
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015779{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15780echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015781
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015783if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015784 withval=$with_signal_module;
15785fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015786
15787
15788if test -z "$with_signal_module"
15789then with_signal_module="yes"
15790fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015791{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15792echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015793
15794if test "${with_signal_module}" = "yes"; then
15795 USE_SIGNAL_MODULE=""
15796 SIGNAL_OBJS=""
15797else
15798 USE_SIGNAL_MODULE="#"
15799 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15800fi
15801
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015802# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015803
Barry Warsawc0d24d82000-06-29 16:12:00 +000015804USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015805
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015806{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15807echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
Guido van Rossumec2f0731997-01-22 20:54:01 +000015809
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015811if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015812 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015813{ echo "$as_me:$LINENO: result: $withval" >&5
15814echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015815LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015816if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015817 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015818fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015820 { echo "$as_me:$LINENO: result: no" >&5
15821echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015822fi
15823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
15825# Templates for things AC_DEFINEd more than once.
15826# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015827
15828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830
15831
15832
15833
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015834{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15835echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015838if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839 withval=$with_threads;
15840fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015841
15842
Barry Warsawc0d24d82000-06-29 16:12:00 +000015843# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015846if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015847 withval=$with_thread; with_threads=$with_thread
15848fi
15849
Barry Warsawc0d24d82000-06-29 16:12:00 +000015850
15851if test -z "$with_threads"
15852then with_threads="yes"
15853fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015854{ echo "$as_me:$LINENO: result: $with_threads" >&5
15855echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015856
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015857
Barry Warsawc0d24d82000-06-29 16:12:00 +000015858if test "$with_threads" = "no"
15859then
15860 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015861elif test "$ac_cv_pthread_is_default" = yes
15862then
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015864#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015865_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015866
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015867 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015869#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015871
15872 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015874elif test "$ac_cv_kpthread" = "yes"
15875then
15876 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015877 if test "$ac_cv_cxx_thread" = "yes"; then
15878 CXX="$CXX -Kpthread"
15879 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015881#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015882_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015884 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015885 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015886elif test "$ac_cv_kthread" = "yes"
15887then
15888 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015889 if test "$ac_cv_cxx_thread" = "yes"; then
15890 CXX="$CXX -Kthread"
15891 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015892 cat >>confdefs.h <<\_ACEOF
15893#define WITH_THREAD 1
15894_ACEOF
15895
15896 posix_threads=yes
15897 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015898elif test "$ac_cv_pthread" = "yes"
15899then
15900 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015901 if test "$ac_cv_cxx_thread" = "yes"; then
15902 CXX="$CXX -pthread"
15903 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015904 cat >>confdefs.h <<\_ACEOF
15905#define WITH_THREAD 1
15906_ACEOF
15907
15908 posix_threads=yes
15909 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015910else
15911 if test ! -z "$with_threads" -a -d "$with_threads"
15912 then LDFLAGS="$LDFLAGS -L$with_threads"
15913 fi
15914 if test ! -z "$withval" -a -d "$withval"
15915 then LDFLAGS="$LDFLAGS -L$withval"
15916 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015917
15918 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015919 # define _POSIX_THREADS in unistd.h. Some apparently don't
15920 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015921 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15922echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015924/* confdefs.h. */
15925_ACEOF
15926cat confdefs.h >>conftest.$ac_ext
15927cat >>conftest.$ac_ext <<_ACEOF
15928/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015929
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015930#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015931#ifdef _POSIX_THREADS
15932yes
15933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015934
15935_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015937 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015938 unistd_defines_pthreads=yes
15939else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015940 unistd_defines_pthreads=no
15941fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000015942rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015944 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15945echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015946
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015948#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015949_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015952 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15953echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015954if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015956fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015957{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15958echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015959else
Martin v. Löwis11437992002-04-12 09:54:03 +000015960 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015961{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15962echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015964/* confdefs.h. */
15965_ACEOF
15966cat confdefs.h >>conftest.$ac_ext
15967cat >>conftest.$ac_ext <<_ACEOF
15968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015969$ac_includes_default
15970#include <cthreads.h>
15971_ACEOF
15972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015973if { (ac_try="$ac_compile"
15974case "(($ac_try" in
15975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15976 *) ac_try_echo=$ac_try;;
15977esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015981 grep -v '^ *+' conftest.er1 >conftest.err
15982 rm -f conftest.er1
15983 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015985 (exit $ac_status); } && {
15986 test -z "$ac_c_werror_flag" ||
15987 test ! -s conftest.err
15988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015989 ac_header_compiler=yes
15990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015992sed 's/^/| /' conftest.$ac_ext >&5
15993
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015996
15997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15999echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016000
16001# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016002{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16003echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016004cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016010#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016011_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016012if { (ac_try="$ac_cpp conftest.$ac_ext"
16013case "(($ac_try" in
16014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16015 *) ac_try_echo=$ac_try;;
16016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016018 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016020 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 rm -f conftest.er1
16022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016024 (exit $ac_status); } >/dev/null && {
16025 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16026 test ! -s conftest.err
16027 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 ac_header_preproc=yes
16029else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016031sed 's/^/| /' conftest.$ac_ext >&5
16032
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16038echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016039
16040# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16042 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016043 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16044echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16045 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16046echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016047 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016048 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016049 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016050 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16051echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16052 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16053echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16054 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16055echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16056 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16057echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16058 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16059echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16060 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16061echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016062 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016063## -------------------------------------- ##
16064## Report this to http://bugs.python.org/ ##
16065## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016066_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016067 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016068 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016070{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16071echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016072if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016073 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016074else
16075 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016077{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16078echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016079
16080fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016081if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016083#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016084_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016085
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016087#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016088_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090
16091cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016092#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016094
16095 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016096 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016097else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016098
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016100 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16101echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016102if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016103 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016104fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016105{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16106echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016107else
Martin v. Löwis11437992002-04-12 09:54:03 +000016108 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016109{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16110echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016112/* confdefs.h. */
16113_ACEOF
16114cat confdefs.h >>conftest.$ac_ext
16115cat >>conftest.$ac_ext <<_ACEOF
16116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016117$ac_includes_default
16118#include <mach/cthreads.h>
16119_ACEOF
16120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121if { (ac_try="$ac_compile"
16122case "(($ac_try" in
16123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16124 *) ac_try_echo=$ac_try;;
16125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016129 grep -v '^ *+' conftest.er1 >conftest.err
16130 rm -f conftest.er1
16131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016133 (exit $ac_status); } && {
16134 test -z "$ac_c_werror_flag" ||
16135 test ! -s conftest.err
16136 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 ac_header_compiler=yes
16138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016140sed 's/^/| /' conftest.$ac_ext >&5
16141
Martin v. Löwiseba40652007-08-30 20:10:57 +000016142 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144
16145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016146{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16147echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
16149# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016150{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16151echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016152cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016153/* confdefs.h. */
16154_ACEOF
16155cat confdefs.h >>conftest.$ac_ext
16156cat >>conftest.$ac_ext <<_ACEOF
16157/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016158#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016159_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160if { (ac_try="$ac_cpp conftest.$ac_ext"
16161case "(($ac_try" in
16162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16163 *) ac_try_echo=$ac_try;;
16164esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016168 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016169 rm -f conftest.er1
16170 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 (exit $ac_status); } >/dev/null && {
16173 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16174 test ! -s conftest.err
16175 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 ac_header_preproc=yes
16177else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016178 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016179sed 's/^/| /' conftest.$ac_ext >&5
16180
Martin v. Löwis11437992002-04-12 09:54:03 +000016181 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016183
Martin v. Löwis11437992002-04-12 09:54:03 +000016184rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016185{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16186echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016187
16188# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016189case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16190 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016191 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16192echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16193 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16194echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016196 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016197 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016198 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16199echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16200 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16201echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16202 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16203echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16204 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16205echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16206 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16207echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16208 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16209echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016211## -------------------------------------- ##
16212## Report this to http://bugs.python.org/ ##
16213## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016214_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016216 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016217esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016218{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16219echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016220if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016221 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016222else
16223 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016224fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016225{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16226echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
16228fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016229if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016231#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016232_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016233
Martin v. Löwis11437992002-04-12 09:54:03 +000016234 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016235#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016236_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016237
Martin v. Löwis11437992002-04-12 09:54:03 +000016238
16239cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016240#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016241_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016242
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016243 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016244else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016246 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16247echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016248
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016250if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016251 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16252echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016253 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016254#define WITH_THREAD 1
16255_ACEOF
16256
16257
16258cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016259#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016260_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016261
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016262 LIBS="-lpth $LIBS"
16263 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016264else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016265 { echo "$as_me:$LINENO: result: no" >&5
16266echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016267
16268 # Just looking for pthread_create in libpthread is not enough:
16269 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16270 # So we really have to include pthread.h, and then link.
16271 _libs=$LIBS
16272 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016273 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16274echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016276/* confdefs.h. */
16277_ACEOF
16278cat confdefs.h >>conftest.$ac_ext
16279cat >>conftest.$ac_ext <<_ACEOF
16280/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016281#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016282
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016283void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016284int
16285main ()
16286{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016287
16288pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 ;
16290 return 0;
16291}
16292_ACEOF
16293rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016294if { (ac_try="$ac_link"
16295case "(($ac_try" in
16296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16297 *) ac_try_echo=$ac_try;;
16298esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016302 grep -v '^ *+' conftest.er1 >conftest.err
16303 rm -f conftest.er1
16304 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306 (exit $ac_status); } && {
16307 test -z "$ac_c_werror_flag" ||
16308 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016309 } && test -s conftest$ac_exeext &&
16310 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016312 { echo "$as_me:$LINENO: result: yes" >&5
16313echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016315#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016316_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016317
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016318 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016319 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016320else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016322sed 's/^/| /' conftest.$ac_ext >&5
16323
Martin v. Löwis11437992002-04-12 09:54:03 +000016324
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016325 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016326 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16327echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016328if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016330else
Martin v. Löwis11437992002-04-12 09:54:03 +000016331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016332/* confdefs.h. */
16333_ACEOF
16334cat confdefs.h >>conftest.$ac_ext
16335cat >>conftest.$ac_ext <<_ACEOF
16336/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016337/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16338 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16339#define pthread_detach innocuous_pthread_detach
16340
Guido van Rossumad678af1998-10-02 14:42:15 +000016341/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016342 which can conflict with char pthread_detach (); below.
16343 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016344 <limits.h> exists even on freestanding compilers. */
16345
16346#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016347# include <limits.h>
16348#else
16349# include <assert.h>
16350#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016351
16352#undef pthread_detach
16353
Martin v. Löwiseba40652007-08-30 20:10:57 +000016354/* Override any GCC internal prototype to avoid an error.
16355 Use char because int might match the return type of a GCC
16356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016357#ifdef __cplusplus
16358extern "C"
16359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016360char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016361/* The GNU C library defines this for functions which it implements
16362 to always fail with ENOSYS. Some functions are actually named
16363 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016365choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016366#endif
16367
Skip Montanaro6dead952003-09-25 14:50:04 +000016368int
16369main ()
16370{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016371return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 ;
16373 return 0;
16374}
16375_ACEOF
16376rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377if { (ac_try="$ac_link"
16378case "(($ac_try" in
16379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16380 *) ac_try_echo=$ac_try;;
16381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016383 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016385 grep -v '^ *+' conftest.er1 >conftest.err
16386 rm -f conftest.er1
16387 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016389 (exit $ac_status); } && {
16390 test -z "$ac_c_werror_flag" ||
16391 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016392 } && test -s conftest$ac_exeext &&
16393 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016395else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016397sed 's/^/| /' conftest.$ac_ext >&5
16398
Martin v. Löwiseba40652007-08-30 20:10:57 +000016399 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016401
16402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016403 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016404fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016405{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16406echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16407if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016409#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016410_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016411
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016412 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016413 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016414else
Guido van Rossumad678af1998-10-02 14:42:15 +000016415
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016416 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016417 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16418echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016419if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016421fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016422{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16423echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016424else
16425 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016426{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16427echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016429/* confdefs.h. */
16430_ACEOF
16431cat confdefs.h >>conftest.$ac_ext
16432cat >>conftest.$ac_ext <<_ACEOF
16433/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016434$ac_includes_default
16435#include <atheos/threads.h>
16436_ACEOF
16437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016438if { (ac_try="$ac_compile"
16439case "(($ac_try" in
16440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16441 *) ac_try_echo=$ac_try;;
16442esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016446 grep -v '^ *+' conftest.er1 >conftest.err
16447 rm -f conftest.er1
16448 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016450 (exit $ac_status); } && {
16451 test -z "$ac_c_werror_flag" ||
16452 test ! -s conftest.err
16453 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016454 ac_header_compiler=yes
16455else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016457sed 's/^/| /' conftest.$ac_ext >&5
16458
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016461
16462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016463{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16464echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016465
16466# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016467{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16468echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016470/* confdefs.h. */
16471_ACEOF
16472cat confdefs.h >>conftest.$ac_ext
16473cat >>conftest.$ac_ext <<_ACEOF
16474/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016475#include <atheos/threads.h>
16476_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016477if { (ac_try="$ac_cpp conftest.$ac_ext"
16478case "(($ac_try" in
16479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16480 *) ac_try_echo=$ac_try;;
16481esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016483 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016484 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016485 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016486 rm -f conftest.er1
16487 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016489 (exit $ac_status); } >/dev/null && {
16490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16491 test ! -s conftest.err
16492 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016493 ac_header_preproc=yes
16494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016496sed 's/^/| /' conftest.$ac_ext >&5
16497
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016498 ac_header_preproc=no
16499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016500
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016501rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016502{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16503echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016504
16505# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016506case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16507 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016508 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16509echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16510 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16511echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016512 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016513 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016514 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016515 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16516echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16517 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16518echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16519 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16520echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16521 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16522echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16523 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16524echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16525 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16526echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016528## -------------------------------------- ##
16529## Report this to http://bugs.python.org/ ##
16530## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016531_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016532 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016533 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016534esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016535{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16536echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016537if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016539else
16540 ac_cv_header_atheos_threads_h=$ac_header_preproc
16541fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016542{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16543echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016544
16545fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016546if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016547 cat >>confdefs.h <<\_ACEOF
16548#define WITH_THREAD 1
16549_ACEOF
16550
16551
16552cat >>confdefs.h <<\_ACEOF
16553#define ATHEOS_THREADS 1
16554_ACEOF
16555
16556 THREADOBJ="Python/thread.o"
16557else
16558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016560 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16561echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016562if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016563 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016564fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16566echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016567else
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016569{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16570echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016572/* confdefs.h. */
16573_ACEOF
16574cat confdefs.h >>conftest.$ac_ext
16575cat >>conftest.$ac_ext <<_ACEOF
16576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016577$ac_includes_default
16578#include <kernel/OS.h>
16579_ACEOF
16580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016581if { (ac_try="$ac_compile"
16582case "(($ac_try" in
16583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16584 *) ac_try_echo=$ac_try;;
16585esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016589 grep -v '^ *+' conftest.er1 >conftest.err
16590 rm -f conftest.er1
16591 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016593 (exit $ac_status); } && {
16594 test -z "$ac_c_werror_flag" ||
16595 test ! -s conftest.err
16596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 ac_header_compiler=yes
16598else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016600sed 's/^/| /' conftest.$ac_ext >&5
16601
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604
16605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016606{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16607echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016608
16609# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016610{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16611echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016613/* confdefs.h. */
16614_ACEOF
16615cat confdefs.h >>conftest.$ac_ext
16616cat >>conftest.$ac_ext <<_ACEOF
16617/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016618#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016619_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016620if { (ac_try="$ac_cpp conftest.$ac_ext"
16621case "(($ac_try" in
16622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16623 *) ac_try_echo=$ac_try;;
16624esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016627 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016628 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016629 rm -f conftest.er1
16630 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632 (exit $ac_status); } >/dev/null && {
16633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16634 test ! -s conftest.err
16635 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 ac_header_preproc=yes
16637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016639sed 's/^/| /' conftest.$ac_ext >&5
16640
Martin v. Löwis11437992002-04-12 09:54:03 +000016641 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016642fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016643
Martin v. Löwis11437992002-04-12 09:54:03 +000016644rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016645{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16646echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16650 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016651 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16652echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16653 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16654echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016655 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016656 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016657 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016658 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16659echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16660 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16661echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16662 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16663echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16664 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16665echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16666 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16667echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16668 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16669echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016670 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016671## -------------------------------------- ##
16672## Report this to http://bugs.python.org/ ##
16673## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016674_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016676 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016677esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016678{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16679echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016680if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016682else
16683 ac_cv_header_kernel_OS_h=$ac_header_preproc
16684fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016685{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16686echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016687
16688fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016689if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016690 cat >>confdefs.h <<\_ACEOF
16691#define WITH_THREAD 1
16692_ACEOF
16693
16694
16695cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016696#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016697_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016698
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016699 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016700else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016701
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16703echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016704if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016705 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016706else
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016708LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016709cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016710/* confdefs.h. */
16711_ACEOF
16712cat confdefs.h >>conftest.$ac_ext
16713cat >>conftest.$ac_ext <<_ACEOF
16714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016715
Martin v. Löwiseba40652007-08-30 20:10:57 +000016716/* Override any GCC internal prototype to avoid an error.
16717 Use char because int might match the return type of a GCC
16718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016719#ifdef __cplusplus
16720extern "C"
16721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016722char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016723int
16724main ()
16725{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016726return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 ;
16728 return 0;
16729}
16730_ACEOF
16731rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732if { (ac_try="$ac_link"
16733case "(($ac_try" in
16734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16735 *) ac_try_echo=$ac_try;;
16736esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 grep -v '^ *+' conftest.er1 >conftest.err
16741 rm -f conftest.er1
16742 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016744 (exit $ac_status); } && {
16745 test -z "$ac_c_werror_flag" ||
16746 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016747 } && test -s conftest$ac_exeext &&
16748 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016749 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016750else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016752sed 's/^/| /' conftest.$ac_ext >&5
16753
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016756
16757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016759LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016760fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016761{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16762echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16763if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016765#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016766_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016767
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016768 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016769 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016770 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016771else
Greg Steinadf63d62000-07-05 10:38:09 +000016772
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016773 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16774echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016775if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016776 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016777else
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016779LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016780cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016781/* confdefs.h. */
16782_ACEOF
16783cat confdefs.h >>conftest.$ac_ext
16784cat >>conftest.$ac_ext <<_ACEOF
16785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016786
Martin v. Löwiseba40652007-08-30 20:10:57 +000016787/* Override any GCC internal prototype to avoid an error.
16788 Use char because int might match the return type of a GCC
16789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016790#ifdef __cplusplus
16791extern "C"
16792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016793char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016794int
16795main ()
16796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016797return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 ;
16799 return 0;
16800}
16801_ACEOF
16802rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016803if { (ac_try="$ac_link"
16804case "(($ac_try" in
16805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16806 *) ac_try_echo=$ac_try;;
16807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016815 (exit $ac_status); } && {
16816 test -z "$ac_c_werror_flag" ||
16817 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016818 } && test -s conftest$ac_exeext &&
16819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016823sed 's/^/| /' conftest.$ac_ext >&5
16824
Martin v. Löwiseba40652007-08-30 20:10:57 +000016825 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827
16828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016830LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016831fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016832{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16833echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16834if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016836#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016837_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016838
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016839 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016840 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016841 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016842else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016843
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016844 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16845echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016846if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016848else
Martin v. Löwis11437992002-04-12 09:54:03 +000016849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016850LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016857
Martin v. Löwiseba40652007-08-30 20:10:57 +000016858/* Override any GCC internal prototype to avoid an error.
16859 Use char because int might match the return type of a GCC
16860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016861#ifdef __cplusplus
16862extern "C"
16863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016864char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016865int
16866main ()
16867{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016868return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016869 ;
16870 return 0;
16871}
16872_ACEOF
16873rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874if { (ac_try="$ac_link"
16875case "(($ac_try" in
16876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16877 *) ac_try_echo=$ac_try;;
16878esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016882 grep -v '^ *+' conftest.er1 >conftest.err
16883 rm -f conftest.er1
16884 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 (exit $ac_status); } && {
16887 test -z "$ac_c_werror_flag" ||
16888 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016889 } && test -s conftest$ac_exeext &&
16890 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016892else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016894sed 's/^/| /' conftest.$ac_ext >&5
16895
Martin v. Löwiseba40652007-08-30 20:10:57 +000016896 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898
16899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016902fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016903{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16904echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16905if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016907#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016908_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016909
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016910 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016911 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016912 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016913else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016915 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16916echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016917if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016919else
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016921LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016923/* confdefs.h. */
16924_ACEOF
16925cat confdefs.h >>conftest.$ac_ext
16926cat >>conftest.$ac_ext <<_ACEOF
16927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016928
Martin v. Löwiseba40652007-08-30 20:10:57 +000016929/* Override any GCC internal prototype to avoid an error.
16930 Use char because int might match the return type of a GCC
16931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016932#ifdef __cplusplus
16933extern "C"
16934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016935char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016936int
16937main ()
16938{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016939return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ;
16941 return 0;
16942}
16943_ACEOF
16944rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016945if { (ac_try="$ac_link"
16946case "(($ac_try" in
16947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16948 *) ac_try_echo=$ac_try;;
16949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016951 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016953 grep -v '^ *+' conftest.er1 >conftest.err
16954 rm -f conftest.er1
16955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016957 (exit $ac_status); } && {
16958 test -z "$ac_c_werror_flag" ||
16959 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016960 } && test -s conftest$ac_exeext &&
16961 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016962 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016965sed 's/^/| /' conftest.$ac_ext >&5
16966
Martin v. Löwiseba40652007-08-30 20:10:57 +000016967 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016969
16970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016972LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016973fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016974{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16975echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16976if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016978#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016979_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016980
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016981 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016982 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016983 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016984else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016985
Martin v. Löwis130fb172001-07-19 11:00:41 +000016986 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016987fi
16988
Guido van Rossum627b2d71993-12-24 10:39:16 +000016989
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016990fi
16991
Guido van Rossum0be3e491997-05-22 20:33:33 +000016992fi
16993
Guido van Rossum49545951997-12-02 19:28:29 +000016994fi
16995
Guido van Rossumb93a8621998-05-07 13:27:32 +000016996fi
16997
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016998
Michael W. Hudson54241132001-12-07 15:38:26 +000016999fi
17000
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017001
17002fi
17003
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017005
17006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017008fi
17009
Martin v. Löwis11437992002-04-12 09:54:03 +000017010fi
17011
17012
17013fi
17014
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017015
Michael W. Hudson54241132001-12-07 15:38:26 +000017016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017017 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17018echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017019if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017021else
Martin v. Löwis11437992002-04-12 09:54:03 +000017022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017023LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017025/* confdefs.h. */
17026_ACEOF
17027cat confdefs.h >>conftest.$ac_ext
17028cat >>conftest.$ac_ext <<_ACEOF
17029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017030
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031/* Override any GCC internal prototype to avoid an error.
17032 Use char because int might match the return type of a GCC
17033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017034#ifdef __cplusplus
17035extern "C"
17036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017037char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017038int
17039main ()
17040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017041return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017042 ;
17043 return 0;
17044}
17045_ACEOF
17046rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017047if { (ac_try="$ac_link"
17048case "(($ac_try" in
17049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17050 *) ac_try_echo=$ac_try;;
17051esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017053 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017055 grep -v '^ *+' conftest.er1 >conftest.err
17056 rm -f conftest.er1
17057 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017059 (exit $ac_status); } && {
17060 test -z "$ac_c_werror_flag" ||
17061 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017062 } && test -s conftest$ac_exeext &&
17063 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017064 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017065else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017067sed 's/^/| /' conftest.$ac_ext >&5
17068
Martin v. Löwiseba40652007-08-30 20:10:57 +000017069 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017071
17072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017074LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017076{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17077echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17078if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017080#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017081_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017082
Martin v. Löwis130fb172001-07-19 11:00:41 +000017083 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017084 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017085 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017086fi
17087
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017088
Neal Norwitza978ab02002-11-02 16:58:05 +000017089 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017090 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17091echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017092if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017093 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017094else
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017096LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017097cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017098/* confdefs.h. */
17099_ACEOF
17100cat confdefs.h >>conftest.$ac_ext
17101cat >>conftest.$ac_ext <<_ACEOF
17102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
Martin v. Löwiseba40652007-08-30 20:10:57 +000017104/* Override any GCC internal prototype to avoid an error.
17105 Use char because int might match the return type of a GCC
17106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017107#ifdef __cplusplus
17108extern "C"
17109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017110char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017111int
17112main ()
17113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017114return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 ;
17116 return 0;
17117}
17118_ACEOF
17119rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120if { (ac_try="$ac_link"
17121case "(($ac_try" in
17122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17123 *) ac_try_echo=$ac_try;;
17124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017128 grep -v '^ *+' conftest.er1 >conftest.err
17129 rm -f conftest.er1
17130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132 (exit $ac_status); } && {
17133 test -z "$ac_c_werror_flag" ||
17134 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017135 } && test -s conftest$ac_exeext &&
17136 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017137 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017140sed 's/^/| /' conftest.$ac_ext >&5
17141
Martin v. Löwiseba40652007-08-30 20:10:57 +000017142 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144
17145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017148fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017149{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17150echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17151if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017153#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017154_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017155
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017156 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017157 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017158 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017159fi
17160
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017161 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017162
Martin v. Löwis130fb172001-07-19 11:00:41 +000017163 if test "$USE_THREAD_MODULE" != "#"
17164 then
17165 # If the above checks didn't disable threads, (at least) OSF1
17166 # needs this '-threads' argument during linking.
17167 case $ac_sys_system in
17168 OSF1) LDLAST=-threads;;
17169 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017170 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017171fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017172
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017173if test "$posix_threads" = "yes"; then
17174 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017175
17176cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017177#define _POSIX_THREADS 1
17178_ACEOF
17179
17180 fi
17181
17182 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17183 case $ac_sys_system/$ac_sys_release in
17184 SunOS/5.6)
17185cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017186#define HAVE_PTHREAD_DESTRUCTOR 1
17187_ACEOF
17188
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017189 ;;
17190 SunOS/5.8)
17191cat >>confdefs.h <<\_ACEOF
17192#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17193_ACEOF
17194
17195 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017196 AIX/5)
17197cat >>confdefs.h <<\_ACEOF
17198#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17199_ACEOF
17200
17201 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017202 esac
17203
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017204 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17205echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017206 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017207 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017208else
17209 if test "$cross_compiling" = yes; then
17210 ac_cv_pthread_system_supported=no
17211else
17212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017213/* confdefs.h. */
17214_ACEOF
17215cat confdefs.h >>conftest.$ac_ext
17216cat >>conftest.$ac_ext <<_ACEOF
17217/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017218#include <pthread.h>
17219 void *foo(void *parm) {
17220 return NULL;
17221 }
17222 main() {
17223 pthread_attr_t attr;
17224 pthread_t id;
17225 if (pthread_attr_init(&attr)) exit(-1);
17226 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17227 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17228 exit(0);
17229 }
17230_ACEOF
17231rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017232if { (ac_try="$ac_link"
17233case "(($ac_try" in
17234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17235 *) ac_try_echo=$ac_try;;
17236esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017238 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017239 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017242 { (case "(($ac_try" in
17243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17244 *) ac_try_echo=$ac_try;;
17245esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017247 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017248 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017250 (exit $ac_status); }; }; then
17251 ac_cv_pthread_system_supported=yes
17252else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017253 echo "$as_me: program exited with status $ac_status" >&5
17254echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017255sed 's/^/| /' conftest.$ac_ext >&5
17256
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017257( exit $ac_status )
17258ac_cv_pthread_system_supported=no
17259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260rm -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 +000017261fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017262
Martin v. Löwiseba40652007-08-30 20:10:57 +000017263
17264
Guido van Rossum627b2d71993-12-24 10:39:16 +000017265fi
17266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017267 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17268echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017269 if test "$ac_cv_pthread_system_supported" = "yes"; then
17270
17271cat >>confdefs.h <<\_ACEOF
17272#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17273_ACEOF
17274
17275 fi
17276
17277for ac_func in pthread_sigmask
17278do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17280{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017282if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017283 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017284else
17285 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017286/* confdefs.h. */
17287_ACEOF
17288cat confdefs.h >>conftest.$ac_ext
17289cat >>conftest.$ac_ext <<_ACEOF
17290/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017291/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17293#define $ac_func innocuous_$ac_func
17294
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017295/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017296 which can conflict with char $ac_func (); below.
17297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017298 <limits.h> exists even on freestanding compilers. */
17299
17300#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017301# include <limits.h>
17302#else
17303# include <assert.h>
17304#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017305
17306#undef $ac_func
17307
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308/* Override any GCC internal prototype to avoid an error.
17309 Use char because int might match the return type of a GCC
17310 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017311#ifdef __cplusplus
17312extern "C"
17313#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017314char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017315/* The GNU C library defines this for functions which it implements
17316 to always fail with ENOSYS. Some functions are actually named
17317 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017318#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017319choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017320#endif
17321
Skip Montanaro6dead952003-09-25 14:50:04 +000017322int
17323main ()
17324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017325return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017326 ;
17327 return 0;
17328}
17329_ACEOF
17330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017331if { (ac_try="$ac_link"
17332case "(($ac_try" in
17333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17334 *) ac_try_echo=$ac_try;;
17335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017339 grep -v '^ *+' conftest.er1 >conftest.err
17340 rm -f conftest.er1
17341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017343 (exit $ac_status); } && {
17344 test -z "$ac_c_werror_flag" ||
17345 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017346 } && test -s conftest$ac_exeext &&
17347 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017348 eval "$as_ac_var=yes"
17349else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017351sed 's/^/| /' conftest.$ac_ext >&5
17352
Martin v. Löwiseba40652007-08-30 20:10:57 +000017353 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017355
17356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017358fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017359ac_res=`eval echo '${'$as_ac_var'}'`
17360 { echo "$as_me:$LINENO: result: $ac_res" >&5
17361echo "${ECHO_T}$ac_res" >&6; }
17362if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017363 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017365_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017366 case $ac_sys_system in
17367 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017368
Jason Tishlerfac083d2003-07-22 15:20:49 +000017369cat >>confdefs.h <<\_ACEOF
17370#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17371_ACEOF
17372
17373 ;;
17374 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017375fi
17376done
17377
17378fi
17379
17380
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017381# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017382
17383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017384{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17385echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017386# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017387if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017389 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017390 { echo "$as_me:$LINENO: result: no" >&5
17391echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017392 ipv6=no
17393 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017394 *) { echo "$as_me:$LINENO: result: yes" >&5
17395echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017397#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017398_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017399
17400 ipv6=yes
17401 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017403else
Martin v. Löwis11437992002-04-12 09:54:03 +000017404
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017405 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017406 { echo "$as_me:$LINENO: result: no" >&5
17407echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017408 ipv6=no
17409
17410else
Martin v. Löwis11437992002-04-12 09:54:03 +000017411 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017412/* confdefs.h. */
17413_ACEOF
17414cat confdefs.h >>conftest.$ac_ext
17415cat >>conftest.$ac_ext <<_ACEOF
17416/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017417 /* AF_INET6 available check */
17418#include <sys/types.h>
17419#include <sys/socket.h>
17420main()
17421{
17422 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17423 exit(1);
17424 else
17425 exit(0);
17426}
17427
Martin v. Löwis11437992002-04-12 09:54:03 +000017428_ACEOF
17429rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017430if { (ac_try="$ac_link"
17431case "(($ac_try" in
17432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17433 *) ac_try_echo=$ac_try;;
17434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017436 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017440 { (case "(($ac_try" in
17441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17442 *) ac_try_echo=$ac_try;;
17443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017446 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017449 { echo "$as_me:$LINENO: result: yes" >&5
17450echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017451 ipv6=yes
17452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017453 echo "$as_me: program exited with status $ac_status" >&5
17454echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017455sed 's/^/| /' conftest.$ac_ext >&5
17456
Martin v. Löwis11437992002-04-12 09:54:03 +000017457( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017458{ echo "$as_me:$LINENO: result: no" >&5
17459echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460 ipv6=no
17461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017462rm -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 +000017463fi
17464
Martin v. Löwiseba40652007-08-30 20:10:57 +000017465
17466
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017467if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017468 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17469echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017471/* confdefs.h. */
17472_ACEOF
17473cat confdefs.h >>conftest.$ac_ext
17474cat >>conftest.$ac_ext <<_ACEOF
17475/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017476#include <sys/types.h>
17477#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017478int
17479main ()
17480{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017481struct sockaddr_in6 x;
17482x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 ;
17484 return 0;
17485}
17486_ACEOF
17487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017488if { (ac_try="$ac_compile"
17489case "(($ac_try" in
17490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17491 *) ac_try_echo=$ac_try;;
17492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017496 grep -v '^ *+' conftest.er1 >conftest.err
17497 rm -f conftest.er1
17498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500 (exit $ac_status); } && {
17501 test -z "$ac_c_werror_flag" ||
17502 test ! -s conftest.err
17503 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017504 { echo "$as_me:$LINENO: result: yes" >&5
17505echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017506 ipv6=yes
17507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017509sed 's/^/| /' conftest.$ac_ext >&5
17510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017511 { echo "$as_me:$LINENO: result: no" >&5
17512echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017513 ipv6=no
17514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017515
17516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017517fi
17518
17519if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017521#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017522_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017523
17524fi
17525
Martin v. Löwiseba40652007-08-30 20:10:57 +000017526fi
17527
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017528
17529ipv6type=unknown
17530ipv6lib=none
17531ipv6trylibc=no
17532
17533if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017534 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17535echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017536 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17537 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017538 case $i in
17539 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017541/* confdefs.h. */
17542_ACEOF
17543cat confdefs.h >>conftest.$ac_ext
17544cat >>conftest.$ac_ext <<_ACEOF
17545/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017546
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017547#include <netinet/in.h>
17548#ifdef IPV6_INRIA_VERSION
17549yes
17550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017551_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017553 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017554 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017555fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017556rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017557
17558 ;;
17559 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017561/* confdefs.h. */
17562_ACEOF
17563cat confdefs.h >>conftest.$ac_ext
17564cat >>conftest.$ac_ext <<_ACEOF
17565/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017566
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017567#include <netinet/in.h>
17568#ifdef __KAME__
17569yes
17570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017571_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017573 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017574 ipv6type=$i;
17575 ipv6lib=inet6
17576 ipv6libdir=/usr/local/v6/lib
17577 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017578fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017579rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017580
17581 ;;
17582 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017584/* confdefs.h. */
17585_ACEOF
17586cat confdefs.h >>conftest.$ac_ext
17587cat >>conftest.$ac_ext <<_ACEOF
17588/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017589
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017590#include <features.h>
17591#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17592yes
17593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017594_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017596 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017597 ipv6type=$i;
17598 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017599fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017600rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017601
17602 ;;
17603 linux-inet6)
17604 if test -d /usr/inet6; then
17605 ipv6type=$i
17606 ipv6lib=inet6
17607 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017608 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017609 fi
17610 ;;
17611 solaris)
17612 if test -f /etc/netconfig; then
17613 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17614 ipv6type=$i
17615 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017616 fi
17617 fi
17618 ;;
17619 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017621/* confdefs.h. */
17622_ACEOF
17623cat confdefs.h >>conftest.$ac_ext
17624cat >>conftest.$ac_ext <<_ACEOF
17625/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017626
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017627#include <sys/param.h>
17628#ifdef _TOSHIBA_INET6
17629yes
17630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017631_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017633 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017634 ipv6type=$i;
17635 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017636 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017637fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017638rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017639
17640 ;;
17641 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017643/* confdefs.h. */
17644_ACEOF
17645cat confdefs.h >>conftest.$ac_ext
17646cat >>conftest.$ac_ext <<_ACEOF
17647/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017648
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017649#include </usr/local/v6/include/sys/v6config.h>
17650#ifdef __V6D__
17651yes
17652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017653_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017654if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017655 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017656 ipv6type=$i;
17657 ipv6lib=v6;
17658 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017659 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017660fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017661rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017662
17663 ;;
17664 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017666/* confdefs.h. */
17667_ACEOF
17668cat confdefs.h >>conftest.$ac_ext
17669cat >>conftest.$ac_ext <<_ACEOF
17670/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017672#include <sys/param.h>
17673#ifdef _ZETA_MINAMI_INET6
17674yes
17675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017676_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017678 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017679 ipv6type=$i;
17680 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017681 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017682fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000017683rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017684
17685 ;;
17686 esac
17687 if test "$ipv6type" != "unknown"; then
17688 break
17689 fi
17690 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017691 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17692echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017693fi
17694
17695if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17696 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17697 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17698 echo "using lib$ipv6lib"
17699 else
17700 if test $ipv6trylibc = "yes"; then
17701 echo "using libc"
17702 else
17703 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17704 echo "You need to fetch lib$ipv6lib.a from appropriate"
17705 echo 'ipv6 kit and compile beforehand.'
17706 exit 1
17707 fi
17708 fi
17709fi
17710
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017711{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17712echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017713cat >conftest.$ac_ext <<_ACEOF
17714/* confdefs.h. */
17715_ACEOF
17716cat confdefs.h >>conftest.$ac_ext
17717cat >>conftest.$ac_ext <<_ACEOF
17718/* end confdefs.h. */
17719#include <Carbon/Carbon.h>
17720int
17721main ()
17722{
17723FSIORefNum fRef = 0
17724 ;
17725 return 0;
17726}
17727_ACEOF
17728rm -f conftest.$ac_objext
17729if { (ac_try="$ac_compile"
17730case "(($ac_try" in
17731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17732 *) ac_try_echo=$ac_try;;
17733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017735 (eval "$ac_compile") 2>conftest.er1
17736 ac_status=$?
17737 grep -v '^ *+' conftest.er1 >conftest.err
17738 rm -f conftest.er1
17739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017741 (exit $ac_status); } && {
17742 test -z "$ac_c_werror_flag" ||
17743 test ! -s conftest.err
17744 } && test -s conftest.$ac_objext; then
17745
17746cat >>confdefs.h <<\_ACEOF
17747#define HAVE_OSX105_SDK 1
17748_ACEOF
17749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017750 { echo "$as_me:$LINENO: result: yes" >&5
17751echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017752else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017753 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017754sed 's/^/| /' conftest.$ac_ext >&5
17755
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017756 { echo "$as_me:$LINENO: result: no" >&5
17757echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017758
17759fi
17760
17761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17762
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017763# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017764{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17765echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017766
Martin v. Löwiseba40652007-08-30 20:10:57 +000017767# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017768if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017769 withval=$with_doc_strings;
17770fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017771
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017772
17773if test -z "$with_doc_strings"
17774then with_doc_strings="yes"
17775fi
17776if test "$with_doc_strings" != "no"
17777then
17778
17779cat >>confdefs.h <<\_ACEOF
17780#define WITH_DOC_STRINGS 1
17781_ACEOF
17782
17783fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017784{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17785echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017786
Neil Schemenauera35c6882001-02-27 04:45:05 +000017787# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017788{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17789echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017790
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017792if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017793 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017794if test "$withval" != no
17795then
17796
17797cat >>confdefs.h <<\_ACEOF
17798#define WITH_TSC 1
17799_ACEOF
17800
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017801 { echo "$as_me:$LINENO: result: yes" >&5
17802echo "${ECHO_T}yes" >&6; }
17803else { echo "$as_me:$LINENO: result: no" >&5
17804echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017805fi
17806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017807 { echo "$as_me:$LINENO: result: no" >&5
17808echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017809fi
17810
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017811
17812# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017813{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17814echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
Martin v. Löwiseba40652007-08-30 20:10:57 +000017816# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017817if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818 withval=$with_pymalloc;
17819fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017820
Neil Schemenauera35c6882001-02-27 04:45:05 +000017821
Neil Schemenauer16c22972002-03-22 15:34:49 +000017822if test -z "$with_pymalloc"
17823then with_pymalloc="yes"
17824fi
17825if test "$with_pymalloc" != "no"
17826then
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
17828cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017829#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017830_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017831
17832fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017833{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17834echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017835
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017836# Check for Valgrind support
17837{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17838echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17839
17840# Check whether --with-valgrind was given.
17841if test "${with_valgrind+set}" = set; then
17842 withval=$with_valgrind;
17843else
17844 with_valgrind=no
17845fi
17846
17847{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17848echo "${ECHO_T}$with_valgrind" >&6; }
17849if test "$with_valgrind" != no; then
17850 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17851 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17852echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17853if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17854 echo $ECHO_N "(cached) $ECHO_C" >&6
17855fi
17856{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17857echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17858else
17859 # Is the header compilable?
17860{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17861echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17862cat >conftest.$ac_ext <<_ACEOF
17863/* confdefs.h. */
17864_ACEOF
17865cat confdefs.h >>conftest.$ac_ext
17866cat >>conftest.$ac_ext <<_ACEOF
17867/* end confdefs.h. */
17868$ac_includes_default
17869#include <valgrind/valgrind.h>
17870_ACEOF
17871rm -f conftest.$ac_objext
17872if { (ac_try="$ac_compile"
17873case "(($ac_try" in
17874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17875 *) ac_try_echo=$ac_try;;
17876esac
17877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17878 (eval "$ac_compile") 2>conftest.er1
17879 ac_status=$?
17880 grep -v '^ *+' conftest.er1 >conftest.err
17881 rm -f conftest.er1
17882 cat conftest.err >&5
17883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17884 (exit $ac_status); } && {
17885 test -z "$ac_c_werror_flag" ||
17886 test ! -s conftest.err
17887 } && test -s conftest.$ac_objext; then
17888 ac_header_compiler=yes
17889else
17890 echo "$as_me: failed program was:" >&5
17891sed 's/^/| /' conftest.$ac_ext >&5
17892
17893 ac_header_compiler=no
17894fi
17895
17896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17897{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17898echo "${ECHO_T}$ac_header_compiler" >&6; }
17899
17900# Is the header present?
17901{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17902echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17903cat >conftest.$ac_ext <<_ACEOF
17904/* confdefs.h. */
17905_ACEOF
17906cat confdefs.h >>conftest.$ac_ext
17907cat >>conftest.$ac_ext <<_ACEOF
17908/* end confdefs.h. */
17909#include <valgrind/valgrind.h>
17910_ACEOF
17911if { (ac_try="$ac_cpp conftest.$ac_ext"
17912case "(($ac_try" in
17913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17914 *) ac_try_echo=$ac_try;;
17915esac
17916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17917 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17918 ac_status=$?
17919 grep -v '^ *+' conftest.er1 >conftest.err
17920 rm -f conftest.er1
17921 cat conftest.err >&5
17922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17923 (exit $ac_status); } >/dev/null && {
17924 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17925 test ! -s conftest.err
17926 }; then
17927 ac_header_preproc=yes
17928else
17929 echo "$as_me: failed program was:" >&5
17930sed 's/^/| /' conftest.$ac_ext >&5
17931
17932 ac_header_preproc=no
17933fi
17934
17935rm -f conftest.err conftest.$ac_ext
17936{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17937echo "${ECHO_T}$ac_header_preproc" >&6; }
17938
17939# So? What about this header?
17940case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17941 yes:no: )
17942 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17943echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17944 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17945echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17946 ac_header_preproc=yes
17947 ;;
17948 no:yes:* )
17949 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17950echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17951 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17952echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17953 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17954echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17955 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17956echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17957 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17958echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17959 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17960echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17961 ( cat <<\_ASBOX
17962## -------------------------------------- ##
17963## Report this to http://bugs.python.org/ ##
17964## -------------------------------------- ##
17965_ASBOX
17966 ) | sed "s/^/$as_me: WARNING: /" >&2
17967 ;;
17968esac
17969{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17970echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17971if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17972 echo $ECHO_N "(cached) $ECHO_C" >&6
17973else
17974 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17975fi
17976{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17977echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17978
17979fi
17980if test $ac_cv_header_valgrind_valgrind_h = yes; then
17981
17982cat >>confdefs.h <<\_ACEOF
17983#define WITH_VALGRIND 1
17984_ACEOF
17985
17986else
17987 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17988echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17989 { (exit 1); exit 1; }; }
17990
17991fi
17992
17993
17994fi
17995
Barry Warsawef82cd72000-06-30 16:21:01 +000017996# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017997{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17998echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017999
Martin v. Löwiseba40652007-08-30 20:10:57 +000018000# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018001if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018002 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018003if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018004then
18005
18006cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018007#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018008_ACEOF
18009
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018010 { echo "$as_me:$LINENO: result: yes" >&5
18011echo "${ECHO_T}yes" >&6; }
18012else { echo "$as_me:$LINENO: result: no" >&5
18013echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018014fi
18015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018016 { echo "$as_me:$LINENO: result: no" >&5
18017echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018018fi
18019
Barry Warsawef82cd72000-06-30 16:21:01 +000018020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018021# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018022
Guido van Rossum98935bf2001-09-05 19:13:16 +000018023DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018024
Guido van Rossume97ee181999-12-20 21:27:22 +000018025# the dlopen() function means we might want to use dynload_shlib.o. some
18026# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018027
Thomas Wouters3a584202000-08-05 23:28:51 +000018028for ac_func in dlopen
18029do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18031{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018035else
Martin v. Löwis11437992002-04-12 09:54:03 +000018036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018037/* confdefs.h. */
18038_ACEOF
18039cat confdefs.h >>conftest.$ac_ext
18040cat >>conftest.$ac_ext <<_ACEOF
18041/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018042/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18044#define $ac_func innocuous_$ac_func
18045
Guido van Rossume97ee181999-12-20 21:27:22 +000018046/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018047 which can conflict with char $ac_func (); below.
18048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018049 <limits.h> exists even on freestanding compilers. */
18050
18051#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018052# include <limits.h>
18053#else
18054# include <assert.h>
18055#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018056
18057#undef $ac_func
18058
Martin v. Löwiseba40652007-08-30 20:10:57 +000018059/* Override any GCC internal prototype to avoid an error.
18060 Use char because int might match the return type of a GCC
18061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018062#ifdef __cplusplus
18063extern "C"
18064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018065char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018066/* The GNU C library defines this for functions which it implements
18067 to always fail with ENOSYS. Some functions are actually named
18068 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018069#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018070choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018071#endif
18072
Skip Montanaro6dead952003-09-25 14:50:04 +000018073int
18074main ()
18075{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018076return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 ;
18078 return 0;
18079}
18080_ACEOF
18081rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018082if { (ac_try="$ac_link"
18083case "(($ac_try" in
18084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18085 *) ac_try_echo=$ac_try;;
18086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018090 grep -v '^ *+' conftest.er1 >conftest.err
18091 rm -f conftest.er1
18092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094 (exit $ac_status); } && {
18095 test -z "$ac_c_werror_flag" ||
18096 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018097 } && test -s conftest$ac_exeext &&
18098 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018102sed 's/^/| /' conftest.$ac_ext >&5
18103
Martin v. Löwiseba40652007-08-30 20:10:57 +000018104 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106
18107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018108 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018110ac_res=`eval echo '${'$as_ac_var'}'`
18111 { echo "$as_me:$LINENO: result: $ac_res" >&5
18112echo "${ECHO_T}$ac_res" >&6; }
18113if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018116_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018117
Guido van Rossume97ee181999-12-20 21:27:22 +000018118fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018119done
Guido van Rossume97ee181999-12-20 21:27:22 +000018120
Michael W. Hudson54241132001-12-07 15:38:26 +000018121
Guido van Rossume97ee181999-12-20 21:27:22 +000018122# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18123# loading of modules.
18124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018125{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18126echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018127if test -z "$DYNLOADFILE"
18128then
18129 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018130 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18131 if test "$ac_cv_func_dlopen" = yes
18132 then DYNLOADFILE="dynload_shlib.o"
18133 else DYNLOADFILE="dynload_aix.o"
18134 fi
18135 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018136 BeOS*) DYNLOADFILE="dynload_beos.o";;
18137 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018138 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18139 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018140 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018141 *)
18142 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18143 # out any dynamic loading
18144 if test "$ac_cv_func_dlopen" = yes
18145 then DYNLOADFILE="dynload_shlib.o"
18146 else DYNLOADFILE="dynload_stub.o"
18147 fi
18148 ;;
18149 esac
18150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018151{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18152echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018153if test "$DYNLOADFILE" != "dynload_stub.o"
18154then
Martin v. Löwis11437992002-04-12 09:54:03 +000018155
18156cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018157#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018158_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018159
18160fi
18161
Neil Schemenauer4e425612001-06-19 15:44:15 +000018162# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18163
Michael W. Hudson54241132001-12-07 15:38:26 +000018164
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018165{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18166echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018167if test -z "$MACHDEP_OBJS"
18168then
Jack Jansene578a632001-08-15 01:27:14 +000018169 MACHDEP_OBJS=$extra_machdep_objs
18170else
18171 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018172fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018173{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18174echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018175
Guido van Rossum627b2d71993-12-24 10:39:16 +000018176# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018177
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
18247
Martin v. Löwisd6320502004-08-12 13:45:08 +000018248
Martin v. Löwisc3001752005-01-23 09:27:24 +000018249
18250
Neal Norwitz05a45592006-03-20 06:30:08 +000018251
18252
Martin v. Löwis382abef2007-02-19 10:55:19 +000018253
18254
Christian Heimes36281872007-11-30 21:11:28 +000018255
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018256
18257
Jesse Noller355b1262009-04-02 00:03:28 +000018258
18259
18260
18261
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018275
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018276for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18277 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018278 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018279 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018280 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018281 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018282 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018283 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18284 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018285 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018286 setlocale setregid setreuid setresuid setresgid \
18287 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018288 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018289 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018290 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018291do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018292as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18293{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18294echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018295if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018296 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018297else
Martin v. Löwis11437992002-04-12 09:54:03 +000018298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018299/* confdefs.h. */
18300_ACEOF
18301cat confdefs.h >>conftest.$ac_ext
18302cat >>conftest.$ac_ext <<_ACEOF
18303/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018304/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18305 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18306#define $ac_func innocuous_$ac_func
18307
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018308/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018309 which can conflict with char $ac_func (); below.
18310 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018311 <limits.h> exists even on freestanding compilers. */
18312
18313#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018314# include <limits.h>
18315#else
18316# include <assert.h>
18317#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018318
18319#undef $ac_func
18320
Martin v. Löwiseba40652007-08-30 20:10:57 +000018321/* Override any GCC internal prototype to avoid an error.
18322 Use char because int might match the return type of a GCC
18323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018324#ifdef __cplusplus
18325extern "C"
18326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018327char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018328/* The GNU C library defines this for functions which it implements
18329 to always fail with ENOSYS. Some functions are actually named
18330 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018331#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018332choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018333#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018334
Skip Montanaro6dead952003-09-25 14:50:04 +000018335int
18336main ()
18337{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018338return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018339 ;
18340 return 0;
18341}
18342_ACEOF
18343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018344if { (ac_try="$ac_link"
18345case "(($ac_try" in
18346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18347 *) ac_try_echo=$ac_try;;
18348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018352 grep -v '^ *+' conftest.er1 >conftest.err
18353 rm -f conftest.er1
18354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018356 (exit $ac_status); } && {
18357 test -z "$ac_c_werror_flag" ||
18358 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018359 } && test -s conftest$ac_exeext &&
18360 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018361 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018364sed 's/^/| /' conftest.$ac_ext >&5
18365
Martin v. Löwiseba40652007-08-30 20:10:57 +000018366 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368
18369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018370 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018371fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018372ac_res=`eval echo '${'$as_ac_var'}'`
18373 { echo "$as_me:$LINENO: result: $ac_res" >&5
18374echo "${ECHO_T}$ac_res" >&6; }
18375if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018376 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018377#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018378_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018380fi
18381done
18382
Michael W. Hudson54241132001-12-07 15:38:26 +000018383
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018384# For some functions, having a definition is not sufficient, since
18385# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018386{ echo "$as_me:$LINENO: checking for chroot" >&5
18387echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018389/* confdefs.h. */
18390_ACEOF
18391cat confdefs.h >>conftest.$ac_ext
18392cat >>conftest.$ac_ext <<_ACEOF
18393/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018394#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018395int
18396main ()
18397{
18398void *x=chroot
18399 ;
18400 return 0;
18401}
18402_ACEOF
18403rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018404if { (ac_try="$ac_compile"
18405case "(($ac_try" in
18406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18407 *) ac_try_echo=$ac_try;;
18408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018412 grep -v '^ *+' conftest.er1 >conftest.err
18413 rm -f conftest.er1
18414 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018416 (exit $ac_status); } && {
18417 test -z "$ac_c_werror_flag" ||
18418 test ! -s conftest.err
18419 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018420
18421cat >>confdefs.h <<\_ACEOF
18422#define HAVE_CHROOT 1
18423_ACEOF
18424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018425 { echo "$as_me:$LINENO: result: yes" >&5
18426echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018427else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018429sed 's/^/| /' conftest.$ac_ext >&5
18430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018431 { echo "$as_me:$LINENO: result: no" >&5
18432echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018433
18434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018435
18436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018437{ echo "$as_me:$LINENO: checking for link" >&5
18438echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018439cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018440/* confdefs.h. */
18441_ACEOF
18442cat confdefs.h >>conftest.$ac_ext
18443cat >>conftest.$ac_ext <<_ACEOF
18444/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018445#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018446int
18447main ()
18448{
18449void *x=link
18450 ;
18451 return 0;
18452}
18453_ACEOF
18454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018455if { (ac_try="$ac_compile"
18456case "(($ac_try" in
18457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18458 *) ac_try_echo=$ac_try;;
18459esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018463 grep -v '^ *+' conftest.er1 >conftest.err
18464 rm -f conftest.er1
18465 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467 (exit $ac_status); } && {
18468 test -z "$ac_c_werror_flag" ||
18469 test ! -s conftest.err
18470 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018471
18472cat >>confdefs.h <<\_ACEOF
18473#define HAVE_LINK 1
18474_ACEOF
18475
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018476 { echo "$as_me:$LINENO: result: yes" >&5
18477echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018478else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018480sed 's/^/| /' conftest.$ac_ext >&5
18481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018482 { echo "$as_me:$LINENO: result: no" >&5
18483echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018484
18485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018486
18487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018488{ echo "$as_me:$LINENO: checking for symlink" >&5
18489echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018491/* confdefs.h. */
18492_ACEOF
18493cat confdefs.h >>conftest.$ac_ext
18494cat >>conftest.$ac_ext <<_ACEOF
18495/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018496#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018497int
18498main ()
18499{
18500void *x=symlink
18501 ;
18502 return 0;
18503}
18504_ACEOF
18505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018506if { (ac_try="$ac_compile"
18507case "(($ac_try" in
18508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18509 *) ac_try_echo=$ac_try;;
18510esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018514 grep -v '^ *+' conftest.er1 >conftest.err
18515 rm -f conftest.er1
18516 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518 (exit $ac_status); } && {
18519 test -z "$ac_c_werror_flag" ||
18520 test ! -s conftest.err
18521 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018522
18523cat >>confdefs.h <<\_ACEOF
18524#define HAVE_SYMLINK 1
18525_ACEOF
18526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018527 { echo "$as_me:$LINENO: result: yes" >&5
18528echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018531sed 's/^/| /' conftest.$ac_ext >&5
18532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018533 { echo "$as_me:$LINENO: result: no" >&5
18534echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018535
18536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018537
18538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018539{ echo "$as_me:$LINENO: checking for fchdir" >&5
18540echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018542/* confdefs.h. */
18543_ACEOF
18544cat confdefs.h >>conftest.$ac_ext
18545cat >>conftest.$ac_ext <<_ACEOF
18546/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018547#include <unistd.h>
18548int
18549main ()
18550{
18551void *x=fchdir
18552 ;
18553 return 0;
18554}
18555_ACEOF
18556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018557if { (ac_try="$ac_compile"
18558case "(($ac_try" in
18559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18560 *) ac_try_echo=$ac_try;;
18561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565 grep -v '^ *+' conftest.er1 >conftest.err
18566 rm -f conftest.er1
18567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569 (exit $ac_status); } && {
18570 test -z "$ac_c_werror_flag" ||
18571 test ! -s conftest.err
18572 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018573
18574cat >>confdefs.h <<\_ACEOF
18575#define HAVE_FCHDIR 1
18576_ACEOF
18577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018578 { echo "$as_me:$LINENO: result: yes" >&5
18579echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018580else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018582sed 's/^/| /' conftest.$ac_ext >&5
18583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018584 { echo "$as_me:$LINENO: result: no" >&5
18585echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018586
18587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018588
18589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018590{ echo "$as_me:$LINENO: checking for fsync" >&5
18591echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018593/* confdefs.h. */
18594_ACEOF
18595cat confdefs.h >>conftest.$ac_ext
18596cat >>conftest.$ac_ext <<_ACEOF
18597/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018598#include <unistd.h>
18599int
18600main ()
18601{
18602void *x=fsync
18603 ;
18604 return 0;
18605}
18606_ACEOF
18607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018608if { (ac_try="$ac_compile"
18609case "(($ac_try" in
18610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18611 *) ac_try_echo=$ac_try;;
18612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018616 grep -v '^ *+' conftest.er1 >conftest.err
18617 rm -f conftest.er1
18618 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 (exit $ac_status); } && {
18621 test -z "$ac_c_werror_flag" ||
18622 test ! -s conftest.err
18623 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018624
18625cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018626#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018627_ACEOF
18628
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018629 { echo "$as_me:$LINENO: result: yes" >&5
18630echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018633sed 's/^/| /' conftest.$ac_ext >&5
18634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018635 { echo "$as_me:$LINENO: result: no" >&5
18636echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018637
18638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018639
18640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018641{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18642echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018644/* confdefs.h. */
18645_ACEOF
18646cat confdefs.h >>conftest.$ac_ext
18647cat >>conftest.$ac_ext <<_ACEOF
18648/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018649#include <unistd.h>
18650int
18651main ()
18652{
18653void *x=fdatasync
18654 ;
18655 return 0;
18656}
18657_ACEOF
18658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018659if { (ac_try="$ac_compile"
18660case "(($ac_try" in
18661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662 *) ac_try_echo=$ac_try;;
18663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 (exit $ac_status); } && {
18672 test -z "$ac_c_werror_flag" ||
18673 test ! -s conftest.err
18674 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018675
18676cat >>confdefs.h <<\_ACEOF
18677#define HAVE_FDATASYNC 1
18678_ACEOF
18679
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018680 { echo "$as_me:$LINENO: result: yes" >&5
18681echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018682else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018684sed 's/^/| /' conftest.$ac_ext >&5
18685
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018686 { echo "$as_me:$LINENO: result: no" >&5
18687echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018688
18689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018690
18691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018692{ echo "$as_me:$LINENO: checking for epoll" >&5
18693echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018694cat >conftest.$ac_ext <<_ACEOF
18695/* confdefs.h. */
18696_ACEOF
18697cat confdefs.h >>conftest.$ac_ext
18698cat >>conftest.$ac_ext <<_ACEOF
18699/* end confdefs.h. */
18700#include <sys/epoll.h>
18701int
18702main ()
18703{
18704void *x=epoll_create
18705 ;
18706 return 0;
18707}
18708_ACEOF
18709rm -f conftest.$ac_objext
18710if { (ac_try="$ac_compile"
18711case "(($ac_try" in
18712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18713 *) ac_try_echo=$ac_try;;
18714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018716 (eval "$ac_compile") 2>conftest.er1
18717 ac_status=$?
18718 grep -v '^ *+' conftest.er1 >conftest.err
18719 rm -f conftest.er1
18720 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018722 (exit $ac_status); } && {
18723 test -z "$ac_c_werror_flag" ||
18724 test ! -s conftest.err
18725 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018726
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018727cat >>confdefs.h <<\_ACEOF
18728#define HAVE_EPOLL 1
18729_ACEOF
18730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018731 { echo "$as_me:$LINENO: result: yes" >&5
18732echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018733else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018734 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018735sed 's/^/| /' conftest.$ac_ext >&5
18736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018737 { echo "$as_me:$LINENO: result: no" >&5
18738echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018739
18740fi
18741
18742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018743{ echo "$as_me:$LINENO: checking for kqueue" >&5
18744echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018745cat >conftest.$ac_ext <<_ACEOF
18746/* confdefs.h. */
18747_ACEOF
18748cat confdefs.h >>conftest.$ac_ext
18749cat >>conftest.$ac_ext <<_ACEOF
18750/* end confdefs.h. */
18751
18752#include <sys/types.h>
18753#include <sys/event.h>
18754
18755int
18756main ()
18757{
18758int x=kqueue()
18759 ;
18760 return 0;
18761}
18762_ACEOF
18763rm -f conftest.$ac_objext
18764if { (ac_try="$ac_compile"
18765case "(($ac_try" in
18766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18767 *) ac_try_echo=$ac_try;;
18768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018770 (eval "$ac_compile") 2>conftest.er1
18771 ac_status=$?
18772 grep -v '^ *+' conftest.er1 >conftest.err
18773 rm -f conftest.er1
18774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018776 (exit $ac_status); } && {
18777 test -z "$ac_c_werror_flag" ||
18778 test ! -s conftest.err
18779 } && test -s conftest.$ac_objext; then
18780
18781cat >>confdefs.h <<\_ACEOF
18782#define HAVE_KQUEUE 1
18783_ACEOF
18784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018785 { echo "$as_me:$LINENO: result: yes" >&5
18786echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018787else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018789sed 's/^/| /' conftest.$ac_ext >&5
18790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018791 { echo "$as_me:$LINENO: result: no" >&5
18792echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018793
18794fi
18795
18796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018797# On some systems (eg. FreeBSD 5), we would find a definition of the
18798# functions ctermid_r, setgroups in the library, but no prototype
18799# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18800# address to avoid compiler warnings and potential miscompilations
18801# because of the missing prototypes.
18802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018803{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18804echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018806/* confdefs.h. */
18807_ACEOF
18808cat confdefs.h >>conftest.$ac_ext
18809cat >>conftest.$ac_ext <<_ACEOF
18810/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018811
18812#include "confdefs.h"
18813#include <stdio.h>
18814
Martin v. Löwisd5843682002-11-21 20:41:28 +000018815int
18816main ()
18817{
18818void* p = ctermid_r
18819 ;
18820 return 0;
18821}
18822_ACEOF
18823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018824if { (ac_try="$ac_compile"
18825case "(($ac_try" in
18826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18827 *) ac_try_echo=$ac_try;;
18828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018832 grep -v '^ *+' conftest.er1 >conftest.err
18833 rm -f conftest.er1
18834 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018836 (exit $ac_status); } && {
18837 test -z "$ac_c_werror_flag" ||
18838 test ! -s conftest.err
18839 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018840
18841cat >>confdefs.h <<\_ACEOF
18842#define HAVE_CTERMID_R 1
18843_ACEOF
18844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018845 { echo "$as_me:$LINENO: result: yes" >&5
18846echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018849sed 's/^/| /' conftest.$ac_ext >&5
18850
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018851 { echo "$as_me:$LINENO: result: no" >&5
18852echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018853
18854fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018855
Martin v. Löwiseba40652007-08-30 20:10:57 +000018856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018858{ echo "$as_me:$LINENO: checking for flock" >&5
18859echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018861/* confdefs.h. */
18862_ACEOF
18863cat confdefs.h >>conftest.$ac_ext
18864cat >>conftest.$ac_ext <<_ACEOF
18865/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018866
18867#include "confdefs.h"
18868#include <sys/file.h>
18869
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018870int
18871main ()
18872{
18873void* p = flock
18874 ;
18875 return 0;
18876}
18877_ACEOF
18878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018879if { (ac_try="$ac_compile"
18880case "(($ac_try" in
18881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18882 *) ac_try_echo=$ac_try;;
18883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018887 grep -v '^ *+' conftest.er1 >conftest.err
18888 rm -f conftest.er1
18889 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018891 (exit $ac_status); } && {
18892 test -z "$ac_c_werror_flag" ||
18893 test ! -s conftest.err
18894 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018895
18896cat >>confdefs.h <<\_ACEOF
18897#define HAVE_FLOCK 1
18898_ACEOF
18899
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018900 { echo "$as_me:$LINENO: result: yes" >&5
18901echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018904sed 's/^/| /' conftest.$ac_ext >&5
18905
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018906 { echo "$as_me:$LINENO: result: no" >&5
18907echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018908
18909fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018910
Martin v. Löwiseba40652007-08-30 20:10:57 +000018911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018913{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18914echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018916/* confdefs.h. */
18917_ACEOF
18918cat confdefs.h >>conftest.$ac_ext
18919cat >>conftest.$ac_ext <<_ACEOF
18920/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018921
18922#include "confdefs.h"
18923#include <unistd.h>
18924
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018925int
18926main ()
18927{
18928void* p = getpagesize
18929 ;
18930 return 0;
18931}
18932_ACEOF
18933rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018934if { (ac_try="$ac_compile"
18935case "(($ac_try" in
18936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18937 *) ac_try_echo=$ac_try;;
18938esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018942 grep -v '^ *+' conftest.er1 >conftest.err
18943 rm -f conftest.er1
18944 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018946 (exit $ac_status); } && {
18947 test -z "$ac_c_werror_flag" ||
18948 test ! -s conftest.err
18949 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018950
18951cat >>confdefs.h <<\_ACEOF
18952#define HAVE_GETPAGESIZE 1
18953_ACEOF
18954
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018955 { echo "$as_me:$LINENO: result: yes" >&5
18956echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018959sed 's/^/| /' conftest.$ac_ext >&5
18960
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018961 { echo "$as_me:$LINENO: result: no" >&5
18962echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018963
18964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018965
18966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018967
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018968for ac_prog in true
18969do
18970 # Extract the first word of "$ac_prog", so it can be a program name with args.
18971set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018972{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18973echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018974if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018975 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018976else
18977 if test -n "$TRUE"; then
18978 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18979else
18980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18981for as_dir in $PATH
18982do
18983 IFS=$as_save_IFS
18984 test -z "$as_dir" && as_dir=.
18985 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018986 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 +000018987 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018988 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018989 break 2
18990 fi
18991done
18992done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018993IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018994
18995fi
18996fi
18997TRUE=$ac_cv_prog_TRUE
18998if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018999 { echo "$as_me:$LINENO: result: $TRUE" >&5
19000echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019001else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019002 { echo "$as_me:$LINENO: result: no" >&5
19003echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019004fi
19005
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019007 test -n "$TRUE" && break
19008done
19009test -n "$TRUE" || TRUE="/bin/true"
19010
19011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019012{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19013echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019014if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019016else
19017 ac_check_lib_save_LIBS=$LIBS
19018LIBS="-lc $LIBS"
19019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019020/* confdefs.h. */
19021_ACEOF
19022cat confdefs.h >>conftest.$ac_ext
19023cat >>conftest.$ac_ext <<_ACEOF
19024/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019025
Martin v. Löwiseba40652007-08-30 20:10:57 +000019026/* Override any GCC internal prototype to avoid an error.
19027 Use char because int might match the return type of a GCC
19028 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019029#ifdef __cplusplus
19030extern "C"
19031#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019032char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019033int
19034main ()
19035{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019036return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019037 ;
19038 return 0;
19039}
19040_ACEOF
19041rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019042if { (ac_try="$ac_link"
19043case "(($ac_try" in
19044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19045 *) ac_try_echo=$ac_try;;
19046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019048 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019050 grep -v '^ *+' conftest.er1 >conftest.err
19051 rm -f conftest.er1
19052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019054 (exit $ac_status); } && {
19055 test -z "$ac_c_werror_flag" ||
19056 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019057 } && test -s conftest$ac_exeext &&
19058 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019059 ac_cv_lib_c_inet_aton=yes
19060else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019062sed 's/^/| /' conftest.$ac_ext >&5
19063
Martin v. Löwiseba40652007-08-30 20:10:57 +000019064 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066
19067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019069LIBS=$ac_check_lib_save_LIBS
19070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019071{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19072echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19073if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019074 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019075else
19076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019077{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19078echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019079if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019080 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019081else
19082 ac_check_lib_save_LIBS=$LIBS
19083LIBS="-lresolv $LIBS"
19084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019085/* confdefs.h. */
19086_ACEOF
19087cat confdefs.h >>conftest.$ac_ext
19088cat >>conftest.$ac_ext <<_ACEOF
19089/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019090
Martin v. Löwiseba40652007-08-30 20:10:57 +000019091/* Override any GCC internal prototype to avoid an error.
19092 Use char because int might match the return type of a GCC
19093 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019094#ifdef __cplusplus
19095extern "C"
19096#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019097char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019098int
19099main ()
19100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019102 ;
19103 return 0;
19104}
19105_ACEOF
19106rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019107if { (ac_try="$ac_link"
19108case "(($ac_try" in
19109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19110 *) ac_try_echo=$ac_try;;
19111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019113 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019115 grep -v '^ *+' conftest.er1 >conftest.err
19116 rm -f conftest.er1
19117 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019119 (exit $ac_status); } && {
19120 test -z "$ac_c_werror_flag" ||
19121 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019122 } && test -s conftest$ac_exeext &&
19123 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019124 ac_cv_lib_resolv_inet_aton=yes
19125else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019126 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019127sed 's/^/| /' conftest.$ac_ext >&5
19128
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131
19132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019134LIBS=$ac_check_lib_save_LIBS
19135fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019136{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19137echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19138if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019139 cat >>confdefs.h <<_ACEOF
19140#define HAVE_LIBRESOLV 1
19141_ACEOF
19142
19143 LIBS="-lresolv $LIBS"
19144
19145fi
19146
19147
19148fi
19149
19150
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019151# On Tru64, chflags seems to be present, but calling it will
19152# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019153{ echo "$as_me:$LINENO: checking for chflags" >&5
19154echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019155if test "${ac_cv_have_chflags+set}" = set; then
19156 echo $ECHO_N "(cached) $ECHO_C" >&6
19157else
19158 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019159 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019160else
19161 cat >conftest.$ac_ext <<_ACEOF
19162/* confdefs.h. */
19163_ACEOF
19164cat confdefs.h >>conftest.$ac_ext
19165cat >>conftest.$ac_ext <<_ACEOF
19166/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019167[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019168#include <sys/stat.h>
19169#include <unistd.h>
19170int main(int argc, char*argv[])
19171{
19172 if(chflags(argv[0], 0) != 0)
19173 return 1;
19174 return 0;
19175}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019176]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019177_ACEOF
19178rm -f conftest$ac_exeext
19179if { (ac_try="$ac_link"
19180case "(($ac_try" in
19181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19182 *) ac_try_echo=$ac_try;;
19183esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019185 (eval "$ac_link") 2>&5
19186 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019188 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19189 { (case "(($ac_try" in
19190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19191 *) ac_try_echo=$ac_try;;
19192esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019194 (eval "$ac_try") 2>&5
19195 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019197 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019198 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019199else
19200 echo "$as_me: program exited with status $ac_status" >&5
19201echo "$as_me: failed program was:" >&5
19202sed 's/^/| /' conftest.$ac_ext >&5
19203
19204( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019205ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019206fi
19207rm -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 +000019208fi
19209
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019210
19211
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019212fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019213{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19214echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019215if test "$ac_cv_have_chflags" = cross ; then
19216 { echo "$as_me:$LINENO: checking for chflags" >&5
19217echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19218if test "${ac_cv_func_chflags+set}" = set; then
19219 echo $ECHO_N "(cached) $ECHO_C" >&6
19220else
19221 cat >conftest.$ac_ext <<_ACEOF
19222/* confdefs.h. */
19223_ACEOF
19224cat confdefs.h >>conftest.$ac_ext
19225cat >>conftest.$ac_ext <<_ACEOF
19226/* end confdefs.h. */
19227/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19228 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19229#define chflags innocuous_chflags
19230
19231/* System header to define __stub macros and hopefully few prototypes,
19232 which can conflict with char chflags (); below.
19233 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19234 <limits.h> exists even on freestanding compilers. */
19235
19236#ifdef __STDC__
19237# include <limits.h>
19238#else
19239# include <assert.h>
19240#endif
19241
19242#undef chflags
19243
19244/* Override any GCC internal prototype to avoid an error.
19245 Use char because int might match the return type of a GCC
19246 builtin and then its argument prototype would still apply. */
19247#ifdef __cplusplus
19248extern "C"
19249#endif
19250char chflags ();
19251/* The GNU C library defines this for functions which it implements
19252 to always fail with ENOSYS. Some functions are actually named
19253 something starting with __ and the normal name is an alias. */
19254#if defined __stub_chflags || defined __stub___chflags
19255choke me
19256#endif
19257
19258int
19259main ()
19260{
19261return chflags ();
19262 ;
19263 return 0;
19264}
19265_ACEOF
19266rm -f conftest.$ac_objext conftest$ac_exeext
19267if { (ac_try="$ac_link"
19268case "(($ac_try" in
19269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19270 *) ac_try_echo=$ac_try;;
19271esac
19272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19273 (eval "$ac_link") 2>conftest.er1
19274 ac_status=$?
19275 grep -v '^ *+' conftest.er1 >conftest.err
19276 rm -f conftest.er1
19277 cat conftest.err >&5
19278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19279 (exit $ac_status); } && {
19280 test -z "$ac_c_werror_flag" ||
19281 test ! -s conftest.err
19282 } && test -s conftest$ac_exeext &&
19283 $as_test_x conftest$ac_exeext; then
19284 ac_cv_func_chflags=yes
19285else
19286 echo "$as_me: failed program was:" >&5
19287sed 's/^/| /' conftest.$ac_ext >&5
19288
19289 ac_cv_func_chflags=no
19290fi
19291
19292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19293 conftest$ac_exeext conftest.$ac_ext
19294fi
19295{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19296echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19297if test $ac_cv_func_chflags = yes; then
19298 ac_cv_have_chflags="yes"
19299else
19300 ac_cv_have_chflags="no"
19301fi
19302
19303fi
19304if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019305
19306cat >>confdefs.h <<\_ACEOF
19307#define HAVE_CHFLAGS 1
19308_ACEOF
19309
19310fi
19311
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019312{ echo "$as_me:$LINENO: checking for lchflags" >&5
19313echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019314if test "${ac_cv_have_lchflags+set}" = set; then
19315 echo $ECHO_N "(cached) $ECHO_C" >&6
19316else
19317 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019318 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019319else
19320 cat >conftest.$ac_ext <<_ACEOF
19321/* confdefs.h. */
19322_ACEOF
19323cat confdefs.h >>conftest.$ac_ext
19324cat >>conftest.$ac_ext <<_ACEOF
19325/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019326[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019327#include <sys/stat.h>
19328#include <unistd.h>
19329int main(int argc, char*argv[])
19330{
19331 if(lchflags(argv[0], 0) != 0)
19332 return 1;
19333 return 0;
19334}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019335]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019336_ACEOF
19337rm -f conftest$ac_exeext
19338if { (ac_try="$ac_link"
19339case "(($ac_try" in
19340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19341 *) ac_try_echo=$ac_try;;
19342esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019344 (eval "$ac_link") 2>&5
19345 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19348 { (case "(($ac_try" in
19349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19350 *) ac_try_echo=$ac_try;;
19351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019353 (eval "$ac_try") 2>&5
19354 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019356 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019357 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019358else
19359 echo "$as_me: program exited with status $ac_status" >&5
19360echo "$as_me: failed program was:" >&5
19361sed 's/^/| /' conftest.$ac_ext >&5
19362
19363( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019364ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019365fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19367fi
19368
19369
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019370
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019371fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019372{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19373echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019374if test "$ac_cv_have_lchflags" = cross ; then
19375 { echo "$as_me:$LINENO: checking for lchflags" >&5
19376echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19377if test "${ac_cv_func_lchflags+set}" = set; then
19378 echo $ECHO_N "(cached) $ECHO_C" >&6
19379else
19380 cat >conftest.$ac_ext <<_ACEOF
19381/* confdefs.h. */
19382_ACEOF
19383cat confdefs.h >>conftest.$ac_ext
19384cat >>conftest.$ac_ext <<_ACEOF
19385/* end confdefs.h. */
19386/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19387 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19388#define lchflags innocuous_lchflags
19389
19390/* System header to define __stub macros and hopefully few prototypes,
19391 which can conflict with char lchflags (); below.
19392 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19393 <limits.h> exists even on freestanding compilers. */
19394
19395#ifdef __STDC__
19396# include <limits.h>
19397#else
19398# include <assert.h>
19399#endif
19400
19401#undef lchflags
19402
19403/* Override any GCC internal prototype to avoid an error.
19404 Use char because int might match the return type of a GCC
19405 builtin and then its argument prototype would still apply. */
19406#ifdef __cplusplus
19407extern "C"
19408#endif
19409char lchflags ();
19410/* The GNU C library defines this for functions which it implements
19411 to always fail with ENOSYS. Some functions are actually named
19412 something starting with __ and the normal name is an alias. */
19413#if defined __stub_lchflags || defined __stub___lchflags
19414choke me
19415#endif
19416
19417int
19418main ()
19419{
19420return lchflags ();
19421 ;
19422 return 0;
19423}
19424_ACEOF
19425rm -f conftest.$ac_objext conftest$ac_exeext
19426if { (ac_try="$ac_link"
19427case "(($ac_try" in
19428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19429 *) ac_try_echo=$ac_try;;
19430esac
19431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19432 (eval "$ac_link") 2>conftest.er1
19433 ac_status=$?
19434 grep -v '^ *+' conftest.er1 >conftest.err
19435 rm -f conftest.er1
19436 cat conftest.err >&5
19437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19438 (exit $ac_status); } && {
19439 test -z "$ac_c_werror_flag" ||
19440 test ! -s conftest.err
19441 } && test -s conftest$ac_exeext &&
19442 $as_test_x conftest$ac_exeext; then
19443 ac_cv_func_lchflags=yes
19444else
19445 echo "$as_me: failed program was:" >&5
19446sed 's/^/| /' conftest.$ac_ext >&5
19447
19448 ac_cv_func_lchflags=no
19449fi
19450
19451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19452 conftest$ac_exeext conftest.$ac_ext
19453fi
19454{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19455echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19456if test $ac_cv_func_lchflags = yes; then
19457 ac_cv_have_lchflags="yes"
19458else
19459 ac_cv_have_lchflags="no"
19460fi
19461
19462fi
19463if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019464
19465cat >>confdefs.h <<\_ACEOF
19466#define HAVE_LCHFLAGS 1
19467_ACEOF
19468
19469fi
19470
Ronald Oussorenf8752642006-07-06 10:13:35 +000019471case $ac_sys_system/$ac_sys_release in
19472Darwin/*)
19473 _CUR_CFLAGS="${CFLAGS}"
19474 _CUR_LDFLAGS="${LDFLAGS}"
19475 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19476 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19477 ;;
19478esac
19479
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019480{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19481echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019482if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019483 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019484else
19485 ac_check_lib_save_LIBS=$LIBS
19486LIBS="-lz $LIBS"
19487cat >conftest.$ac_ext <<_ACEOF
19488/* confdefs.h. */
19489_ACEOF
19490cat confdefs.h >>conftest.$ac_ext
19491cat >>conftest.$ac_ext <<_ACEOF
19492/* end confdefs.h. */
19493
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494/* Override any GCC internal prototype to avoid an error.
19495 Use char because int might match the return type of a GCC
19496 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019497#ifdef __cplusplus
19498extern "C"
19499#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019500char inflateCopy ();
19501int
19502main ()
19503{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019504return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019505 ;
19506 return 0;
19507}
19508_ACEOF
19509rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510if { (ac_try="$ac_link"
19511case "(($ac_try" in
19512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19513 *) ac_try_echo=$ac_try;;
19514esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019516 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019517 ac_status=$?
19518 grep -v '^ *+' conftest.er1 >conftest.err
19519 rm -f conftest.er1
19520 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019522 (exit $ac_status); } && {
19523 test -z "$ac_c_werror_flag" ||
19524 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019525 } && test -s conftest$ac_exeext &&
19526 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019527 ac_cv_lib_z_inflateCopy=yes
19528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019529 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019530sed 's/^/| /' conftest.$ac_ext >&5
19531
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019534
19535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019536 conftest$ac_exeext conftest.$ac_ext
19537LIBS=$ac_check_lib_save_LIBS
19538fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019539{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19540echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19541if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019542
19543cat >>confdefs.h <<\_ACEOF
19544#define HAVE_ZLIB_COPY 1
19545_ACEOF
19546
19547fi
19548
19549
Ronald Oussorenf8752642006-07-06 10:13:35 +000019550case $ac_sys_system/$ac_sys_release in
19551Darwin/*)
19552 CFLAGS="${_CUR_CFLAGS}"
19553 LDFLAGS="${_CUR_LDFLAGS}"
19554 ;;
19555esac
19556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019557{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19558echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019560/* confdefs.h. */
19561_ACEOF
19562cat confdefs.h >>conftest.$ac_ext
19563cat >>conftest.$ac_ext <<_ACEOF
19564/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019565
19566#include "confdefs.h"
19567#include <netdb.h>
19568
Martin v. Löwise9416172003-05-03 10:12:45 +000019569int
19570main ()
19571{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019572void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019573 ;
19574 return 0;
19575}
19576_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019577rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578if { (ac_try="$ac_link"
19579case "(($ac_try" in
19580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19581 *) ac_try_echo=$ac_try;;
19582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019584 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019586 grep -v '^ *+' conftest.er1 >conftest.err
19587 rm -f conftest.er1
19588 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019590 (exit $ac_status); } && {
19591 test -z "$ac_c_werror_flag" ||
19592 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019593 } && test -s conftest$ac_exeext &&
19594 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019595
19596cat >>confdefs.h <<\_ACEOF
19597#define HAVE_HSTRERROR 1
19598_ACEOF
19599
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019600 { echo "$as_me:$LINENO: result: yes" >&5
19601echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019602else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019604sed 's/^/| /' conftest.$ac_ext >&5
19605
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019606 { echo "$as_me:$LINENO: result: no" >&5
19607echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019608
19609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610
19611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019614{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19615echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019617/* confdefs.h. */
19618_ACEOF
19619cat confdefs.h >>conftest.$ac_ext
19620cat >>conftest.$ac_ext <<_ACEOF
19621/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019622
19623#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019624#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019625#include <sys/socket.h>
19626#include <netinet/in.h>
19627#include <arpa/inet.h>
19628
Martin v. Löwise9416172003-05-03 10:12:45 +000019629int
19630main ()
19631{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019632void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019633 ;
19634 return 0;
19635}
19636_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019637rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638if { (ac_try="$ac_link"
19639case "(($ac_try" in
19640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19641 *) ac_try_echo=$ac_try;;
19642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019644 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019646 grep -v '^ *+' conftest.er1 >conftest.err
19647 rm -f conftest.er1
19648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650 (exit $ac_status); } && {
19651 test -z "$ac_c_werror_flag" ||
19652 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019653 } && test -s conftest$ac_exeext &&
19654 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019655
19656cat >>confdefs.h <<\_ACEOF
19657#define HAVE_INET_ATON 1
19658_ACEOF
19659
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019660 { echo "$as_me:$LINENO: result: yes" >&5
19661echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019662else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019664sed 's/^/| /' conftest.$ac_ext >&5
19665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019666 { echo "$as_me:$LINENO: result: no" >&5
19667echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019668
19669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670
19671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019673
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019674{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19675echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019682
19683#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019684#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019685#include <sys/socket.h>
19686#include <netinet/in.h>
19687#include <arpa/inet.h>
19688
Martin v. Löwise9416172003-05-03 10:12:45 +000019689int
19690main ()
19691{
19692void* p = inet_pton
19693 ;
19694 return 0;
19695}
19696_ACEOF
19697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019698if { (ac_try="$ac_compile"
19699case "(($ac_try" in
19700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19701 *) ac_try_echo=$ac_try;;
19702esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019706 grep -v '^ *+' conftest.er1 >conftest.err
19707 rm -f conftest.er1
19708 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019710 (exit $ac_status); } && {
19711 test -z "$ac_c_werror_flag" ||
19712 test ! -s conftest.err
19713 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019714
19715cat >>confdefs.h <<\_ACEOF
19716#define HAVE_INET_PTON 1
19717_ACEOF
19718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019719 { echo "$as_me:$LINENO: result: yes" >&5
19720echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019721else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019723sed 's/^/| /' conftest.$ac_ext >&5
19724
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019725 { echo "$as_me:$LINENO: result: no" >&5
19726echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019727
19728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019729
19730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019731
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019732# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019733{ echo "$as_me:$LINENO: checking for setgroups" >&5
19734echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019736/* confdefs.h. */
19737_ACEOF
19738cat confdefs.h >>conftest.$ac_ext
19739cat >>conftest.$ac_ext <<_ACEOF
19740/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019741
19742#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019743#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019744#ifdef HAVE_GRP_H
19745#include <grp.h>
19746#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019747
Martin v. Löwisd5843682002-11-21 20:41:28 +000019748int
19749main ()
19750{
19751void* p = setgroups
19752 ;
19753 return 0;
19754}
19755_ACEOF
19756rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019757if { (ac_try="$ac_compile"
19758case "(($ac_try" in
19759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19760 *) ac_try_echo=$ac_try;;
19761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019765 grep -v '^ *+' conftest.er1 >conftest.err
19766 rm -f conftest.er1
19767 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019769 (exit $ac_status); } && {
19770 test -z "$ac_c_werror_flag" ||
19771 test ! -s conftest.err
19772 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019773
19774cat >>confdefs.h <<\_ACEOF
19775#define HAVE_SETGROUPS 1
19776_ACEOF
19777
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019778 { echo "$as_me:$LINENO: result: yes" >&5
19779echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019780else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019782sed 's/^/| /' conftest.$ac_ext >&5
19783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019784 { echo "$as_me:$LINENO: result: no" >&5
19785echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019786
19787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019788
19789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019790
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019791# check for openpty and forkpty
19792
Martin v. Löwis11437992002-04-12 09:54:03 +000019793
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019794for ac_func in openpty
19795do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19797{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019801else
Martin v. Löwis11437992002-04-12 09:54:03 +000019802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019803/* confdefs.h. */
19804_ACEOF
19805cat confdefs.h >>conftest.$ac_ext
19806cat >>conftest.$ac_ext <<_ACEOF
19807/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019808/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19809 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19810#define $ac_func innocuous_$ac_func
19811
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019812/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019813 which can conflict with char $ac_func (); below.
19814 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019815 <limits.h> exists even on freestanding compilers. */
19816
19817#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019818# include <limits.h>
19819#else
19820# include <assert.h>
19821#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019822
19823#undef $ac_func
19824
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825/* Override any GCC internal prototype to avoid an error.
19826 Use char because int might match the return type of a GCC
19827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019828#ifdef __cplusplus
19829extern "C"
19830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019831char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019832/* The GNU C library defines this for functions which it implements
19833 to always fail with ENOSYS. Some functions are actually named
19834 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019836choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019837#endif
19838
Skip Montanaro6dead952003-09-25 14:50:04 +000019839int
19840main ()
19841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019842return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019843 ;
19844 return 0;
19845}
19846_ACEOF
19847rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848if { (ac_try="$ac_link"
19849case "(($ac_try" in
19850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19851 *) ac_try_echo=$ac_try;;
19852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019856 grep -v '^ *+' conftest.er1 >conftest.err
19857 rm -f conftest.er1
19858 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860 (exit $ac_status); } && {
19861 test -z "$ac_c_werror_flag" ||
19862 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019863 } && test -s conftest$ac_exeext &&
19864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019868sed 's/^/| /' conftest.$ac_ext >&5
19869
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019872
19873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019874 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019876ac_res=`eval echo '${'$as_ac_var'}'`
19877 { echo "$as_me:$LINENO: result: $ac_res" >&5
19878echo "${ECHO_T}$ac_res" >&6; }
19879if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019881#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019882_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019884else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019885 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19886echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019887if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019888 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019889else
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019891LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019893/* confdefs.h. */
19894_ACEOF
19895cat confdefs.h >>conftest.$ac_ext
19896cat >>conftest.$ac_ext <<_ACEOF
19897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019898
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899/* Override any GCC internal prototype to avoid an error.
19900 Use char because int might match the return type of a GCC
19901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019902#ifdef __cplusplus
19903extern "C"
19904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019905char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019906int
19907main ()
19908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019909return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019910 ;
19911 return 0;
19912}
19913_ACEOF
19914rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019915if { (ac_try="$ac_link"
19916case "(($ac_try" in
19917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19918 *) ac_try_echo=$ac_try;;
19919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019921 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019923 grep -v '^ *+' conftest.er1 >conftest.err
19924 rm -f conftest.er1
19925 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 (exit $ac_status); } && {
19928 test -z "$ac_c_werror_flag" ||
19929 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019930 } && test -s conftest$ac_exeext &&
19931 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019932 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019935sed 's/^/| /' conftest.$ac_ext >&5
19936
Martin v. Löwiseba40652007-08-30 20:10:57 +000019937 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019939
19940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019942LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019943fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019944{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19945echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19946if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019948#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019949_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019950 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019952 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19953echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019954if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019956else
19957 ac_check_lib_save_LIBS=$LIBS
19958LIBS="-lbsd $LIBS"
19959cat >conftest.$ac_ext <<_ACEOF
19960/* confdefs.h. */
19961_ACEOF
19962cat confdefs.h >>conftest.$ac_ext
19963cat >>conftest.$ac_ext <<_ACEOF
19964/* end confdefs.h. */
19965
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966/* Override any GCC internal prototype to avoid an error.
19967 Use char because int might match the return type of a GCC
19968 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019969#ifdef __cplusplus
19970extern "C"
19971#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019972char openpty ();
19973int
19974main ()
19975{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019976return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019977 ;
19978 return 0;
19979}
19980_ACEOF
19981rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019982if { (ac_try="$ac_link"
19983case "(($ac_try" in
19984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19985 *) ac_try_echo=$ac_try;;
19986esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019989 ac_status=$?
19990 grep -v '^ *+' conftest.er1 >conftest.err
19991 rm -f conftest.er1
19992 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019994 (exit $ac_status); } && {
19995 test -z "$ac_c_werror_flag" ||
19996 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019997 } && test -s conftest$ac_exeext &&
19998 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019999 ac_cv_lib_bsd_openpty=yes
20000else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020001 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020002sed 's/^/| /' conftest.$ac_ext >&5
20003
Martin v. Löwiseba40652007-08-30 20:10:57 +000020004 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020005fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006
20007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020008 conftest$ac_exeext conftest.$ac_ext
20009LIBS=$ac_check_lib_save_LIBS
20010fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020011{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20012echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20013if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020014 cat >>confdefs.h <<\_ACEOF
20015#define HAVE_OPENPTY 1
20016_ACEOF
20017 LIBS="$LIBS -lbsd"
20018fi
20019
20020
20021fi
20022
Fred Drake8cef4cf2000-06-28 16:40:38 +000020023
20024fi
20025done
20026
Martin v. Löwis11437992002-04-12 09:54:03 +000020027
Fred Drake8cef4cf2000-06-28 16:40:38 +000020028for ac_func in forkpty
20029do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020030as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20031{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20032echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020034 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020035else
Martin v. Löwis11437992002-04-12 09:54:03 +000020036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020037/* confdefs.h. */
20038_ACEOF
20039cat confdefs.h >>conftest.$ac_ext
20040cat >>conftest.$ac_ext <<_ACEOF
20041/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020042/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20043 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20044#define $ac_func innocuous_$ac_func
20045
Fred Drake8cef4cf2000-06-28 16:40:38 +000020046/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020047 which can conflict with char $ac_func (); below.
20048 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020049 <limits.h> exists even on freestanding compilers. */
20050
20051#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020052# include <limits.h>
20053#else
20054# include <assert.h>
20055#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020056
20057#undef $ac_func
20058
Martin v. Löwiseba40652007-08-30 20:10:57 +000020059/* Override any GCC internal prototype to avoid an error.
20060 Use char because int might match the return type of a GCC
20061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020062#ifdef __cplusplus
20063extern "C"
20064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020065char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020066/* The GNU C library defines this for functions which it implements
20067 to always fail with ENOSYS. Some functions are actually named
20068 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020070choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020071#endif
20072
Skip Montanaro6dead952003-09-25 14:50:04 +000020073int
20074main ()
20075{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020076return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ;
20078 return 0;
20079}
20080_ACEOF
20081rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082if { (ac_try="$ac_link"
20083case "(($ac_try" in
20084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20085 *) ac_try_echo=$ac_try;;
20086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020088 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020090 grep -v '^ *+' conftest.er1 >conftest.err
20091 rm -f conftest.er1
20092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020094 (exit $ac_status); } && {
20095 test -z "$ac_c_werror_flag" ||
20096 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020097 } && test -s conftest$ac_exeext &&
20098 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020100else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020102sed 's/^/| /' conftest.$ac_ext >&5
20103
Martin v. Löwiseba40652007-08-30 20:10:57 +000020104 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020106
20107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020108 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020110ac_res=`eval echo '${'$as_ac_var'}'`
20111 { echo "$as_me:$LINENO: result: $ac_res" >&5
20112echo "${ECHO_T}$ac_res" >&6; }
20113if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020114 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020115#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020116_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020117
Fred Drake8cef4cf2000-06-28 16:40:38 +000020118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020119 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20120echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020121if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020122 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020123else
Martin v. Löwis11437992002-04-12 09:54:03 +000020124 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020125LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020127/* confdefs.h. */
20128_ACEOF
20129cat confdefs.h >>conftest.$ac_ext
20130cat >>conftest.$ac_ext <<_ACEOF
20131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133/* Override any GCC internal prototype to avoid an error.
20134 Use char because int might match the return type of a GCC
20135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020136#ifdef __cplusplus
20137extern "C"
20138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020139char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020140int
20141main ()
20142{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020143return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 ;
20145 return 0;
20146}
20147_ACEOF
20148rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020149if { (ac_try="$ac_link"
20150case "(($ac_try" in
20151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20152 *) ac_try_echo=$ac_try;;
20153esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020157 grep -v '^ *+' conftest.er1 >conftest.err
20158 rm -f conftest.er1
20159 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161 (exit $ac_status); } && {
20162 test -z "$ac_c_werror_flag" ||
20163 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020164 } && test -s conftest$ac_exeext &&
20165 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020166 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020167else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020169sed 's/^/| /' conftest.$ac_ext >&5
20170
Martin v. Löwiseba40652007-08-30 20:10:57 +000020171 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020173
20174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020176LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020177fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020178{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20179echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20180if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020181 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020182#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020183_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020184 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020185else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020186 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20187echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020188if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020189 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020190else
20191 ac_check_lib_save_LIBS=$LIBS
20192LIBS="-lbsd $LIBS"
20193cat >conftest.$ac_ext <<_ACEOF
20194/* confdefs.h. */
20195_ACEOF
20196cat confdefs.h >>conftest.$ac_ext
20197cat >>conftest.$ac_ext <<_ACEOF
20198/* end confdefs.h. */
20199
Martin v. Löwiseba40652007-08-30 20:10:57 +000020200/* Override any GCC internal prototype to avoid an error.
20201 Use char because int might match the return type of a GCC
20202 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020203#ifdef __cplusplus
20204extern "C"
20205#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020206char forkpty ();
20207int
20208main ()
20209{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020210return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020211 ;
20212 return 0;
20213}
20214_ACEOF
20215rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020216if { (ac_try="$ac_link"
20217case "(($ac_try" in
20218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20219 *) ac_try_echo=$ac_try;;
20220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020223 ac_status=$?
20224 grep -v '^ *+' conftest.er1 >conftest.err
20225 rm -f conftest.er1
20226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020228 (exit $ac_status); } && {
20229 test -z "$ac_c_werror_flag" ||
20230 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020231 } && test -s conftest$ac_exeext &&
20232 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020233 ac_cv_lib_bsd_forkpty=yes
20234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020235 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020236sed 's/^/| /' conftest.$ac_ext >&5
20237
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020240
20241rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020242 conftest$ac_exeext conftest.$ac_ext
20243LIBS=$ac_check_lib_save_LIBS
20244fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020245{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20246echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20247if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020248 cat >>confdefs.h <<\_ACEOF
20249#define HAVE_FORKPTY 1
20250_ACEOF
20251 LIBS="$LIBS -lbsd"
20252fi
20253
20254
20255fi
20256
Fred Drake8cef4cf2000-06-28 16:40:38 +000020257
20258fi
20259done
20260
Jack Jansendd19cf82001-12-06 22:36:17 +000020261
Brett Cannonaa5778d2008-03-18 04:09:00 +000020262# Stuff for expat.
20263
20264for ac_func in memmove
20265do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020266as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20267{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20268echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020269if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020270 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020271else
20272 cat >conftest.$ac_ext <<_ACEOF
20273/* confdefs.h. */
20274_ACEOF
20275cat confdefs.h >>conftest.$ac_ext
20276cat >>conftest.$ac_ext <<_ACEOF
20277/* end confdefs.h. */
20278/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20280#define $ac_func innocuous_$ac_func
20281
20282/* System header to define __stub macros and hopefully few prototypes,
20283 which can conflict with char $ac_func (); below.
20284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20285 <limits.h> exists even on freestanding compilers. */
20286
20287#ifdef __STDC__
20288# include <limits.h>
20289#else
20290# include <assert.h>
20291#endif
20292
20293#undef $ac_func
20294
20295/* Override any GCC internal prototype to avoid an error.
20296 Use char because int might match the return type of a GCC
20297 builtin and then its argument prototype would still apply. */
20298#ifdef __cplusplus
20299extern "C"
20300#endif
20301char $ac_func ();
20302/* The GNU C library defines this for functions which it implements
20303 to always fail with ENOSYS. Some functions are actually named
20304 something starting with __ and the normal name is an alias. */
20305#if defined __stub_$ac_func || defined __stub___$ac_func
20306choke me
20307#endif
20308
20309int
20310main ()
20311{
20312return $ac_func ();
20313 ;
20314 return 0;
20315}
20316_ACEOF
20317rm -f conftest.$ac_objext conftest$ac_exeext
20318if { (ac_try="$ac_link"
20319case "(($ac_try" in
20320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20321 *) ac_try_echo=$ac_try;;
20322esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020324 (eval "$ac_link") 2>conftest.er1
20325 ac_status=$?
20326 grep -v '^ *+' conftest.er1 >conftest.err
20327 rm -f conftest.er1
20328 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020330 (exit $ac_status); } && {
20331 test -z "$ac_c_werror_flag" ||
20332 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020333 } && test -s conftest$ac_exeext &&
20334 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020335 eval "$as_ac_var=yes"
20336else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020337 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020338sed 's/^/| /' conftest.$ac_ext >&5
20339
20340 eval "$as_ac_var=no"
20341fi
20342
20343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20344 conftest$ac_exeext conftest.$ac_ext
20345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020346ac_res=`eval echo '${'$as_ac_var'}'`
20347 { echo "$as_me:$LINENO: result: $ac_res" >&5
20348echo "${ECHO_T}$ac_res" >&6; }
20349if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020350 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020351#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020352_ACEOF
20353
20354fi
20355done
20356
20357
Michael W. Hudson54241132001-12-07 15:38:26 +000020358# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020359
20360
20361
20362
20363
20364
Fred Drake8cef4cf2000-06-28 16:40:38 +000020365for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20366do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20368{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020370if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020372else
Martin v. Löwis11437992002-04-12 09:54:03 +000020373 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020374/* confdefs.h. */
20375_ACEOF
20376cat confdefs.h >>conftest.$ac_ext
20377cat >>conftest.$ac_ext <<_ACEOF
20378/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020379/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20380 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20381#define $ac_func innocuous_$ac_func
20382
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020383/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020384 which can conflict with char $ac_func (); below.
20385 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020386 <limits.h> exists even on freestanding compilers. */
20387
20388#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020389# include <limits.h>
20390#else
20391# include <assert.h>
20392#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020393
20394#undef $ac_func
20395
Martin v. Löwiseba40652007-08-30 20:10:57 +000020396/* Override any GCC internal prototype to avoid an error.
20397 Use char because int might match the return type of a GCC
20398 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020399#ifdef __cplusplus
20400extern "C"
20401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020402char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020403/* The GNU C library defines this for functions which it implements
20404 to always fail with ENOSYS. Some functions are actually named
20405 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020406#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020407choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020408#endif
20409
Skip Montanaro6dead952003-09-25 14:50:04 +000020410int
20411main ()
20412{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020413return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020414 ;
20415 return 0;
20416}
20417_ACEOF
20418rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020419if { (ac_try="$ac_link"
20420case "(($ac_try" in
20421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422 *) ac_try_echo=$ac_try;;
20423esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020425 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020427 grep -v '^ *+' conftest.er1 >conftest.err
20428 rm -f conftest.er1
20429 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020431 (exit $ac_status); } && {
20432 test -z "$ac_c_werror_flag" ||
20433 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020434 } && test -s conftest$ac_exeext &&
20435 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020436 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020439sed 's/^/| /' conftest.$ac_ext >&5
20440
Martin v. Löwiseba40652007-08-30 20:10:57 +000020441 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020443
20444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020445 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020446fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020447ac_res=`eval echo '${'$as_ac_var'}'`
20448 { echo "$as_me:$LINENO: result: $ac_res" >&5
20449echo "${ECHO_T}$ac_res" >&6; }
20450if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020452#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020453_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020455fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020456done
20457
Michael W. Hudson54241132001-12-07 15:38:26 +000020458
Martin v. Löwis11437992002-04-12 09:54:03 +000020459
20460
20461
Brett Cannonaa5778d2008-03-18 04:09:00 +000020462for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020463do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020464as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20465{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20466echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020467if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020469else
Martin v. Löwis11437992002-04-12 09:54:03 +000020470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020471/* confdefs.h. */
20472_ACEOF
20473cat confdefs.h >>conftest.$ac_ext
20474cat >>conftest.$ac_ext <<_ACEOF
20475/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020476/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20477 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20478#define $ac_func innocuous_$ac_func
20479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020480/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020481 which can conflict with char $ac_func (); below.
20482 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020483 <limits.h> exists even on freestanding compilers. */
20484
20485#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020486# include <limits.h>
20487#else
20488# include <assert.h>
20489#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020490
20491#undef $ac_func
20492
Martin v. Löwiseba40652007-08-30 20:10:57 +000020493/* Override any GCC internal prototype to avoid an error.
20494 Use char because int might match the return type of a GCC
20495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020496#ifdef __cplusplus
20497extern "C"
20498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020499char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020500/* The GNU C library defines this for functions which it implements
20501 to always fail with ENOSYS. Some functions are actually named
20502 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020503#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020504choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020505#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020506
Skip Montanaro6dead952003-09-25 14:50:04 +000020507int
20508main ()
20509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020510return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020511 ;
20512 return 0;
20513}
20514_ACEOF
20515rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516if { (ac_try="$ac_link"
20517case "(($ac_try" in
20518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20519 *) ac_try_echo=$ac_try;;
20520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020522 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020524 grep -v '^ *+' conftest.er1 >conftest.err
20525 rm -f conftest.er1
20526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528 (exit $ac_status); } && {
20529 test -z "$ac_c_werror_flag" ||
20530 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020531 } && test -s conftest$ac_exeext &&
20532 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020533 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020536sed 's/^/| /' conftest.$ac_ext >&5
20537
Martin v. Löwiseba40652007-08-30 20:10:57 +000020538 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540
20541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020543fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020544ac_res=`eval echo '${'$as_ac_var'}'`
20545 { echo "$as_me:$LINENO: result: $ac_res" >&5
20546echo "${ECHO_T}$ac_res" >&6; }
20547if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020549#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020550_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020551
Martin v. Löwis1142de32002-03-29 16:28:31 +000020552else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020554 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020555 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20556 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020557esac
20558
Martin v. Löwis1142de32002-03-29 16:28:31 +000020559fi
20560done
20561
20562
Martin v. Löwis11437992002-04-12 09:54:03 +000020563
Martin v. Löwis1142de32002-03-29 16:28:31 +000020564for ac_func in getpgrp
20565do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020566as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20567{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20568echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020569if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020570 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020571else
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020573/* confdefs.h. */
20574_ACEOF
20575cat confdefs.h >>conftest.$ac_ext
20576cat >>conftest.$ac_ext <<_ACEOF
20577/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020578/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20580#define $ac_func innocuous_$ac_func
20581
Martin v. Löwis1142de32002-03-29 16:28:31 +000020582/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020583 which can conflict with char $ac_func (); below.
20584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020585 <limits.h> exists even on freestanding compilers. */
20586
20587#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020588# include <limits.h>
20589#else
20590# include <assert.h>
20591#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020592
20593#undef $ac_func
20594
Martin v. Löwiseba40652007-08-30 20:10:57 +000020595/* Override any GCC internal prototype to avoid an error.
20596 Use char because int might match the return type of a GCC
20597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020598#ifdef __cplusplus
20599extern "C"
20600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020601char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020602/* The GNU C library defines this for functions which it implements
20603 to always fail with ENOSYS. Some functions are actually named
20604 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020606choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020607#endif
20608
Skip Montanaro6dead952003-09-25 14:50:04 +000020609int
20610main ()
20611{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 ;
20614 return 0;
20615}
20616_ACEOF
20617rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618if { (ac_try="$ac_link"
20619case "(($ac_try" in
20620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20621 *) ac_try_echo=$ac_try;;
20622esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020624 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020626 grep -v '^ *+' conftest.er1 >conftest.err
20627 rm -f conftest.er1
20628 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020630 (exit $ac_status); } && {
20631 test -z "$ac_c_werror_flag" ||
20632 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020633 } && test -s conftest$ac_exeext &&
20634 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020635 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020638sed 's/^/| /' conftest.$ac_ext >&5
20639
Martin v. Löwiseba40652007-08-30 20:10:57 +000020640 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642
20643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020644 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020645fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020646ac_res=`eval echo '${'$as_ac_var'}'`
20647 { echo "$as_me:$LINENO: result: $ac_res" >&5
20648echo "${ECHO_T}$ac_res" >&6; }
20649if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020650 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020651#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020652_ACEOF
20653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020654/* confdefs.h. */
20655_ACEOF
20656cat confdefs.h >>conftest.$ac_ext
20657cat >>conftest.$ac_ext <<_ACEOF
20658/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020659#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020660int
20661main ()
20662{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020663getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 ;
20665 return 0;
20666}
20667_ACEOF
20668rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669if { (ac_try="$ac_compile"
20670case "(($ac_try" in
20671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20672 *) ac_try_echo=$ac_try;;
20673esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020677 grep -v '^ *+' conftest.er1 >conftest.err
20678 rm -f conftest.er1
20679 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (exit $ac_status); } && {
20682 test -z "$ac_c_werror_flag" ||
20683 test ! -s conftest.err
20684 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020685
20686cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020687#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020688_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020689
Martin v. Löwis11437992002-04-12 09:54:03 +000020690
Guido van Rossumf78abae1997-01-21 22:02:36 +000020691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020693sed 's/^/| /' conftest.$ac_ext >&5
20694
Martin v. Löwiseba40652007-08-30 20:10:57 +000020695
Guido van Rossum627b2d71993-12-24 10:39:16 +000020696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020697
20698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020699
Guido van Rossum627b2d71993-12-24 10:39:16 +000020700fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020701done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020702
Jack Jansen150753c2003-03-29 22:07:47 +000020703
20704for ac_func in setpgrp
20705do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20707{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020710 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020711else
Martin v. Löwis11437992002-04-12 09:54:03 +000020712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020713/* confdefs.h. */
20714_ACEOF
20715cat confdefs.h >>conftest.$ac_ext
20716cat >>conftest.$ac_ext <<_ACEOF
20717/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020718/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20720#define $ac_func innocuous_$ac_func
20721
Jack Jansen150753c2003-03-29 22:07:47 +000020722/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020723 which can conflict with char $ac_func (); below.
20724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020725 <limits.h> exists even on freestanding compilers. */
20726
20727#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020728# include <limits.h>
20729#else
20730# include <assert.h>
20731#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020732
20733#undef $ac_func
20734
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735/* Override any GCC internal prototype to avoid an error.
20736 Use char because int might match the return type of a GCC
20737 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020738#ifdef __cplusplus
20739extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020740#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020741char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020742/* The GNU C library defines this for functions which it implements
20743 to always fail with ENOSYS. Some functions are actually named
20744 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020746choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020747#endif
20748
Skip Montanaro6dead952003-09-25 14:50:04 +000020749int
20750main ()
20751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020752return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ;
20754 return 0;
20755}
20756_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020757rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758if { (ac_try="$ac_link"
20759case "(($ac_try" in
20760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20761 *) ac_try_echo=$ac_try;;
20762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020764 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020766 grep -v '^ *+' conftest.er1 >conftest.err
20767 rm -f conftest.er1
20768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 (exit $ac_status); } && {
20771 test -z "$ac_c_werror_flag" ||
20772 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020773 } && test -s conftest$ac_exeext &&
20774 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020775 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020778sed 's/^/| /' conftest.$ac_ext >&5
20779
Martin v. Löwiseba40652007-08-30 20:10:57 +000020780 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782
20783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020784 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020785fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020786ac_res=`eval echo '${'$as_ac_var'}'`
20787 { echo "$as_me:$LINENO: result: $ac_res" >&5
20788echo "${ECHO_T}$ac_res" >&6; }
20789if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020790 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020791#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020792_ACEOF
20793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020794/* confdefs.h. */
20795_ACEOF
20796cat confdefs.h >>conftest.$ac_ext
20797cat >>conftest.$ac_ext <<_ACEOF
20798/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020799#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020800int
20801main ()
20802{
20803setpgrp(0,0);
20804 ;
20805 return 0;
20806}
20807_ACEOF
20808rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809if { (ac_try="$ac_compile"
20810case "(($ac_try" in
20811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20812 *) ac_try_echo=$ac_try;;
20813esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020817 grep -v '^ *+' conftest.er1 >conftest.err
20818 rm -f conftest.er1
20819 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821 (exit $ac_status); } && {
20822 test -z "$ac_c_werror_flag" ||
20823 test ! -s conftest.err
20824 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020825
20826cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020827#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020828_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020829
Jack Jansen150753c2003-03-29 22:07:47 +000020830
20831else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020833sed 's/^/| /' conftest.$ac_ext >&5
20834
Martin v. Löwiseba40652007-08-30 20:10:57 +000020835
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837
20838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020839
20840fi
20841done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020842
Martin v. Löwis11437992002-04-12 09:54:03 +000020843
Thomas Wouters3a584202000-08-05 23:28:51 +000020844for ac_func in gettimeofday
20845do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020846as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20847{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20848echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020849if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020851else
Martin v. Löwis11437992002-04-12 09:54:03 +000020852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020853/* confdefs.h. */
20854_ACEOF
20855cat confdefs.h >>conftest.$ac_ext
20856cat >>conftest.$ac_ext <<_ACEOF
20857/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020858/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20859 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20860#define $ac_func innocuous_$ac_func
20861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020862/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020863 which can conflict with char $ac_func (); below.
20864 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020865 <limits.h> exists even on freestanding compilers. */
20866
20867#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020868# include <limits.h>
20869#else
20870# include <assert.h>
20871#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020872
20873#undef $ac_func
20874
Martin v. Löwiseba40652007-08-30 20:10:57 +000020875/* Override any GCC internal prototype to avoid an error.
20876 Use char because int might match the return type of a GCC
20877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020878#ifdef __cplusplus
20879extern "C"
20880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020881char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020882/* The GNU C library defines this for functions which it implements
20883 to always fail with ENOSYS. Some functions are actually named
20884 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020886choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887#endif
20888
Skip Montanaro6dead952003-09-25 14:50:04 +000020889int
20890main ()
20891{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020892return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020893 ;
20894 return 0;
20895}
20896_ACEOF
20897rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020898if { (ac_try="$ac_link"
20899case "(($ac_try" in
20900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20901 *) ac_try_echo=$ac_try;;
20902esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020904 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020906 grep -v '^ *+' conftest.er1 >conftest.err
20907 rm -f conftest.er1
20908 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020910 (exit $ac_status); } && {
20911 test -z "$ac_c_werror_flag" ||
20912 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020913 } && test -s conftest$ac_exeext &&
20914 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020915 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020916else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020918sed 's/^/| /' conftest.$ac_ext >&5
20919
Martin v. Löwiseba40652007-08-30 20:10:57 +000020920 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020922
20923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020924 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020925fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020926ac_res=`eval echo '${'$as_ac_var'}'`
20927 { echo "$as_me:$LINENO: result: $ac_res" >&5
20928echo "${ECHO_T}$ac_res" >&6; }
20929if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020930 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020931#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020932_ACEOF
20933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020934/* confdefs.h. */
20935_ACEOF
20936cat confdefs.h >>conftest.$ac_ext
20937cat >>conftest.$ac_ext <<_ACEOF
20938/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020939#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020940int
20941main ()
20942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020943gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020944 ;
20945 return 0;
20946}
20947_ACEOF
20948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020949if { (ac_try="$ac_compile"
20950case "(($ac_try" in
20951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20952 *) ac_try_echo=$ac_try;;
20953esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020957 grep -v '^ *+' conftest.er1 >conftest.err
20958 rm -f conftest.er1
20959 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 (exit $ac_status); } && {
20962 test -z "$ac_c_werror_flag" ||
20963 test ! -s conftest.err
20964 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020965 :
20966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020968sed 's/^/| /' conftest.$ac_ext >&5
20969
Martin v. Löwis11437992002-04-12 09:54:03 +000020970
20971cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020972#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020973_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020974
Martin v. Löwis11437992002-04-12 09:54:03 +000020975
Guido van Rossum627b2d71993-12-24 10:39:16 +000020976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020977
20978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020980fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020981done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020982
Michael W. Hudson54241132001-12-07 15:38:26 +000020983
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020984{ echo "$as_me:$LINENO: checking for major" >&5
20985echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020987/* confdefs.h. */
20988_ACEOF
20989cat confdefs.h >>conftest.$ac_ext
20990cat >>conftest.$ac_ext <<_ACEOF
20991/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020992
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020993#if defined(MAJOR_IN_MKDEV)
20994#include <sys/mkdev.h>
20995#elif defined(MAJOR_IN_SYSMACROS)
20996#include <sys/sysmacros.h>
20997#else
20998#include <sys/types.h>
20999#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021000
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021001int
21002main ()
21003{
21004
21005 makedev(major(0),minor(0));
21006
21007 ;
21008 return 0;
21009}
21010_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021011rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012if { (ac_try="$ac_link"
21013case "(($ac_try" in
21014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21015 *) ac_try_echo=$ac_try;;
21016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021020 grep -v '^ *+' conftest.er1 >conftest.err
21021 rm -f conftest.er1
21022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021024 (exit $ac_status); } && {
21025 test -z "$ac_c_werror_flag" ||
21026 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021027 } && test -s conftest$ac_exeext &&
21028 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021029
21030
21031cat >>confdefs.h <<\_ACEOF
21032#define HAVE_DEVICE_MACROS 1
21033_ACEOF
21034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021035 { echo "$as_me:$LINENO: result: yes" >&5
21036echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021037
21038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021040sed 's/^/| /' conftest.$ac_ext >&5
21041
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021043 { echo "$as_me:$LINENO: result: no" >&5
21044echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021045
21046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021047
21048rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021049 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021050
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021051# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021052# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021053{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21054echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021056/* confdefs.h. */
21057_ACEOF
21058cat confdefs.h >>conftest.$ac_ext
21059cat >>conftest.$ac_ext <<_ACEOF
21060/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021061
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021062#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021063#include <sys/socket.h>
21064#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021065#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021066
Martin v. Löwis11437992002-04-12 09:54:03 +000021067int
21068main ()
21069{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021070getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021071 ;
21072 return 0;
21073}
21074_ACEOF
21075rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021076if { (ac_try="$ac_link"
21077case "(($ac_try" in
21078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21079 *) ac_try_echo=$ac_try;;
21080esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021084 grep -v '^ *+' conftest.er1 >conftest.err
21085 rm -f conftest.er1
21086 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021088 (exit $ac_status); } && {
21089 test -z "$ac_c_werror_flag" ||
21090 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021091 } && test -s conftest$ac_exeext &&
21092 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021093 have_getaddrinfo=yes
21094else
21095 echo "$as_me: failed program was:" >&5
21096sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021097
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021098 have_getaddrinfo=no
21099fi
21100
21101rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21102 conftest$ac_exeext conftest.$ac_ext
21103{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21104echo "${ECHO_T}$have_getaddrinfo" >&6; }
21105if test $have_getaddrinfo = yes
21106then
21107 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021108echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021109 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21110 echo $ECHO_N "(cached) $ECHO_C" >&6
21111else
21112 if test "$cross_compiling" = yes; then
21113 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021114else
Martin v. Löwis11437992002-04-12 09:54:03 +000021115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021116/* confdefs.h. */
21117_ACEOF
21118cat confdefs.h >>conftest.$ac_ext
21119cat >>conftest.$ac_ext <<_ACEOF
21120/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021121
21122#include <sys/types.h>
21123#include <netdb.h>
21124#include <string.h>
21125#include <sys/socket.h>
21126#include <netinet/in.h>
21127
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021128int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021129{
21130 int passive, gaierr, inet4 = 0, inet6 = 0;
21131 struct addrinfo hints, *ai, *aitop;
21132 char straddr[INET6_ADDRSTRLEN], strport[16];
21133
21134 for (passive = 0; passive <= 1; passive++) {
21135 memset(&hints, 0, sizeof(hints));
21136 hints.ai_family = AF_UNSPEC;
21137 hints.ai_flags = passive ? AI_PASSIVE : 0;
21138 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021139 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021140 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21141 (void)gai_strerror(gaierr);
21142 goto bad;
21143 }
21144 for (ai = aitop; ai; ai = ai->ai_next) {
21145 if (ai->ai_addr == NULL ||
21146 ai->ai_addrlen == 0 ||
21147 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21148 straddr, sizeof(straddr), strport, sizeof(strport),
21149 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21150 goto bad;
21151 }
21152 switch (ai->ai_family) {
21153 case AF_INET:
21154 if (strcmp(strport, "54321") != 0) {
21155 goto bad;
21156 }
21157 if (passive) {
21158 if (strcmp(straddr, "0.0.0.0") != 0) {
21159 goto bad;
21160 }
21161 } else {
21162 if (strcmp(straddr, "127.0.0.1") != 0) {
21163 goto bad;
21164 }
21165 }
21166 inet4++;
21167 break;
21168 case AF_INET6:
21169 if (strcmp(strport, "54321") != 0) {
21170 goto bad;
21171 }
21172 if (passive) {
21173 if (strcmp(straddr, "::") != 0) {
21174 goto bad;
21175 }
21176 } else {
21177 if (strcmp(straddr, "::1") != 0) {
21178 goto bad;
21179 }
21180 }
21181 inet6++;
21182 break;
21183 case AF_UNSPEC:
21184 goto bad;
21185 break;
21186 default:
21187 /* another family support? */
21188 break;
21189 }
21190 }
21191 }
21192
21193 if (!(inet4 == 0 || inet4 == 2))
21194 goto bad;
21195 if (!(inet6 == 0 || inet6 == 2))
21196 goto bad;
21197
21198 if (aitop)
21199 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021200 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021201
21202 bad:
21203 if (aitop)
21204 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021205 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021206}
21207
Martin v. Löwis11437992002-04-12 09:54:03 +000021208_ACEOF
21209rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021210if { (ac_try="$ac_link"
21211case "(($ac_try" in
21212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21213 *) ac_try_echo=$ac_try;;
21214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021217 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021220 { (case "(($ac_try" in
21221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21222 *) ac_try_echo=$ac_try;;
21223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021226 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021228 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021229 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021230else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021231 echo "$as_me: program exited with status $ac_status" >&5
21232echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021233sed 's/^/| /' conftest.$ac_ext >&5
21234
Martin v. Löwis11437992002-04-12 09:54:03 +000021235( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021236ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021238rm -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 +000021239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021240
21241
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021242fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021243
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021245
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021246if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021247then
21248 if test $ipv6 = yes
21249 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021250 echo 'Fatal: You must get working getaddrinfo() function.'
21251 echo ' or you can specify "--disable-ipv6"'.
21252 exit 1
21253 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021254else
Martin v. Löwis11437992002-04-12 09:54:03 +000021255
21256cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021257#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021258_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021259
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021261
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021262for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021263do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21265{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021267if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021269else
Martin v. Löwis11437992002-04-12 09:54:03 +000021270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021271/* confdefs.h. */
21272_ACEOF
21273cat confdefs.h >>conftest.$ac_ext
21274cat >>conftest.$ac_ext <<_ACEOF
21275/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021276/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21277 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21278#define $ac_func innocuous_$ac_func
21279
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021281 which can conflict with char $ac_func (); below.
21282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021283 <limits.h> exists even on freestanding compilers. */
21284
21285#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021286# include <limits.h>
21287#else
21288# include <assert.h>
21289#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021290
21291#undef $ac_func
21292
Martin v. Löwiseba40652007-08-30 20:10:57 +000021293/* Override any GCC internal prototype to avoid an error.
21294 Use char because int might match the return type of a GCC
21295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021296#ifdef __cplusplus
21297extern "C"
21298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021299char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021300/* The GNU C library defines this for functions which it implements
21301 to always fail with ENOSYS. Some functions are actually named
21302 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021303#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021304choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021305#endif
21306
Skip Montanaro6dead952003-09-25 14:50:04 +000021307int
21308main ()
21309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021310return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316if { (ac_try="$ac_link"
21317case "(($ac_try" in
21318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319 *) ac_try_echo=$ac_try;;
21320esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021322 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324 grep -v '^ *+' conftest.er1 >conftest.err
21325 rm -f conftest.er1
21326 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021328 (exit $ac_status); } && {
21329 test -z "$ac_c_werror_flag" ||
21330 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021331 } && test -s conftest$ac_exeext &&
21332 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021333 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021336sed 's/^/| /' conftest.$ac_ext >&5
21337
Martin v. Löwiseba40652007-08-30 20:10:57 +000021338 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021340
21341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021343fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021344ac_res=`eval echo '${'$as_ac_var'}'`
21345 { echo "$as_me:$LINENO: result: $ac_res" >&5
21346echo "${ECHO_T}$ac_res" >&6; }
21347if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021348 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021349#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021350_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021351
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021352fi
21353done
21354
Michael W. Hudson54241132001-12-07 15:38:26 +000021355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021356# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021357{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21358echo $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 +000021359if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021361else
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021363/* confdefs.h. */
21364_ACEOF
21365cat confdefs.h >>conftest.$ac_ext
21366cat >>conftest.$ac_ext <<_ACEOF
21367/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021368#include <sys/types.h>
21369#include <sys/time.h>
21370#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021371
Martin v. Löwis11437992002-04-12 09:54:03 +000021372int
21373main ()
21374{
21375if ((struct tm *) 0)
21376return 0;
21377 ;
21378 return 0;
21379}
21380_ACEOF
21381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021382if { (ac_try="$ac_compile"
21383case "(($ac_try" in
21384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21385 *) ac_try_echo=$ac_try;;
21386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
21397 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021398 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021399else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021401sed 's/^/| /' conftest.$ac_ext >&5
21402
Martin v. Löwiseba40652007-08-30 20:10:57 +000021403 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021405
21406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021407fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021408{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21409echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021410if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021411
21412cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021414_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021415
21416fi
21417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021418{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21419echo $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 +000021420if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021422else
Martin v. Löwis11437992002-04-12 09:54:03 +000021423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021424/* confdefs.h. */
21425_ACEOF
21426cat confdefs.h >>conftest.$ac_ext
21427cat >>conftest.$ac_ext <<_ACEOF
21428/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021429#include <sys/types.h>
21430#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021431
Martin v. Löwis11437992002-04-12 09:54:03 +000021432int
21433main ()
21434{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021435struct tm tm;
21436 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021437 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021438 ;
21439 return 0;
21440}
21441_ACEOF
21442rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021443if { (ac_try="$ac_compile"
21444case "(($ac_try" in
21445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21446 *) ac_try_echo=$ac_try;;
21447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021451 grep -v '^ *+' conftest.er1 >conftest.err
21452 rm -f conftest.er1
21453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455 (exit $ac_status); } && {
21456 test -z "$ac_c_werror_flag" ||
21457 test ! -s conftest.err
21458 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021459 ac_cv_struct_tm=time.h
21460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021461 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021462sed 's/^/| /' conftest.$ac_ext >&5
21463
Martin v. Löwiseba40652007-08-30 20:10:57 +000021464 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466
21467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021468fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021469{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21470echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021471if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021472
21473cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021474#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021475_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021476
21477fi
21478
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021479{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21480echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021481if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021483else
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021485/* confdefs.h. */
21486_ACEOF
21487cat confdefs.h >>conftest.$ac_ext
21488cat >>conftest.$ac_ext <<_ACEOF
21489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021490#include <sys/types.h>
21491#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021492
21493
Martin v. Löwis11437992002-04-12 09:54:03 +000021494int
21495main ()
21496{
21497static struct tm ac_aggr;
21498if (ac_aggr.tm_zone)
21499return 0;
21500 ;
21501 return 0;
21502}
21503_ACEOF
21504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021505if { (ac_try="$ac_compile"
21506case "(($ac_try" in
21507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21508 *) ac_try_echo=$ac_try;;
21509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021513 grep -v '^ *+' conftest.er1 >conftest.err
21514 rm -f conftest.er1
21515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517 (exit $ac_status); } && {
21518 test -z "$ac_c_werror_flag" ||
21519 test ! -s conftest.err
21520 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021521 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021522else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021524sed 's/^/| /' conftest.$ac_ext >&5
21525
Martin v. Löwiseba40652007-08-30 20:10:57 +000021526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021527/* confdefs.h. */
21528_ACEOF
21529cat confdefs.h >>conftest.$ac_ext
21530cat >>conftest.$ac_ext <<_ACEOF
21531/* end confdefs.h. */
21532#include <sys/types.h>
21533#include <$ac_cv_struct_tm>
21534
21535
21536int
21537main ()
21538{
21539static struct tm ac_aggr;
21540if (sizeof ac_aggr.tm_zone)
21541return 0;
21542 ;
21543 return 0;
21544}
21545_ACEOF
21546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547if { (ac_try="$ac_compile"
21548case "(($ac_try" in
21549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21550 *) ac_try_echo=$ac_try;;
21551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021555 grep -v '^ *+' conftest.er1 >conftest.err
21556 rm -f conftest.er1
21557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559 (exit $ac_status); } && {
21560 test -z "$ac_c_werror_flag" ||
21561 test ! -s conftest.err
21562 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021563 ac_cv_member_struct_tm_tm_zone=yes
21564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021566sed 's/^/| /' conftest.$ac_ext >&5
21567
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021570
21571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021573
21574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021575fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021576{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21577echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21578if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021579
21580cat >>confdefs.h <<_ACEOF
21581#define HAVE_STRUCT_TM_TM_ZONE 1
21582_ACEOF
21583
21584
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021585fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021586
Martin v. Löwis11437992002-04-12 09:54:03 +000021587if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21588
21589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021590#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021591_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021592
21593else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021594 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21595echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021597 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598else
21599 cat >conftest.$ac_ext <<_ACEOF
21600/* confdefs.h. */
21601_ACEOF
21602cat confdefs.h >>conftest.$ac_ext
21603cat >>conftest.$ac_ext <<_ACEOF
21604/* end confdefs.h. */
21605#include <time.h>
21606
21607int
21608main ()
21609{
21610#ifndef tzname
21611 (void) tzname;
21612#endif
21613
21614 ;
21615 return 0;
21616}
21617_ACEOF
21618rm -f conftest.$ac_objext
21619if { (ac_try="$ac_compile"
21620case "(($ac_try" in
21621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21622 *) ac_try_echo=$ac_try;;
21623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625 (eval "$ac_compile") 2>conftest.er1
21626 ac_status=$?
21627 grep -v '^ *+' conftest.er1 >conftest.err
21628 rm -f conftest.er1
21629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631 (exit $ac_status); } && {
21632 test -z "$ac_c_werror_flag" ||
21633 test ! -s conftest.err
21634 } && test -s conftest.$ac_objext; then
21635 ac_cv_have_decl_tzname=yes
21636else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021637 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638sed 's/^/| /' conftest.$ac_ext >&5
21639
21640 ac_cv_have_decl_tzname=no
21641fi
21642
21643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021645{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21646echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21647if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648
21649cat >>confdefs.h <<_ACEOF
21650#define HAVE_DECL_TZNAME 1
21651_ACEOF
21652
21653
21654else
21655 cat >>confdefs.h <<_ACEOF
21656#define HAVE_DECL_TZNAME 0
21657_ACEOF
21658
21659
21660fi
21661
21662
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021663 { echo "$as_me:$LINENO: checking for tzname" >&5
21664echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021665if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021666 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021667else
Martin v. Löwis11437992002-04-12 09:54:03 +000021668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021669/* confdefs.h. */
21670_ACEOF
21671cat confdefs.h >>conftest.$ac_ext
21672cat >>conftest.$ac_ext <<_ACEOF
21673/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021674#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021675#if !HAVE_DECL_TZNAME
21676extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021678
Martin v. Löwis11437992002-04-12 09:54:03 +000021679int
21680main ()
21681{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021683 ;
21684 return 0;
21685}
21686_ACEOF
21687rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688if { (ac_try="$ac_link"
21689case "(($ac_try" in
21690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21691 *) ac_try_echo=$ac_try;;
21692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021694 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021696 grep -v '^ *+' conftest.er1 >conftest.err
21697 rm -f conftest.er1
21698 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021700 (exit $ac_status); } && {
21701 test -z "$ac_c_werror_flag" ||
21702 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021703 } && test -s conftest$ac_exeext &&
21704 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021705 ac_cv_var_tzname=yes
21706else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021708sed 's/^/| /' conftest.$ac_ext >&5
21709
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021712
21713rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021714 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021715fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021716{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21717echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021718 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021719
21720cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021721#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021722_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021724 fi
21725fi
21726
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021727{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21728echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021729if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021730 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021731else
21732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021733/* confdefs.h. */
21734_ACEOF
21735cat confdefs.h >>conftest.$ac_ext
21736cat >>conftest.$ac_ext <<_ACEOF
21737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021738$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021739int
21740main ()
21741{
21742static struct stat ac_aggr;
21743if (ac_aggr.st_rdev)
21744return 0;
21745 ;
21746 return 0;
21747}
21748_ACEOF
21749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021750if { (ac_try="$ac_compile"
21751case "(($ac_try" in
21752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21753 *) ac_try_echo=$ac_try;;
21754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021758 grep -v '^ *+' conftest.er1 >conftest.err
21759 rm -f conftest.er1
21760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021762 (exit $ac_status); } && {
21763 test -z "$ac_c_werror_flag" ||
21764 test ! -s conftest.err
21765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021766 ac_cv_member_struct_stat_st_rdev=yes
21767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021769sed 's/^/| /' conftest.$ac_ext >&5
21770
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021772/* confdefs.h. */
21773_ACEOF
21774cat confdefs.h >>conftest.$ac_ext
21775cat >>conftest.$ac_ext <<_ACEOF
21776/* end confdefs.h. */
21777$ac_includes_default
21778int
21779main ()
21780{
21781static struct stat ac_aggr;
21782if (sizeof ac_aggr.st_rdev)
21783return 0;
21784 ;
21785 return 0;
21786}
21787_ACEOF
21788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021789if { (ac_try="$ac_compile"
21790case "(($ac_try" in
21791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21792 *) ac_try_echo=$ac_try;;
21793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021797 grep -v '^ *+' conftest.er1 >conftest.err
21798 rm -f conftest.er1
21799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021801 (exit $ac_status); } && {
21802 test -z "$ac_c_werror_flag" ||
21803 test ! -s conftest.err
21804 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021805 ac_cv_member_struct_stat_st_rdev=yes
21806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021808sed 's/^/| /' conftest.$ac_ext >&5
21809
Martin v. Löwiseba40652007-08-30 20:10:57 +000021810 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021812
21813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021815
21816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021817fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021818{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21819echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21820if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021821
21822cat >>confdefs.h <<_ACEOF
21823#define HAVE_STRUCT_STAT_ST_RDEV 1
21824_ACEOF
21825
21826
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021827fi
21828
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021829{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21830echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021831if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021833else
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021835/* confdefs.h. */
21836_ACEOF
21837cat confdefs.h >>conftest.$ac_ext
21838cat >>conftest.$ac_ext <<_ACEOF
21839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021840$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021841int
21842main ()
21843{
21844static struct stat ac_aggr;
21845if (ac_aggr.st_blksize)
21846return 0;
21847 ;
21848 return 0;
21849}
21850_ACEOF
21851rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021852if { (ac_try="$ac_compile"
21853case "(($ac_try" in
21854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21855 *) ac_try_echo=$ac_try;;
21856esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021860 grep -v '^ *+' conftest.er1 >conftest.err
21861 rm -f conftest.er1
21862 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021864 (exit $ac_status); } && {
21865 test -z "$ac_c_werror_flag" ||
21866 test ! -s conftest.err
21867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021868 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021869else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021871sed 's/^/| /' conftest.$ac_ext >&5
21872
Martin v. Löwiseba40652007-08-30 20:10:57 +000021873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021874/* confdefs.h. */
21875_ACEOF
21876cat confdefs.h >>conftest.$ac_ext
21877cat >>conftest.$ac_ext <<_ACEOF
21878/* end confdefs.h. */
21879$ac_includes_default
21880int
21881main ()
21882{
21883static struct stat ac_aggr;
21884if (sizeof ac_aggr.st_blksize)
21885return 0;
21886 ;
21887 return 0;
21888}
21889_ACEOF
21890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021891if { (ac_try="$ac_compile"
21892case "(($ac_try" in
21893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21894 *) ac_try_echo=$ac_try;;
21895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021897 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021899 grep -v '^ *+' conftest.er1 >conftest.err
21900 rm -f conftest.er1
21901 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903 (exit $ac_status); } && {
21904 test -z "$ac_c_werror_flag" ||
21905 test ! -s conftest.err
21906 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021907 ac_cv_member_struct_stat_st_blksize=yes
21908else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021910sed 's/^/| /' conftest.$ac_ext >&5
21911
Martin v. Löwiseba40652007-08-30 20:10:57 +000021912 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021914
21915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917
21918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021919fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021920{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21921echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21922if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021923
Martin v. Löwis11437992002-04-12 09:54:03 +000021924cat >>confdefs.h <<_ACEOF
21925#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21926_ACEOF
21927
21928
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021929fi
21930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021931{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21932echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021933if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021934 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021935else
21936 cat >conftest.$ac_ext <<_ACEOF
21937/* confdefs.h. */
21938_ACEOF
21939cat confdefs.h >>conftest.$ac_ext
21940cat >>conftest.$ac_ext <<_ACEOF
21941/* end confdefs.h. */
21942$ac_includes_default
21943int
21944main ()
21945{
21946static struct stat ac_aggr;
21947if (ac_aggr.st_flags)
21948return 0;
21949 ;
21950 return 0;
21951}
21952_ACEOF
21953rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021954if { (ac_try="$ac_compile"
21955case "(($ac_try" in
21956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21957 *) ac_try_echo=$ac_try;;
21958esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021961 ac_status=$?
21962 grep -v '^ *+' conftest.er1 >conftest.err
21963 rm -f conftest.er1
21964 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 (exit $ac_status); } && {
21967 test -z "$ac_c_werror_flag" ||
21968 test ! -s conftest.err
21969 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021970 ac_cv_member_struct_stat_st_flags=yes
21971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021972 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021973sed 's/^/| /' conftest.$ac_ext >&5
21974
Martin v. Löwiseba40652007-08-30 20:10:57 +000021975 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021976/* confdefs.h. */
21977_ACEOF
21978cat confdefs.h >>conftest.$ac_ext
21979cat >>conftest.$ac_ext <<_ACEOF
21980/* end confdefs.h. */
21981$ac_includes_default
21982int
21983main ()
21984{
21985static struct stat ac_aggr;
21986if (sizeof ac_aggr.st_flags)
21987return 0;
21988 ;
21989 return 0;
21990}
21991_ACEOF
21992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021993if { (ac_try="$ac_compile"
21994case "(($ac_try" in
21995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21996 *) ac_try_echo=$ac_try;;
21997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021999 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022000 ac_status=$?
22001 grep -v '^ *+' conftest.er1 >conftest.err
22002 rm -f conftest.er1
22003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022005 (exit $ac_status); } && {
22006 test -z "$ac_c_werror_flag" ||
22007 test ! -s conftest.err
22008 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022009 ac_cv_member_struct_stat_st_flags=yes
22010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022011 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022012sed 's/^/| /' conftest.$ac_ext >&5
22013
Martin v. Löwiseba40652007-08-30 20:10:57 +000022014 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022016
22017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022019
22020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022021fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022022{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22023echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22024if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022025
22026cat >>confdefs.h <<_ACEOF
22027#define HAVE_STRUCT_STAT_ST_FLAGS 1
22028_ACEOF
22029
22030
22031fi
22032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022033{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22034echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022035if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022037else
22038 cat >conftest.$ac_ext <<_ACEOF
22039/* confdefs.h. */
22040_ACEOF
22041cat confdefs.h >>conftest.$ac_ext
22042cat >>conftest.$ac_ext <<_ACEOF
22043/* end confdefs.h. */
22044$ac_includes_default
22045int
22046main ()
22047{
22048static struct stat ac_aggr;
22049if (ac_aggr.st_gen)
22050return 0;
22051 ;
22052 return 0;
22053}
22054_ACEOF
22055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056if { (ac_try="$ac_compile"
22057case "(($ac_try" in
22058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22059 *) ac_try_echo=$ac_try;;
22060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022063 ac_status=$?
22064 grep -v '^ *+' conftest.er1 >conftest.err
22065 rm -f conftest.er1
22066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022068 (exit $ac_status); } && {
22069 test -z "$ac_c_werror_flag" ||
22070 test ! -s conftest.err
22071 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022072 ac_cv_member_struct_stat_st_gen=yes
22073else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022074 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022075sed 's/^/| /' conftest.$ac_ext >&5
22076
Martin v. Löwiseba40652007-08-30 20:10:57 +000022077 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022078/* confdefs.h. */
22079_ACEOF
22080cat confdefs.h >>conftest.$ac_ext
22081cat >>conftest.$ac_ext <<_ACEOF
22082/* end confdefs.h. */
22083$ac_includes_default
22084int
22085main ()
22086{
22087static struct stat ac_aggr;
22088if (sizeof ac_aggr.st_gen)
22089return 0;
22090 ;
22091 return 0;
22092}
22093_ACEOF
22094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022095if { (ac_try="$ac_compile"
22096case "(($ac_try" in
22097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22098 *) ac_try_echo=$ac_try;;
22099esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022102 ac_status=$?
22103 grep -v '^ *+' conftest.er1 >conftest.err
22104 rm -f conftest.er1
22105 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022107 (exit $ac_status); } && {
22108 test -z "$ac_c_werror_flag" ||
22109 test ! -s conftest.err
22110 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022111 ac_cv_member_struct_stat_st_gen=yes
22112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022113 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022114sed 's/^/| /' conftest.$ac_ext >&5
22115
Martin v. Löwiseba40652007-08-30 20:10:57 +000022116 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118
22119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022121
22122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022124{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22125echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22126if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022127
22128cat >>confdefs.h <<_ACEOF
22129#define HAVE_STRUCT_STAT_ST_GEN 1
22130_ACEOF
22131
22132
22133fi
22134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022135{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22136echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022137if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022138 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022139else
22140 cat >conftest.$ac_ext <<_ACEOF
22141/* confdefs.h. */
22142_ACEOF
22143cat confdefs.h >>conftest.$ac_ext
22144cat >>conftest.$ac_ext <<_ACEOF
22145/* end confdefs.h. */
22146$ac_includes_default
22147int
22148main ()
22149{
22150static struct stat ac_aggr;
22151if (ac_aggr.st_birthtime)
22152return 0;
22153 ;
22154 return 0;
22155}
22156_ACEOF
22157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158if { (ac_try="$ac_compile"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022165 ac_status=$?
22166 grep -v '^ *+' conftest.er1 >conftest.err
22167 rm -f conftest.er1
22168 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170 (exit $ac_status); } && {
22171 test -z "$ac_c_werror_flag" ||
22172 test ! -s conftest.err
22173 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022174 ac_cv_member_struct_stat_st_birthtime=yes
22175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022177sed 's/^/| /' conftest.$ac_ext >&5
22178
Martin v. Löwiseba40652007-08-30 20:10:57 +000022179 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022180/* confdefs.h. */
22181_ACEOF
22182cat confdefs.h >>conftest.$ac_ext
22183cat >>conftest.$ac_ext <<_ACEOF
22184/* end confdefs.h. */
22185$ac_includes_default
22186int
22187main ()
22188{
22189static struct stat ac_aggr;
22190if (sizeof ac_aggr.st_birthtime)
22191return 0;
22192 ;
22193 return 0;
22194}
22195_ACEOF
22196rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022197if { (ac_try="$ac_compile"
22198case "(($ac_try" in
22199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22200 *) ac_try_echo=$ac_try;;
22201esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022204 ac_status=$?
22205 grep -v '^ *+' conftest.er1 >conftest.err
22206 rm -f conftest.er1
22207 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022209 (exit $ac_status); } && {
22210 test -z "$ac_c_werror_flag" ||
22211 test ! -s conftest.err
22212 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022213 ac_cv_member_struct_stat_st_birthtime=yes
22214else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022216sed 's/^/| /' conftest.$ac_ext >&5
22217
Martin v. Löwiseba40652007-08-30 20:10:57 +000022218 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220
22221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022223
22224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022225fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022226{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22227echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22228if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022229
22230cat >>confdefs.h <<_ACEOF
22231#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22232_ACEOF
22233
22234
22235fi
22236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022237{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22238echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022239if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022240 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022241else
Martin v. Löwis11437992002-04-12 09:54:03 +000022242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022243/* confdefs.h. */
22244_ACEOF
22245cat confdefs.h >>conftest.$ac_ext
22246cat >>conftest.$ac_ext <<_ACEOF
22247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022249int
22250main ()
22251{
22252static struct stat ac_aggr;
22253if (ac_aggr.st_blocks)
22254return 0;
22255 ;
22256 return 0;
22257}
22258_ACEOF
22259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260if { (ac_try="$ac_compile"
22261case "(($ac_try" in
22262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22263 *) ac_try_echo=$ac_try;;
22264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022268 grep -v '^ *+' conftest.er1 >conftest.err
22269 rm -f conftest.er1
22270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272 (exit $ac_status); } && {
22273 test -z "$ac_c_werror_flag" ||
22274 test ! -s conftest.err
22275 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022276 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022279sed 's/^/| /' conftest.$ac_ext >&5
22280
Martin v. Löwiseba40652007-08-30 20:10:57 +000022281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022282/* confdefs.h. */
22283_ACEOF
22284cat confdefs.h >>conftest.$ac_ext
22285cat >>conftest.$ac_ext <<_ACEOF
22286/* end confdefs.h. */
22287$ac_includes_default
22288int
22289main ()
22290{
22291static struct stat ac_aggr;
22292if (sizeof ac_aggr.st_blocks)
22293return 0;
22294 ;
22295 return 0;
22296}
22297_ACEOF
22298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022299if { (ac_try="$ac_compile"
22300case "(($ac_try" in
22301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22302 *) ac_try_echo=$ac_try;;
22303esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022305 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022307 grep -v '^ *+' conftest.er1 >conftest.err
22308 rm -f conftest.er1
22309 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022311 (exit $ac_status); } && {
22312 test -z "$ac_c_werror_flag" ||
22313 test ! -s conftest.err
22314 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022315 ac_cv_member_struct_stat_st_blocks=yes
22316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022318sed 's/^/| /' conftest.$ac_ext >&5
22319
Martin v. Löwiseba40652007-08-30 20:10:57 +000022320 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322
22323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325
22326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022327fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022328{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22329echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22330if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022331
Martin v. Löwis11437992002-04-12 09:54:03 +000022332cat >>confdefs.h <<_ACEOF
22333#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22334_ACEOF
22335
22336
22337cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022338#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022339_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022340
22341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022342 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022343 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22345 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022346esac
22347
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022348fi
22349
Michael W. Hudson54241132001-12-07 15:38:26 +000022350
Martin v. Löwis11437992002-04-12 09:54:03 +000022351
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022352{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22353echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022354if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022355 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022356else
Martin v. Löwis11437992002-04-12 09:54:03 +000022357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022358/* confdefs.h. */
22359_ACEOF
22360cat confdefs.h >>conftest.$ac_ext
22361cat >>conftest.$ac_ext <<_ACEOF
22362/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022363#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022364int
22365main ()
22366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022367return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022368 ;
22369 return 0;
22370}
22371_ACEOF
22372rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022373if { (ac_try="$ac_compile"
22374case "(($ac_try" in
22375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22376 *) ac_try_echo=$ac_try;;
22377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022379 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022381 grep -v '^ *+' conftest.er1 >conftest.err
22382 rm -f conftest.er1
22383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022385 (exit $ac_status); } && {
22386 test -z "$ac_c_werror_flag" ||
22387 test ! -s conftest.err
22388 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022389 ac_cv_header_time_altzone=yes
22390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022391 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022392sed 's/^/| /' conftest.$ac_ext >&5
22393
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022395fi
22396
Martin v. Löwiseba40652007-08-30 20:10:57 +000022397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22398fi
22399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022400{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22401echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022402if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022403
22404cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022405#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022406_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022407
22408fi
22409
Guido van Rossumda88dad1995-01-26 00:46:29 +000022410was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022411{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22412echo $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 +000022413cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022414/* confdefs.h. */
22415_ACEOF
22416cat confdefs.h >>conftest.$ac_ext
22417cat >>conftest.$ac_ext <<_ACEOF
22418/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022419
22420#include <sys/types.h>
22421#include <sys/select.h>
22422#include <sys/time.h>
22423
Martin v. Löwis11437992002-04-12 09:54:03 +000022424int
22425main ()
22426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427;
Martin v. Löwis11437992002-04-12 09:54:03 +000022428 ;
22429 return 0;
22430}
22431_ACEOF
22432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022433if { (ac_try="$ac_compile"
22434case "(($ac_try" in
22435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22436 *) ac_try_echo=$ac_try;;
22437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022441 grep -v '^ *+' conftest.er1 >conftest.err
22442 rm -f conftest.er1
22443 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445 (exit $ac_status); } && {
22446 test -z "$ac_c_werror_flag" ||
22447 test ! -s conftest.err
22448 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022449
22450
22451cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022452#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022453_ACEOF
22454
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022455 was_it_defined=yes
22456
Guido van Rossumf78abae1997-01-21 22:02:36 +000022457else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022459sed 's/^/| /' conftest.$ac_ext >&5
22460
Brett Cannon19fab762007-06-02 03:02:29 +000022461
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462fi
22463
22464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022465{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22466echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022468{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22469echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022470if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022471 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022472else
Martin v. Löwis11437992002-04-12 09:54:03 +000022473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022474/* confdefs.h. */
22475_ACEOF
22476cat confdefs.h >>conftest.$ac_ext
22477cat >>conftest.$ac_ext <<_ACEOF
22478/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022479
22480# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022481int
22482main ()
22483{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022484struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022485 ;
22486 return 0;
22487}
22488_ACEOF
22489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490if { (ac_try="$ac_compile"
22491case "(($ac_try" in
22492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22493 *) ac_try_echo=$ac_try;;
22494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022498 grep -v '^ *+' conftest.er1 >conftest.err
22499 rm -f conftest.er1
22500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502 (exit $ac_status); } && {
22503 test -z "$ac_c_werror_flag" ||
22504 test ! -s conftest.err
22505 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022506 ac_cv_struct_addrinfo=yes
22507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022509sed 's/^/| /' conftest.$ac_ext >&5
22510
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022512fi
22513
Martin v. Löwiseba40652007-08-30 20:10:57 +000022514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22515fi
22516
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022517{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22518echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022519if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022520
22521cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022522#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022523_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022524
22525fi
22526
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022527{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22528echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022529if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022531else
Martin v. Löwis11437992002-04-12 09:54:03 +000022532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022533/* confdefs.h. */
22534_ACEOF
22535cat confdefs.h >>conftest.$ac_ext
22536cat >>conftest.$ac_ext <<_ACEOF
22537/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022538
22539# include <sys/types.h>
22540# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022541int
22542main ()
22543{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022545 ;
22546 return 0;
22547}
22548_ACEOF
22549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022550if { (ac_try="$ac_compile"
22551case "(($ac_try" in
22552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22553 *) ac_try_echo=$ac_try;;
22554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022558 grep -v '^ *+' conftest.er1 >conftest.err
22559 rm -f conftest.er1
22560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022562 (exit $ac_status); } && {
22563 test -z "$ac_c_werror_flag" ||
22564 test ! -s conftest.err
22565 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022566 ac_cv_struct_sockaddr_storage=yes
22567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022569sed 's/^/| /' conftest.$ac_ext >&5
22570
Martin v. Löwiseba40652007-08-30 20:10:57 +000022571 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022572fi
22573
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22575fi
22576
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022577{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22578echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022579if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022580
22581cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022582#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022583_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022584
22585fi
22586
Guido van Rossum627b2d71993-12-24 10:39:16 +000022587# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022588
Michael W. Hudson54241132001-12-07 15:38:26 +000022589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022590{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22591echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022592if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022593 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022594else
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022596/* confdefs.h. */
22597_ACEOF
22598cat confdefs.h >>conftest.$ac_ext
22599cat >>conftest.$ac_ext <<_ACEOF
22600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022601$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022602int
22603main ()
22604{
22605static int test_array [1 - 2 * !(((char) -1) < 0)];
22606test_array [0] = 0
22607
22608 ;
22609 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022610}
Martin v. Löwis11437992002-04-12 09:54:03 +000022611_ACEOF
22612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022613if { (ac_try="$ac_compile"
22614case "(($ac_try" in
22615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22616 *) ac_try_echo=$ac_try;;
22617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022621 grep -v '^ *+' conftest.er1 >conftest.err
22622 rm -f conftest.er1
22623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022625 (exit $ac_status); } && {
22626 test -z "$ac_c_werror_flag" ||
22627 test ! -s conftest.err
22628 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022629 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022632sed 's/^/| /' conftest.$ac_ext >&5
22633
Martin v. Löwiseba40652007-08-30 20:10:57 +000022634 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636
22637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022638fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022639{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22640echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022641if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022643#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022645
22646fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022647
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022648{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22649echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022650if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022651 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022652else
22653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022654/* confdefs.h. */
22655_ACEOF
22656cat confdefs.h >>conftest.$ac_ext
22657cat >>conftest.$ac_ext <<_ACEOF
22658/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022659
Martin v. Löwis11437992002-04-12 09:54:03 +000022660int
22661main ()
22662{
22663/* FIXME: Include the comments suggested by Paul. */
22664#ifndef __cplusplus
22665 /* Ultrix mips cc rejects this. */
22666 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022667 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022668 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669 char const *const *pcpcc;
22670 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022671 /* NEC SVR4.0.2 mips cc rejects this. */
22672 struct point {int x, y;};
22673 static struct point const zero = {0,0};
22674 /* AIX XL C 1.02.0.0 rejects this.
22675 It does not let you subtract one const X* pointer from another in
22676 an arm of an if-expression whose if-part is not a constant
22677 expression */
22678 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022679 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022680 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681 ++pcpcc;
22682 ppc = (char**) pcpcc;
22683 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022684 { /* SCO 3.2v4 cc rejects this. */
22685 char *t;
22686 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022687
Martin v. Löwis11437992002-04-12 09:54:03 +000022688 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022689 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 }
22691 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22692 int x[] = {25, 17};
22693 const int *foo = &x[0];
22694 ++foo;
22695 }
22696 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22697 typedef const int *iptr;
22698 iptr p = 0;
22699 ++p;
22700 }
22701 { /* AIX XL C 1.02.0.0 rejects this saying
22702 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22703 struct s { int j; const int *ap[3]; };
22704 struct s *b; b->j = 5;
22705 }
22706 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22707 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022708 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022709 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022710 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022711#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022712
Martin v. Löwis11437992002-04-12 09:54:03 +000022713 ;
22714 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022715}
Martin v. Löwis11437992002-04-12 09:54:03 +000022716_ACEOF
22717rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022718if { (ac_try="$ac_compile"
22719case "(($ac_try" in
22720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22721 *) ac_try_echo=$ac_try;;
22722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022726 grep -v '^ *+' conftest.er1 >conftest.err
22727 rm -f conftest.er1
22728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022730 (exit $ac_status); } && {
22731 test -z "$ac_c_werror_flag" ||
22732 test ! -s conftest.err
22733 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022734 ac_cv_c_const=yes
22735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022737sed 's/^/| /' conftest.$ac_ext >&5
22738
Martin v. Löwiseba40652007-08-30 20:10:57 +000022739 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022740fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022741
22742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022743fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022744{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22745echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022746if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022747
22748cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022749#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022750_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022751
22752fi
22753
Michael W. Hudson54241132001-12-07 15:38:26 +000022754
Guido van Rossumda88dad1995-01-26 00:46:29 +000022755works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022756{ echo "$as_me:$LINENO: checking for working volatile" >&5
22757echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022759/* confdefs.h. */
22760_ACEOF
22761cat confdefs.h >>conftest.$ac_ext
22762cat >>conftest.$ac_ext <<_ACEOF
22763/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022764
Martin v. Löwis11437992002-04-12 09:54:03 +000022765int
22766main ()
22767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022768volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022769 ;
22770 return 0;
22771}
22772_ACEOF
22773rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022774if { (ac_try="$ac_compile"
22775case "(($ac_try" in
22776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22777 *) ac_try_echo=$ac_try;;
22778esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022782 grep -v '^ *+' conftest.er1 >conftest.err
22783 rm -f conftest.er1
22784 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022786 (exit $ac_status); } && {
22787 test -z "$ac_c_werror_flag" ||
22788 test ! -s conftest.err
22789 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022790 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022791else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022793sed 's/^/| /' conftest.$ac_ext >&5
22794
Martin v. Löwis11437992002-04-12 09:54:03 +000022795
22796cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022797#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022798_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022799
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022800
Guido van Rossum627b2d71993-12-24 10:39:16 +000022801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022802
22803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022804{ echo "$as_me:$LINENO: result: $works" >&5
22805echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022806
Guido van Rossumda88dad1995-01-26 00:46:29 +000022807works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022808{ echo "$as_me:$LINENO: checking for working signed char" >&5
22809echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022811/* confdefs.h. */
22812_ACEOF
22813cat confdefs.h >>conftest.$ac_ext
22814cat >>conftest.$ac_ext <<_ACEOF
22815/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022816
Martin v. Löwis11437992002-04-12 09:54:03 +000022817int
22818main ()
22819{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022820signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022821 ;
22822 return 0;
22823}
22824_ACEOF
22825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022826if { (ac_try="$ac_compile"
22827case "(($ac_try" in
22828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22829 *) ac_try_echo=$ac_try;;
22830esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022834 grep -v '^ *+' conftest.er1 >conftest.err
22835 rm -f conftest.er1
22836 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022838 (exit $ac_status); } && {
22839 test -z "$ac_c_werror_flag" ||
22840 test ! -s conftest.err
22841 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022842 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022843else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022845sed 's/^/| /' conftest.$ac_ext >&5
22846
Martin v. Löwis11437992002-04-12 09:54:03 +000022847
22848cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022850_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022851
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022852
Guido van Rossum7f43da71994-08-01 12:15:30 +000022853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022854
22855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022856{ echo "$as_me:$LINENO: result: $works" >&5
22857echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022858
Guido van Rossumda88dad1995-01-26 00:46:29 +000022859have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022860{ echo "$as_me:$LINENO: checking for prototypes" >&5
22861echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022863/* confdefs.h. */
22864_ACEOF
22865cat confdefs.h >>conftest.$ac_ext
22866cat >>conftest.$ac_ext <<_ACEOF
22867/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022868int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022869int
22870main ()
22871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022872return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022873 ;
22874 return 0;
22875}
22876_ACEOF
22877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022878if { (ac_try="$ac_compile"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022886 grep -v '^ *+' conftest.er1 >conftest.err
22887 rm -f conftest.er1
22888 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022890 (exit $ac_status); } && {
22891 test -z "$ac_c_werror_flag" ||
22892 test ! -s conftest.err
22893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022894
22895
22896cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022897#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022898_ACEOF
22899
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022900 have_prototypes=yes
22901
Guido van Rossumf78abae1997-01-21 22:02:36 +000022902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022904sed 's/^/| /' conftest.$ac_ext >&5
22905
Martin v. Löwiseba40652007-08-30 20:10:57 +000022906
Guido van Rossum7f43da71994-08-01 12:15:30 +000022907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022908
22909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022910{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22911echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022912
Guido van Rossumda88dad1995-01-26 00:46:29 +000022913works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022914{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22915echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022917/* confdefs.h. */
22918_ACEOF
22919cat confdefs.h >>conftest.$ac_ext
22920cat >>conftest.$ac_ext <<_ACEOF
22921/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022922
22923#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022924int foo(int x, ...) {
22925 va_list va;
22926 va_start(va, x);
22927 va_arg(va, int);
22928 va_arg(va, char *);
22929 va_arg(va, double);
22930 return 0;
22931}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022932
Martin v. Löwis11437992002-04-12 09:54:03 +000022933int
22934main ()
22935{
Guido van Rossum90eea071996-08-30 20:58:57 +000022936return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022937 ;
22938 return 0;
22939}
22940_ACEOF
22941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942if { (ac_try="$ac_compile"
22943case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022950 grep -v '^ *+' conftest.er1 >conftest.err
22951 rm -f conftest.er1
22952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022954 (exit $ac_status); } && {
22955 test -z "$ac_c_werror_flag" ||
22956 test ! -s conftest.err
22957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022958
22959
22960cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022961#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022962_ACEOF
22963
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022964 works=yes
22965
Guido van Rossumf78abae1997-01-21 22:02:36 +000022966else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022968sed 's/^/| /' conftest.$ac_ext >&5
22969
Martin v. Löwiseba40652007-08-30 20:10:57 +000022970
Guido van Rossum627b2d71993-12-24 10:39:16 +000022971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022972
22973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022974{ echo "$as_me:$LINENO: result: $works" >&5
22975echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022976
Martin v. Löwisd6320502004-08-12 13:45:08 +000022977# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022978{ echo "$as_me:$LINENO: checking for socketpair" >&5
22979echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022980cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022981/* confdefs.h. */
22982_ACEOF
22983cat confdefs.h >>conftest.$ac_ext
22984cat >>conftest.$ac_ext <<_ACEOF
22985/* end confdefs.h. */
22986
22987#include <sys/types.h>
22988#include <sys/socket.h>
22989
22990int
22991main ()
22992{
22993void *x=socketpair
22994 ;
22995 return 0;
22996}
22997_ACEOF
22998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999if { (ac_try="$ac_compile"
23000case "(($ac_try" in
23001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23002 *) ac_try_echo=$ac_try;;
23003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023007 grep -v '^ *+' conftest.er1 >conftest.err
23008 rm -f conftest.er1
23009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023011 (exit $ac_status); } && {
23012 test -z "$ac_c_werror_flag" ||
23013 test ! -s conftest.err
23014 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023015
23016cat >>confdefs.h <<\_ACEOF
23017#define HAVE_SOCKETPAIR 1
23018_ACEOF
23019
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023020 { echo "$as_me:$LINENO: result: yes" >&5
23021echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023022else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023023 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023024sed 's/^/| /' conftest.$ac_ext >&5
23025
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023026 { echo "$as_me:$LINENO: result: no" >&5
23027echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023028
23029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023030
23031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023032
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023033# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023034{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23035echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023037/* confdefs.h. */
23038_ACEOF
23039cat confdefs.h >>conftest.$ac_ext
23040cat >>conftest.$ac_ext <<_ACEOF
23041/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023042#include <sys/types.h>
23043#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023044int
23045main ()
23046{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023047struct sockaddr x;
23048x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023049 ;
23050 return 0;
23051}
23052_ACEOF
23053rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054if { (ac_try="$ac_compile"
23055case "(($ac_try" in
23056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23057 *) ac_try_echo=$ac_try;;
23058esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023060 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023061 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023062 grep -v '^ *+' conftest.er1 >conftest.err
23063 rm -f conftest.er1
23064 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023066 (exit $ac_status); } && {
23067 test -z "$ac_c_werror_flag" ||
23068 test ! -s conftest.err
23069 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023070 { echo "$as_me:$LINENO: result: yes" >&5
23071echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023072
23073cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023074#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023075_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023076
23077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023079sed 's/^/| /' conftest.$ac_ext >&5
23080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023081 { echo "$as_me:$LINENO: result: no" >&5
23082echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023084
23085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023086
Guido van Rossumda88dad1995-01-26 00:46:29 +000023087va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023088{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23089echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023091/* confdefs.h. */
23092_ACEOF
23093cat confdefs.h >>conftest.$ac_ext
23094cat >>conftest.$ac_ext <<_ACEOF
23095/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023096
23097#ifdef HAVE_STDARG_PROTOTYPES
23098#include <stdarg.h>
23099#else
23100#include <varargs.h>
23101#endif
23102
Martin v. Löwis11437992002-04-12 09:54:03 +000023103int
23104main ()
23105{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023106va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023107 ;
23108 return 0;
23109}
23110_ACEOF
23111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023112if { (ac_try="$ac_compile"
23113case "(($ac_try" in
23114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23115 *) ac_try_echo=$ac_try;;
23116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023120 grep -v '^ *+' conftest.er1 >conftest.err
23121 rm -f conftest.er1
23122 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124 (exit $ac_status); } && {
23125 test -z "$ac_c_werror_flag" ||
23126 test ! -s conftest.err
23127 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023128 :
23129else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023131sed 's/^/| /' conftest.$ac_ext >&5
23132
Martin v. Löwis11437992002-04-12 09:54:03 +000023133
23134
23135cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023136#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023137_ACEOF
23138
Guido van Rossumda88dad1995-01-26 00:46:29 +000023139 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023140
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023142
23143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023144{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23145echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023146
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023147# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023148
23149
23150
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023151{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23152echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023153if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023154 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023155else
Martin v. Löwis11437992002-04-12 09:54:03 +000023156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023157/* confdefs.h. */
23158_ACEOF
23159cat confdefs.h >>conftest.$ac_ext
23160cat >>conftest.$ac_ext <<_ACEOF
23161/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023162/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23163 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23164#define gethostbyname_r innocuous_gethostbyname_r
23165
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023166/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023167 which can conflict with char gethostbyname_r (); below.
23168 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023169 <limits.h> exists even on freestanding compilers. */
23170
23171#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023172# include <limits.h>
23173#else
23174# include <assert.h>
23175#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023176
23177#undef gethostbyname_r
23178
Martin v. Löwiseba40652007-08-30 20:10:57 +000023179/* Override any GCC internal prototype to avoid an error.
23180 Use char because int might match the return type of a GCC
23181 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023182#ifdef __cplusplus
23183extern "C"
23184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023185char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023186/* The GNU C library defines this for functions which it implements
23187 to always fail with ENOSYS. Some functions are actually named
23188 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023189#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023190choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023191#endif
23192
Skip Montanaro6dead952003-09-25 14:50:04 +000023193int
23194main ()
23195{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023196return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023197 ;
23198 return 0;
23199}
23200_ACEOF
23201rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023202if { (ac_try="$ac_link"
23203case "(($ac_try" in
23204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23205 *) ac_try_echo=$ac_try;;
23206esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023210 grep -v '^ *+' conftest.er1 >conftest.err
23211 rm -f conftest.er1
23212 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023214 (exit $ac_status); } && {
23215 test -z "$ac_c_werror_flag" ||
23216 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023217 } && test -s conftest$ac_exeext &&
23218 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023219 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023222sed 's/^/| /' conftest.$ac_ext >&5
23223
Martin v. Löwiseba40652007-08-30 20:10:57 +000023224 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023226
23227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023228 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023230{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23231echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23232if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023233
Martin v. Löwis11437992002-04-12 09:54:03 +000023234 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023235#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023236_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023237
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023238 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23239echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023240 OLD_CFLAGS=$CFLAGS
23241 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023243/* confdefs.h. */
23244_ACEOF
23245cat confdefs.h >>conftest.$ac_ext
23246cat >>conftest.$ac_ext <<_ACEOF
23247/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023248
23249# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023250
Martin v. Löwis11437992002-04-12 09:54:03 +000023251int
23252main ()
23253{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023254
23255 char *name;
23256 struct hostent *he, *res;
23257 char buffer[2048];
23258 int buflen = 2048;
23259 int h_errnop;
23260
23261 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023262
23263 ;
23264 return 0;
23265}
23266_ACEOF
23267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268if { (ac_try="$ac_compile"
23269case "(($ac_try" in
23270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23271 *) ac_try_echo=$ac_try;;
23272esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023276 grep -v '^ *+' conftest.er1 >conftest.err
23277 rm -f conftest.er1
23278 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280 (exit $ac_status); } && {
23281 test -z "$ac_c_werror_flag" ||
23282 test ! -s conftest.err
23283 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023284
23285 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023286#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023287_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023288
Martin v. Löwis11437992002-04-12 09:54:03 +000023289
23290cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023291#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023292_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023294 { echo "$as_me:$LINENO: result: yes" >&5
23295echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023296
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023299sed 's/^/| /' conftest.$ac_ext >&5
23300
Martin v. Löwis11437992002-04-12 09:54:03 +000023301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023302 { echo "$as_me:$LINENO: result: no" >&5
23303echo "${ECHO_T}no" >&6; }
23304 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23305echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023307/* confdefs.h. */
23308_ACEOF
23309cat confdefs.h >>conftest.$ac_ext
23310cat >>conftest.$ac_ext <<_ACEOF
23311/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023312
23313# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023314
Martin v. Löwis11437992002-04-12 09:54:03 +000023315int
23316main ()
23317{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023318
23319 char *name;
23320 struct hostent *he;
23321 char buffer[2048];
23322 int buflen = 2048;
23323 int h_errnop;
23324
23325 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023326
23327 ;
23328 return 0;
23329}
23330_ACEOF
23331rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023332if { (ac_try="$ac_compile"
23333case "(($ac_try" in
23334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23335 *) ac_try_echo=$ac_try;;
23336esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023340 grep -v '^ *+' conftest.er1 >conftest.err
23341 rm -f conftest.er1
23342 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023344 (exit $ac_status); } && {
23345 test -z "$ac_c_werror_flag" ||
23346 test ! -s conftest.err
23347 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023348
23349 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023350#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023351_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023352
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
23354cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023355#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023356_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023358 { echo "$as_me:$LINENO: result: yes" >&5
23359echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023360
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023363sed 's/^/| /' conftest.$ac_ext >&5
23364
Martin v. Löwis11437992002-04-12 09:54:03 +000023365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023366 { echo "$as_me:$LINENO: result: no" >&5
23367echo "${ECHO_T}no" >&6; }
23368 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23369echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023371/* confdefs.h. */
23372_ACEOF
23373cat confdefs.h >>conftest.$ac_ext
23374cat >>conftest.$ac_ext <<_ACEOF
23375/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023376
23377# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023378
Martin v. Löwis11437992002-04-12 09:54:03 +000023379int
23380main ()
23381{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023382
23383 char *name;
23384 struct hostent *he;
23385 struct hostent_data data;
23386
23387 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023388
23389 ;
23390 return 0;
23391}
23392_ACEOF
23393rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023394if { (ac_try="$ac_compile"
23395case "(($ac_try" in
23396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397 *) ac_try_echo=$ac_try;;
23398esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023402 grep -v '^ *+' conftest.er1 >conftest.err
23403 rm -f conftest.er1
23404 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 (exit $ac_status); } && {
23407 test -z "$ac_c_werror_flag" ||
23408 test ! -s conftest.err
23409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023410
23411 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023412#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023413_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023414
Martin v. Löwis11437992002-04-12 09:54:03 +000023415
23416cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023417#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023418_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023419
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023420 { echo "$as_me:$LINENO: result: yes" >&5
23421echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023423else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023425sed 's/^/| /' conftest.$ac_ext >&5
23426
Martin v. Löwis11437992002-04-12 09:54:03 +000023427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023428 { echo "$as_me:$LINENO: result: no" >&5
23429echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023430
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023432
23433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023434
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436
23437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023438
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023440
23441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023442 CFLAGS=$OLD_CFLAGS
23443
23444else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023445
Martin v. Löwis11437992002-04-12 09:54:03 +000023446
23447for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023448do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023449as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23450{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23451echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023452if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023453 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023454else
Martin v. Löwis11437992002-04-12 09:54:03 +000023455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023456/* confdefs.h. */
23457_ACEOF
23458cat confdefs.h >>conftest.$ac_ext
23459cat >>conftest.$ac_ext <<_ACEOF
23460/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023461/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23462 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23463#define $ac_func innocuous_$ac_func
23464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023465/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023466 which can conflict with char $ac_func (); below.
23467 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023468 <limits.h> exists even on freestanding compilers. */
23469
23470#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023471# include <limits.h>
23472#else
23473# include <assert.h>
23474#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023475
23476#undef $ac_func
23477
Martin v. Löwiseba40652007-08-30 20:10:57 +000023478/* Override any GCC internal prototype to avoid an error.
23479 Use char because int might match the return type of a GCC
23480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023481#ifdef __cplusplus
23482extern "C"
23483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023484char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023485/* The GNU C library defines this for functions which it implements
23486 to always fail with ENOSYS. Some functions are actually named
23487 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023488#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023489choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023490#endif
23491
Skip Montanaro6dead952003-09-25 14:50:04 +000023492int
23493main ()
23494{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023495return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023496 ;
23497 return 0;
23498}
23499_ACEOF
23500rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023501if { (ac_try="$ac_link"
23502case "(($ac_try" in
23503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23504 *) ac_try_echo=$ac_try;;
23505esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023509 grep -v '^ *+' conftest.er1 >conftest.err
23510 rm -f conftest.er1
23511 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023513 (exit $ac_status); } && {
23514 test -z "$ac_c_werror_flag" ||
23515 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023516 } && test -s conftest$ac_exeext &&
23517 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023518 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023519else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023521sed 's/^/| /' conftest.$ac_ext >&5
23522
Martin v. Löwiseba40652007-08-30 20:10:57 +000023523 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023525
23526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023527 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023528fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023529ac_res=`eval echo '${'$as_ac_var'}'`
23530 { echo "$as_me:$LINENO: result: $ac_res" >&5
23531echo "${ECHO_T}$ac_res" >&6; }
23532if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023533 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023534#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023535_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023537fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023538done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023539
Michael W. Hudson54241132001-12-07 15:38:26 +000023540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023541fi
23542
Michael W. Hudson54241132001-12-07 15:38:26 +000023543
23544
23545
23546
23547
23548
Guido van Rossum627b2d71993-12-24 10:39:16 +000023549# checks for system services
23550# (none yet)
23551
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023552# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023553{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23554echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023555if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023556 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023557else
Martin v. Löwis11437992002-04-12 09:54:03 +000023558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023559/* confdefs.h. */
23560_ACEOF
23561cat confdefs.h >>conftest.$ac_ext
23562cat >>conftest.$ac_ext <<_ACEOF
23563/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023564/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23566#define __fpu_control innocuous___fpu_control
23567
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023568/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023569 which can conflict with char __fpu_control (); below.
23570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023571 <limits.h> exists even on freestanding compilers. */
23572
23573#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023574# include <limits.h>
23575#else
23576# include <assert.h>
23577#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023578
23579#undef __fpu_control
23580
Martin v. Löwiseba40652007-08-30 20:10:57 +000023581/* Override any GCC internal prototype to avoid an error.
23582 Use char because int might match the return type of a GCC
23583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023584#ifdef __cplusplus
23585extern "C"
23586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023587char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023588/* The GNU C library defines this for functions which it implements
23589 to always fail with ENOSYS. Some functions are actually named
23590 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023592choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023593#endif
23594
Skip Montanaro6dead952003-09-25 14:50:04 +000023595int
23596main ()
23597{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023598return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023599 ;
23600 return 0;
23601}
23602_ACEOF
23603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023604if { (ac_try="$ac_link"
23605case "(($ac_try" in
23606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23607 *) ac_try_echo=$ac_try;;
23608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023612 grep -v '^ *+' conftest.er1 >conftest.err
23613 rm -f conftest.er1
23614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023616 (exit $ac_status); } && {
23617 test -z "$ac_c_werror_flag" ||
23618 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023619 } && test -s conftest$ac_exeext &&
23620 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023621 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023624sed 's/^/| /' conftest.$ac_ext >&5
23625
Martin v. Löwiseba40652007-08-30 20:10:57 +000023626 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023628
23629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023630 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023631fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023632{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23633echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23634if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023635 :
23636else
Martin v. Löwis11437992002-04-12 09:54:03 +000023637
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023638{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23639echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023640if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023641 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023642else
Martin v. Löwis11437992002-04-12 09:54:03 +000023643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023644LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023645cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023646/* confdefs.h. */
23647_ACEOF
23648cat confdefs.h >>conftest.$ac_ext
23649cat >>conftest.$ac_ext <<_ACEOF
23650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023651
Martin v. Löwiseba40652007-08-30 20:10:57 +000023652/* Override any GCC internal prototype to avoid an error.
23653 Use char because int might match the return type of a GCC
23654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023655#ifdef __cplusplus
23656extern "C"
23657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023658char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023659int
23660main ()
23661{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023662return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023663 ;
23664 return 0;
23665}
23666_ACEOF
23667rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023668if { (ac_try="$ac_link"
23669case "(($ac_try" in
23670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23671 *) ac_try_echo=$ac_try;;
23672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023674 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023676 grep -v '^ *+' conftest.er1 >conftest.err
23677 rm -f conftest.er1
23678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023680 (exit $ac_status); } && {
23681 test -z "$ac_c_werror_flag" ||
23682 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023683 } && test -s conftest$ac_exeext &&
23684 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023685 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023686else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023688sed 's/^/| /' conftest.$ac_ext >&5
23689
Martin v. Löwiseba40652007-08-30 20:10:57 +000023690 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023692
23693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023697{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23698echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23699if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023700 cat >>confdefs.h <<_ACEOF
23701#define HAVE_LIBIEEE 1
23702_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023704 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023705
Guido van Rossum627b2d71993-12-24 10:39:16 +000023706fi
23707
Michael W. Hudson54241132001-12-07 15:38:26 +000023708
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023709fi
23710
Michael W. Hudson54241132001-12-07 15:38:26 +000023711
Guido van Rossum7f253911997-05-09 02:42:48 +000023712# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023713{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23714echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023715
Martin v. Löwiseba40652007-08-30 20:10:57 +000023716# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023717if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023719if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023720then
23721
23722cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023723#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023724_ACEOF
23725
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023726 { echo "$as_me:$LINENO: result: yes" >&5
23727echo "${ECHO_T}yes" >&6; }
23728else { echo "$as_me:$LINENO: result: no" >&5
23729echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023730fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023732 { echo "$as_me:$LINENO: result: no" >&5
23733echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023734fi
23735
Guido van Rossum7f253911997-05-09 02:42:48 +000023736
Guido van Rossum7f43da71994-08-01 12:15:30 +000023737# check for --with-libm=...
23738
Guido van Rossum563e7081996-09-10 18:20:48 +000023739case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023740Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023741BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023742*) LIBM=-lm
23743esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023744{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23745echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023746
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023748if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023750if test "$withval" = no
23751then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023752 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23753echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023754elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023755then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023756 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23757echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23758else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23759echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023760 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023761fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023762else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023763 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23764echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023765fi
23766
Guido van Rossum7f43da71994-08-01 12:15:30 +000023767
23768# check for --with-libc=...
23769
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023770{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23771echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023772
Martin v. Löwiseba40652007-08-30 20:10:57 +000023773# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023774if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023776if test "$withval" = no
23777then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023778 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23779echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023780elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023781then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023782 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23783echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23784else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23785echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023786 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023787fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023789 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23790echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023791fi
23792
Guido van Rossum7f43da71994-08-01 12:15:30 +000023793
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023794# **************************************************
23795# * Check for various properties of floating point *
23796# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023797
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023798{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23799echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23800if test "${ac_cv_little_endian_double+set}" = set; then
23801 echo $ECHO_N "(cached) $ECHO_C" >&6
23802else
23803
23804if test "$cross_compiling" = yes; then
23805 ac_cv_little_endian_double=no
23806else
23807 cat >conftest.$ac_ext <<_ACEOF
23808/* confdefs.h. */
23809_ACEOF
23810cat confdefs.h >>conftest.$ac_ext
23811cat >>conftest.$ac_ext <<_ACEOF
23812/* end confdefs.h. */
23813
23814#include <string.h>
23815int main() {
23816 double x = 9006104071832581.0;
23817 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23818 return 0;
23819 else
23820 return 1;
23821}
23822
23823_ACEOF
23824rm -f conftest$ac_exeext
23825if { (ac_try="$ac_link"
23826case "(($ac_try" in
23827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23828 *) ac_try_echo=$ac_try;;
23829esac
23830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23831 (eval "$ac_link") 2>&5
23832 ac_status=$?
23833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23835 { (case "(($ac_try" in
23836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23837 *) ac_try_echo=$ac_try;;
23838esac
23839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23840 (eval "$ac_try") 2>&5
23841 ac_status=$?
23842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23843 (exit $ac_status); }; }; then
23844 ac_cv_little_endian_double=yes
23845else
23846 echo "$as_me: program exited with status $ac_status" >&5
23847echo "$as_me: failed program was:" >&5
23848sed 's/^/| /' conftest.$ac_ext >&5
23849
23850( exit $ac_status )
23851ac_cv_little_endian_double=no
23852fi
23853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23854fi
23855
23856
23857fi
23858
23859{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23860echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23861if test "$ac_cv_little_endian_double" = yes
23862then
23863
23864cat >>confdefs.h <<\_ACEOF
23865#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23866_ACEOF
23867
23868fi
23869
23870{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23871echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23872if test "${ac_cv_big_endian_double+set}" = set; then
23873 echo $ECHO_N "(cached) $ECHO_C" >&6
23874else
23875
23876if test "$cross_compiling" = yes; then
23877 ac_cv_big_endian_double=no
23878else
23879 cat >conftest.$ac_ext <<_ACEOF
23880/* confdefs.h. */
23881_ACEOF
23882cat confdefs.h >>conftest.$ac_ext
23883cat >>conftest.$ac_ext <<_ACEOF
23884/* end confdefs.h. */
23885
23886#include <string.h>
23887int main() {
23888 double x = 9006104071832581.0;
23889 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23890 return 0;
23891 else
23892 return 1;
23893}
23894
23895_ACEOF
23896rm -f conftest$ac_exeext
23897if { (ac_try="$ac_link"
23898case "(($ac_try" in
23899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23900 *) ac_try_echo=$ac_try;;
23901esac
23902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23903 (eval "$ac_link") 2>&5
23904 ac_status=$?
23905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23906 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23907 { (case "(($ac_try" in
23908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23909 *) ac_try_echo=$ac_try;;
23910esac
23911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23912 (eval "$ac_try") 2>&5
23913 ac_status=$?
23914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23915 (exit $ac_status); }; }; then
23916 ac_cv_big_endian_double=yes
23917else
23918 echo "$as_me: program exited with status $ac_status" >&5
23919echo "$as_me: failed program was:" >&5
23920sed 's/^/| /' conftest.$ac_ext >&5
23921
23922( exit $ac_status )
23923ac_cv_big_endian_double=no
23924fi
23925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23926fi
23927
23928
23929fi
23930
23931{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23932echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23933if test "$ac_cv_big_endian_double" = yes
23934then
23935
23936cat >>confdefs.h <<\_ACEOF
23937#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23938_ACEOF
23939
23940fi
23941
23942# Some ARM platforms use a mixed-endian representation for doubles.
23943# While Python doesn't currently have full support for these platforms
23944# (see e.g., issue 1762561), we can at least make sure that float <-> string
23945# conversions work.
23946{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23947echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
23948if test "${ac_cv_mixed_endian_double+set}" = set; then
23949 echo $ECHO_N "(cached) $ECHO_C" >&6
23950else
23951
23952if test "$cross_compiling" = yes; then
23953 ac_cv_mixed_endian_double=no
23954else
23955 cat >conftest.$ac_ext <<_ACEOF
23956/* confdefs.h. */
23957_ACEOF
23958cat confdefs.h >>conftest.$ac_ext
23959cat >>conftest.$ac_ext <<_ACEOF
23960/* end confdefs.h. */
23961
23962#include <string.h>
23963int main() {
23964 double x = 9006104071832581.0;
23965 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23966 return 0;
23967 else
23968 return 1;
23969}
23970
23971_ACEOF
23972rm -f conftest$ac_exeext
23973if { (ac_try="$ac_link"
23974case "(($ac_try" in
23975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23976 *) ac_try_echo=$ac_try;;
23977esac
23978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23979 (eval "$ac_link") 2>&5
23980 ac_status=$?
23981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23983 { (case "(($ac_try" in
23984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23985 *) ac_try_echo=$ac_try;;
23986esac
23987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23988 (eval "$ac_try") 2>&5
23989 ac_status=$?
23990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23991 (exit $ac_status); }; }; then
23992 ac_cv_mixed_endian_double=yes
23993else
23994 echo "$as_me: program exited with status $ac_status" >&5
23995echo "$as_me: failed program was:" >&5
23996sed 's/^/| /' conftest.$ac_ext >&5
23997
23998( exit $ac_status )
23999ac_cv_mixed_endian_double=no
24000fi
24001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24002fi
24003
24004
24005fi
24006
24007{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24008echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24009if test "$ac_cv_mixed_endian_double" = yes
24010then
24011
24012cat >>confdefs.h <<\_ACEOF
24013#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24014_ACEOF
24015
24016fi
24017
24018# The short float repr introduced in Python 3.1 requires the
24019# correctly-rounded string <-> double conversion functions from
24020# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24021# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024022# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024023# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024024
24025# This inline assembler syntax may also work for suncc and icc,
24026# so we try it on all platforms.
24027
24028{ 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 +000024029echo $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 +000024030cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024031/* confdefs.h. */
24032_ACEOF
24033cat confdefs.h >>conftest.$ac_ext
24034cat >>conftest.$ac_ext <<_ACEOF
24035/* end confdefs.h. */
24036
24037int
24038main ()
24039{
24040
Mark Dickinsona548dee2009-11-15 13:12:43 +000024041 unsigned short cw;
24042 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24043 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024044
24045 ;
24046 return 0;
24047}
24048_ACEOF
24049rm -f conftest.$ac_objext
24050if { (ac_try="$ac_compile"
24051case "(($ac_try" in
24052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24053 *) ac_try_echo=$ac_try;;
24054esac
24055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24056 (eval "$ac_compile") 2>conftest.er1
24057 ac_status=$?
24058 grep -v '^ *+' conftest.er1 >conftest.err
24059 rm -f conftest.er1
24060 cat conftest.err >&5
24061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24062 (exit $ac_status); } && {
24063 test -z "$ac_c_werror_flag" ||
24064 test ! -s conftest.err
24065 } && test -s conftest.$ac_objext; then
24066 have_gcc_asm_for_x87=yes
24067else
24068 echo "$as_me: failed program was:" >&5
24069sed 's/^/| /' conftest.$ac_ext >&5
24070
24071 have_gcc_asm_for_x87=no
24072fi
24073
24074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024075{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024076echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024077if test "$have_gcc_asm_for_x87" = yes
24078then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024079
24080cat >>confdefs.h <<\_ACEOF
24081#define HAVE_GCC_ASM_FOR_X87 1
24082_ACEOF
24083
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024084fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024085
Mark Dickinson04b27232009-01-04 12:29:36 +000024086# Detect whether system arithmetic is subject to x87-style double
24087# rounding issues. The result of this test has little meaning on non
24088# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24089# mode is round-to-nearest and double rounding issues are present, and
24090# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024091{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24092echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024093# $BASECFLAGS may affect the result
24094ac_save_cc="$CC"
24095CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024096if test "$cross_compiling" = yes; then
24097 ac_cv_x87_double_rounding=no
24098else
24099 cat >conftest.$ac_ext <<_ACEOF
24100/* confdefs.h. */
24101_ACEOF
24102cat confdefs.h >>conftest.$ac_ext
24103cat >>conftest.$ac_ext <<_ACEOF
24104/* end confdefs.h. */
24105
24106#include <stdlib.h>
24107#include <math.h>
24108int main() {
24109 volatile double x, y, z;
24110 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24111 x = 0.99999999999999989; /* 1-2**-53 */
24112 y = 1./x;
24113 if (y != 1.)
24114 exit(0);
24115 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24116 x = 1e16;
24117 y = 2.99999;
24118 z = x + y;
24119 if (z != 1e16+4.)
24120 exit(0);
24121 /* both tests show evidence of double rounding */
24122 exit(1);
24123}
24124
24125_ACEOF
24126rm -f conftest$ac_exeext
24127if { (ac_try="$ac_link"
24128case "(($ac_try" in
24129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24130 *) ac_try_echo=$ac_try;;
24131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024133 (eval "$ac_link") 2>&5
24134 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24137 { (case "(($ac_try" in
24138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24139 *) ac_try_echo=$ac_try;;
24140esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024142 (eval "$ac_try") 2>&5
24143 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024145 (exit $ac_status); }; }; then
24146 ac_cv_x87_double_rounding=no
24147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024148 echo "$as_me: program exited with status $ac_status" >&5
24149echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024150sed 's/^/| /' conftest.$ac_ext >&5
24151
24152( exit $ac_status )
24153ac_cv_x87_double_rounding=yes
24154fi
24155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24156fi
24157
24158
Mark Dickinson99abd142009-10-24 13:44:16 +000024159CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024160{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24161echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024162if test "$ac_cv_x87_double_rounding" = yes
24163then
24164
24165cat >>confdefs.h <<\_ACEOF
24166#define X87_DOUBLE_ROUNDING 1
24167_ACEOF
24168
24169fi
24170
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024171# ************************************
24172# * Check for mathematical functions *
24173# ************************************
24174
24175LIBS_SAVE=$LIBS
24176LIBS="$LIBS $LIBM"
24177
Mark Dickinson265d7382008-04-21 22:32:24 +000024178# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24179# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024180{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24181echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024182if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024183 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024184else
24185
24186if test "$cross_compiling" = yes; then
24187 ac_cv_tanh_preserves_zero_sign=no
24188else
24189 cat >conftest.$ac_ext <<_ACEOF
24190/* confdefs.h. */
24191_ACEOF
24192cat confdefs.h >>conftest.$ac_ext
24193cat >>conftest.$ac_ext <<_ACEOF
24194/* end confdefs.h. */
24195
24196#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024197#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024198int main() {
24199 /* return 0 if either negative zeros don't exist
24200 on this platform or if negative zeros exist
24201 and tanh(-0.) == -0. */
24202 if (atan2(0., -1.) == atan2(-0., -1.) ||
24203 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24204 else exit(1);
24205}
24206
24207_ACEOF
24208rm -f conftest$ac_exeext
24209if { (ac_try="$ac_link"
24210case "(($ac_try" in
24211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24212 *) ac_try_echo=$ac_try;;
24213esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024215 (eval "$ac_link") 2>&5
24216 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24219 { (case "(($ac_try" in
24220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24221 *) ac_try_echo=$ac_try;;
24222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024224 (eval "$ac_try") 2>&5
24225 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024227 (exit $ac_status); }; }; then
24228 ac_cv_tanh_preserves_zero_sign=yes
24229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024230 echo "$as_me: program exited with status $ac_status" >&5
24231echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024232sed 's/^/| /' conftest.$ac_ext >&5
24233
24234( exit $ac_status )
24235ac_cv_tanh_preserves_zero_sign=no
24236fi
24237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24238fi
24239
24240
24241fi
24242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024243{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24244echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024245if test "$ac_cv_tanh_preserves_zero_sign" = yes
24246then
24247
24248cat >>confdefs.h <<\_ACEOF
24249#define TANH_PRESERVES_ZERO_SIGN 1
24250_ACEOF
24251
24252fi
24253
Martin v. Löwis11437992002-04-12 09:54:03 +000024254
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024255
Michael W. Hudson54241132001-12-07 15:38:26 +000024256
Christian Heimes0a8143f2007-12-18 23:22:54 +000024257
24258
24259
24260
24261
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024262
Mark Dickinson65898e02009-09-05 10:27:00 +000024263for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24264do
24265as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24266{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24267echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24268if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24269 echo $ECHO_N "(cached) $ECHO_C" >&6
24270else
24271 cat >conftest.$ac_ext <<_ACEOF
24272/* confdefs.h. */
24273_ACEOF
24274cat confdefs.h >>conftest.$ac_ext
24275cat >>conftest.$ac_ext <<_ACEOF
24276/* end confdefs.h. */
24277/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24278 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24279#define $ac_func innocuous_$ac_func
24280
24281/* System header to define __stub macros and hopefully few prototypes,
24282 which can conflict with char $ac_func (); below.
24283 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24284 <limits.h> exists even on freestanding compilers. */
24285
24286#ifdef __STDC__
24287# include <limits.h>
24288#else
24289# include <assert.h>
24290#endif
24291
24292#undef $ac_func
24293
24294/* Override any GCC internal prototype to avoid an error.
24295 Use char because int might match the return type of a GCC
24296 builtin and then its argument prototype would still apply. */
24297#ifdef __cplusplus
24298extern "C"
24299#endif
24300char $ac_func ();
24301/* The GNU C library defines this for functions which it implements
24302 to always fail with ENOSYS. Some functions are actually named
24303 something starting with __ and the normal name is an alias. */
24304#if defined __stub_$ac_func || defined __stub___$ac_func
24305choke me
24306#endif
24307
24308int
24309main ()
24310{
24311return $ac_func ();
24312 ;
24313 return 0;
24314}
24315_ACEOF
24316rm -f conftest.$ac_objext conftest$ac_exeext
24317if { (ac_try="$ac_link"
24318case "(($ac_try" in
24319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24320 *) ac_try_echo=$ac_try;;
24321esac
24322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24323 (eval "$ac_link") 2>conftest.er1
24324 ac_status=$?
24325 grep -v '^ *+' conftest.er1 >conftest.err
24326 rm -f conftest.er1
24327 cat conftest.err >&5
24328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24329 (exit $ac_status); } && {
24330 test -z "$ac_c_werror_flag" ||
24331 test ! -s conftest.err
24332 } && test -s conftest$ac_exeext &&
24333 $as_test_x conftest$ac_exeext; then
24334 eval "$as_ac_var=yes"
24335else
24336 echo "$as_me: failed program was:" >&5
24337sed 's/^/| /' conftest.$ac_ext >&5
24338
24339 eval "$as_ac_var=no"
24340fi
24341
24342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24343 conftest$ac_exeext conftest.$ac_ext
24344fi
24345ac_res=`eval echo '${'$as_ac_var'}'`
24346 { echo "$as_me:$LINENO: result: $ac_res" >&5
24347echo "${ECHO_T}$ac_res" >&6; }
24348if test `eval echo '${'$as_ac_var'}'` = yes; then
24349 cat >>confdefs.h <<_ACEOF
24350#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24351_ACEOF
24352
24353fi
24354done
24355
24356
24357
24358
24359
24360
24361for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024362do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024363as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24364{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24365echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024366if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024367 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024368else
24369 cat >conftest.$ac_ext <<_ACEOF
24370/* confdefs.h. */
24371_ACEOF
24372cat confdefs.h >>conftest.$ac_ext
24373cat >>conftest.$ac_ext <<_ACEOF
24374/* end confdefs.h. */
24375/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24376 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24377#define $ac_func innocuous_$ac_func
24378
24379/* System header to define __stub macros and hopefully few prototypes,
24380 which can conflict with char $ac_func (); below.
24381 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24382 <limits.h> exists even on freestanding compilers. */
24383
24384#ifdef __STDC__
24385# include <limits.h>
24386#else
24387# include <assert.h>
24388#endif
24389
24390#undef $ac_func
24391
24392/* Override any GCC internal prototype to avoid an error.
24393 Use char because int might match the return type of a GCC
24394 builtin and then its argument prototype would still apply. */
24395#ifdef __cplusplus
24396extern "C"
24397#endif
24398char $ac_func ();
24399/* The GNU C library defines this for functions which it implements
24400 to always fail with ENOSYS. Some functions are actually named
24401 something starting with __ and the normal name is an alias. */
24402#if defined __stub_$ac_func || defined __stub___$ac_func
24403choke me
24404#endif
24405
24406int
24407main ()
24408{
24409return $ac_func ();
24410 ;
24411 return 0;
24412}
24413_ACEOF
24414rm -f conftest.$ac_objext conftest$ac_exeext
24415if { (ac_try="$ac_link"
24416case "(($ac_try" in
24417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24418 *) ac_try_echo=$ac_try;;
24419esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024421 (eval "$ac_link") 2>conftest.er1
24422 ac_status=$?
24423 grep -v '^ *+' conftest.er1 >conftest.err
24424 rm -f conftest.er1
24425 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024427 (exit $ac_status); } && {
24428 test -z "$ac_c_werror_flag" ||
24429 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024430 } && test -s conftest$ac_exeext &&
24431 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024432 eval "$as_ac_var=yes"
24433else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024434 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024435sed 's/^/| /' conftest.$ac_ext >&5
24436
24437 eval "$as_ac_var=no"
24438fi
24439
24440rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24441 conftest$ac_exeext conftest.$ac_ext
24442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024443ac_res=`eval echo '${'$as_ac_var'}'`
24444 { echo "$as_me:$LINENO: result: $ac_res" >&5
24445echo "${ECHO_T}$ac_res" >&6; }
24446if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024447 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024448#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024449_ACEOF
24450
24451fi
24452done
24453
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024454{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24455echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024456if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024457 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024458else
24459 cat >conftest.$ac_ext <<_ACEOF
24460/* confdefs.h. */
24461_ACEOF
24462cat confdefs.h >>conftest.$ac_ext
24463cat >>conftest.$ac_ext <<_ACEOF
24464/* end confdefs.h. */
24465#include <math.h>
24466
24467int
24468main ()
24469{
24470#ifndef isinf
24471 (void) isinf;
24472#endif
24473
24474 ;
24475 return 0;
24476}
24477_ACEOF
24478rm -f conftest.$ac_objext
24479if { (ac_try="$ac_compile"
24480case "(($ac_try" in
24481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24482 *) ac_try_echo=$ac_try;;
24483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024485 (eval "$ac_compile") 2>conftest.er1
24486 ac_status=$?
24487 grep -v '^ *+' conftest.er1 >conftest.err
24488 rm -f conftest.er1
24489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024491 (exit $ac_status); } && {
24492 test -z "$ac_c_werror_flag" ||
24493 test ! -s conftest.err
24494 } && test -s conftest.$ac_objext; then
24495 ac_cv_have_decl_isinf=yes
24496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024497 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024498sed 's/^/| /' conftest.$ac_ext >&5
24499
24500 ac_cv_have_decl_isinf=no
24501fi
24502
24503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24504fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024505{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24506echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24507if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024508
24509cat >>confdefs.h <<_ACEOF
24510#define HAVE_DECL_ISINF 1
24511_ACEOF
24512
24513
24514else
24515 cat >>confdefs.h <<_ACEOF
24516#define HAVE_DECL_ISINF 0
24517_ACEOF
24518
24519
24520fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024521{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24522echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024523if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024524 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024525else
24526 cat >conftest.$ac_ext <<_ACEOF
24527/* confdefs.h. */
24528_ACEOF
24529cat confdefs.h >>conftest.$ac_ext
24530cat >>conftest.$ac_ext <<_ACEOF
24531/* end confdefs.h. */
24532#include <math.h>
24533
24534int
24535main ()
24536{
24537#ifndef isnan
24538 (void) isnan;
24539#endif
24540
24541 ;
24542 return 0;
24543}
24544_ACEOF
24545rm -f conftest.$ac_objext
24546if { (ac_try="$ac_compile"
24547case "(($ac_try" in
24548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24549 *) ac_try_echo=$ac_try;;
24550esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024552 (eval "$ac_compile") 2>conftest.er1
24553 ac_status=$?
24554 grep -v '^ *+' conftest.er1 >conftest.err
24555 rm -f conftest.er1
24556 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024558 (exit $ac_status); } && {
24559 test -z "$ac_c_werror_flag" ||
24560 test ! -s conftest.err
24561 } && test -s conftest.$ac_objext; then
24562 ac_cv_have_decl_isnan=yes
24563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024564 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024565sed 's/^/| /' conftest.$ac_ext >&5
24566
24567 ac_cv_have_decl_isnan=no
24568fi
24569
24570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24571fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024572{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24573echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24574if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024575
24576cat >>confdefs.h <<_ACEOF
24577#define HAVE_DECL_ISNAN 1
24578_ACEOF
24579
24580
24581else
24582 cat >>confdefs.h <<_ACEOF
24583#define HAVE_DECL_ISNAN 0
24584_ACEOF
24585
24586
24587fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024588{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24589echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024590if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024591 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024592else
24593 cat >conftest.$ac_ext <<_ACEOF
24594/* confdefs.h. */
24595_ACEOF
24596cat confdefs.h >>conftest.$ac_ext
24597cat >>conftest.$ac_ext <<_ACEOF
24598/* end confdefs.h. */
24599#include <math.h>
24600
24601int
24602main ()
24603{
24604#ifndef isfinite
24605 (void) isfinite;
24606#endif
24607
24608 ;
24609 return 0;
24610}
24611_ACEOF
24612rm -f conftest.$ac_objext
24613if { (ac_try="$ac_compile"
24614case "(($ac_try" in
24615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24616 *) ac_try_echo=$ac_try;;
24617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024619 (eval "$ac_compile") 2>conftest.er1
24620 ac_status=$?
24621 grep -v '^ *+' conftest.er1 >conftest.err
24622 rm -f conftest.er1
24623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024625 (exit $ac_status); } && {
24626 test -z "$ac_c_werror_flag" ||
24627 test ! -s conftest.err
24628 } && test -s conftest.$ac_objext; then
24629 ac_cv_have_decl_isfinite=yes
24630else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024631 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024632sed 's/^/| /' conftest.$ac_ext >&5
24633
24634 ac_cv_have_decl_isfinite=no
24635fi
24636
24637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24638fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024639{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24640echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24641if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024642
24643cat >>confdefs.h <<_ACEOF
24644#define HAVE_DECL_ISFINITE 1
24645_ACEOF
24646
24647
24648else
24649 cat >>confdefs.h <<_ACEOF
24650#define HAVE_DECL_ISFINITE 0
24651_ACEOF
24652
24653
24654fi
24655
24656
Christian Heimes0a8143f2007-12-18 23:22:54 +000024657
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024658LIBS=$LIBS_SAVE
24659
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024660# For multiprocessing module, check that sem_open
24661# actually works. For FreeBSD versions <= 7.2,
24662# the kernel module that provides POSIX semaphores
24663# isn't loaded by default, so an attempt to call
24664# sem_open results in a 'Signal 12' error.
24665{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24666echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24667if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24668 echo $ECHO_N "(cached) $ECHO_C" >&6
24669else
24670 if test "$cross_compiling" = yes; then
24671 ac_cv_posix_semaphores_enabled=yes
24672else
24673 cat >conftest.$ac_ext <<_ACEOF
24674/* confdefs.h. */
24675_ACEOF
24676cat confdefs.h >>conftest.$ac_ext
24677cat >>conftest.$ac_ext <<_ACEOF
24678/* end confdefs.h. */
24679
24680#include <unistd.h>
24681#include <fcntl.h>
24682#include <stdio.h>
24683#include <semaphore.h>
24684#include <sys/stat.h>
24685
24686int main(void) {
24687 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24688 if (a == SEM_FAILED) {
24689 perror("sem_open");
24690 return 1;
24691 }
24692 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024693 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024694 return 0;
24695}
24696
24697_ACEOF
24698rm -f conftest$ac_exeext
24699if { (ac_try="$ac_link"
24700case "(($ac_try" in
24701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24702 *) ac_try_echo=$ac_try;;
24703esac
24704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24705 (eval "$ac_link") 2>&5
24706 ac_status=$?
24707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24709 { (case "(($ac_try" in
24710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24711 *) ac_try_echo=$ac_try;;
24712esac
24713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24714 (eval "$ac_try") 2>&5
24715 ac_status=$?
24716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24717 (exit $ac_status); }; }; then
24718 ac_cv_posix_semaphores_enabled=yes
24719else
24720 echo "$as_me: program exited with status $ac_status" >&5
24721echo "$as_me: failed program was:" >&5
24722sed 's/^/| /' conftest.$ac_ext >&5
24723
24724( exit $ac_status )
24725ac_cv_posix_semaphores_enabled=no
24726fi
24727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24728fi
24729
24730
24731
24732fi
24733
24734{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24735echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24736if test $ac_cv_posix_semaphores_enabled = no
24737then
24738
24739cat >>confdefs.h <<\_ACEOF
24740#define POSIX_SEMAPHORES_NOT_ENABLED 1
24741_ACEOF
24742
24743fi
24744
24745# Multiprocessing check for broken sem_getvalue
24746{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24747echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24748if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24749 echo $ECHO_N "(cached) $ECHO_C" >&6
24750else
24751 if test "$cross_compiling" = yes; then
24752 ac_cv_broken_sem_getvalue=yes
24753else
24754 cat >conftest.$ac_ext <<_ACEOF
24755/* confdefs.h. */
24756_ACEOF
24757cat confdefs.h >>conftest.$ac_ext
24758cat >>conftest.$ac_ext <<_ACEOF
24759/* end confdefs.h. */
24760
24761#include <unistd.h>
24762#include <fcntl.h>
24763#include <stdio.h>
24764#include <semaphore.h>
24765#include <sys/stat.h>
24766
24767int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024768 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024769 int count;
24770 int res;
24771 if(a==SEM_FAILED){
24772 perror("sem_open");
24773 return 1;
24774
24775 }
24776 res = sem_getvalue(a, &count);
24777 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024778 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024779 return res==-1 ? 1 : 0;
24780}
24781
24782_ACEOF
24783rm -f conftest$ac_exeext
24784if { (ac_try="$ac_link"
24785case "(($ac_try" in
24786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24787 *) ac_try_echo=$ac_try;;
24788esac
24789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24790 (eval "$ac_link") 2>&5
24791 ac_status=$?
24792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24793 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24794 { (case "(($ac_try" in
24795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24796 *) ac_try_echo=$ac_try;;
24797esac
24798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24799 (eval "$ac_try") 2>&5
24800 ac_status=$?
24801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24802 (exit $ac_status); }; }; then
24803 ac_cv_broken_sem_getvalue=no
24804else
24805 echo "$as_me: program exited with status $ac_status" >&5
24806echo "$as_me: failed program was:" >&5
24807sed 's/^/| /' conftest.$ac_ext >&5
24808
24809( exit $ac_status )
24810ac_cv_broken_sem_getvalue=yes
24811fi
24812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24813fi
24814
24815
24816
24817fi
24818
24819{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24820echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24821if test $ac_cv_broken_sem_getvalue = yes
24822then
24823
24824cat >>confdefs.h <<\_ACEOF
24825#define HAVE_BROKEN_SEM_GETVALUE 1
24826_ACEOF
24827
24828fi
24829
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024830# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024831{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24832echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024833# Check whether --enable-big-digits was given.
24834if test "${enable_big_digits+set}" = set; then
24835 enableval=$enable_big_digits; case $enable_big_digits in
24836yes)
24837 enable_big_digits=30 ;;
24838no)
24839 enable_big_digits=15 ;;
2484015|30)
24841 ;;
24842*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024843 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24844echo "$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 +000024845 { (exit 1); exit 1; }; } ;;
24846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024847{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24848echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024849
24850cat >>confdefs.h <<_ACEOF
24851#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24852_ACEOF
24853
24854
24855else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024856 { echo "$as_me:$LINENO: result: no value specified" >&5
24857echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024858fi
24859
24860
Guido van Rossumef2255b2000-03-10 22:30:29 +000024861# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024862if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024863 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24864echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024865if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024866 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024868{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24869echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024870else
Martin v. Löwis11437992002-04-12 09:54:03 +000024871 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024872{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24873echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024874cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024875/* confdefs.h. */
24876_ACEOF
24877cat confdefs.h >>conftest.$ac_ext
24878cat >>conftest.$ac_ext <<_ACEOF
24879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024880$ac_includes_default
24881#include <wchar.h>
24882_ACEOF
24883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024884if { (ac_try="$ac_compile"
24885case "(($ac_try" in
24886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24887 *) ac_try_echo=$ac_try;;
24888esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024892 grep -v '^ *+' conftest.er1 >conftest.err
24893 rm -f conftest.er1
24894 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024896 (exit $ac_status); } && {
24897 test -z "$ac_c_werror_flag" ||
24898 test ! -s conftest.err
24899 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024900 ac_header_compiler=yes
24901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024903sed 's/^/| /' conftest.$ac_ext >&5
24904
Martin v. Löwiseba40652007-08-30 20:10:57 +000024905 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024907
24908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024909{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24910echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024911
24912# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024913{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24914echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024916/* confdefs.h. */
24917_ACEOF
24918cat confdefs.h >>conftest.$ac_ext
24919cat >>conftest.$ac_ext <<_ACEOF
24920/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024921#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024922_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024923if { (ac_try="$ac_cpp conftest.$ac_ext"
24924case "(($ac_try" in
24925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24926 *) ac_try_echo=$ac_try;;
24927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024929 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024930 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024931 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024932 rm -f conftest.er1
24933 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024935 (exit $ac_status); } >/dev/null && {
24936 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24937 test ! -s conftest.err
24938 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024939 ac_header_preproc=yes
24940else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024942sed 's/^/| /' conftest.$ac_ext >&5
24943
Martin v. Löwis11437992002-04-12 09:54:03 +000024944 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024945fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024946
Martin v. Löwis11437992002-04-12 09:54:03 +000024947rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024948{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24949echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024950
24951# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024952case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24953 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024954 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24955echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24956 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24957echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024958 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024959 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024960 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024961 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24962echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24963 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24964echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24965 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24966echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24967 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24968echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24969 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24970echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24971 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24972echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000024973 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000024974## -------------------------------------- ##
24975## Report this to http://bugs.python.org/ ##
24976## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024977_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000024978 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024979 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024981{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24982echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024983if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024984 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024985else
24986 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024987fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024988{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24989echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024990
24991fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024992if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024993
24994
24995cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024996#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024997_ACEOF
24998
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024999 wchar_h="yes"
25000
Guido van Rossumef2255b2000-03-10 22:30:29 +000025001else
Martin v. Löwis11437992002-04-12 09:54:03 +000025002 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025003
25004fi
25005
Michael W. Hudson54241132001-12-07 15:38:26 +000025006
Martin v. Löwis11437992002-04-12 09:54:03 +000025007
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025008# determine wchar_t size
25009if test "$wchar_h" = yes
25010then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025011 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25012echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25013if test "${ac_cv_type_wchar_t+set}" = set; then
25014 echo $ECHO_N "(cached) $ECHO_C" >&6
25015else
25016 cat >conftest.$ac_ext <<_ACEOF
25017/* confdefs.h. */
25018_ACEOF
25019cat confdefs.h >>conftest.$ac_ext
25020cat >>conftest.$ac_ext <<_ACEOF
25021/* end confdefs.h. */
25022#include <wchar.h>
25023
25024typedef wchar_t ac__type_new_;
25025int
25026main ()
25027{
25028if ((ac__type_new_ *) 0)
25029 return 0;
25030if (sizeof (ac__type_new_))
25031 return 0;
25032 ;
25033 return 0;
25034}
25035_ACEOF
25036rm -f conftest.$ac_objext
25037if { (ac_try="$ac_compile"
25038case "(($ac_try" in
25039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25040 *) ac_try_echo=$ac_try;;
25041esac
25042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25043 (eval "$ac_compile") 2>conftest.er1
25044 ac_status=$?
25045 grep -v '^ *+' conftest.er1 >conftest.err
25046 rm -f conftest.er1
25047 cat conftest.err >&5
25048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25049 (exit $ac_status); } && {
25050 test -z "$ac_c_werror_flag" ||
25051 test ! -s conftest.err
25052 } && test -s conftest.$ac_objext; then
25053 ac_cv_type_wchar_t=yes
25054else
25055 echo "$as_me: failed program was:" >&5
25056sed 's/^/| /' conftest.$ac_ext >&5
25057
25058 ac_cv_type_wchar_t=no
25059fi
25060
25061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25062fi
25063{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25064echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25065
25066# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25069# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025070{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25071echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025072if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025073 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025074else
Martin v. Löwis11437992002-04-12 09:54:03 +000025075 if test "$cross_compiling" = yes; then
25076 # Depending upon the size, compute the lo and hi bounds.
25077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025078/* confdefs.h. */
25079_ACEOF
25080cat confdefs.h >>conftest.$ac_ext
25081cat >>conftest.$ac_ext <<_ACEOF
25082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025083#include <wchar.h>
25084
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025085 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025086int
25087main ()
25088{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025090test_array [0] = 0
25091
25092 ;
25093 return 0;
25094}
25095_ACEOF
25096rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025097if { (ac_try="$ac_compile"
25098case "(($ac_try" in
25099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25100 *) ac_try_echo=$ac_try;;
25101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025105 grep -v '^ *+' conftest.er1 >conftest.err
25106 rm -f conftest.er1
25107 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025109 (exit $ac_status); } && {
25110 test -z "$ac_c_werror_flag" ||
25111 test ! -s conftest.err
25112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025113 ac_lo=0 ac_mid=0
25114 while :; do
25115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025116/* confdefs.h. */
25117_ACEOF
25118cat confdefs.h >>conftest.$ac_ext
25119cat >>conftest.$ac_ext <<_ACEOF
25120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025121#include <wchar.h>
25122
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025123 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025124int
25125main ()
25126{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025128test_array [0] = 0
25129
25130 ;
25131 return 0;
25132}
25133_ACEOF
25134rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025135if { (ac_try="$ac_compile"
25136case "(($ac_try" in
25137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25138 *) ac_try_echo=$ac_try;;
25139esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025143 grep -v '^ *+' conftest.er1 >conftest.err
25144 rm -f conftest.er1
25145 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025147 (exit $ac_status); } && {
25148 test -z "$ac_c_werror_flag" ||
25149 test ! -s conftest.err
25150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025151 ac_hi=$ac_mid; break
25152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025154sed 's/^/| /' conftest.$ac_ext >&5
25155
Martin v. Löwiseba40652007-08-30 20:10:57 +000025156 ac_lo=`expr $ac_mid + 1`
25157 if test $ac_lo -le $ac_mid; then
25158 ac_lo= ac_hi=
25159 break
25160 fi
25161 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163
25164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025165 done
25166else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025168sed 's/^/| /' conftest.$ac_ext >&5
25169
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025171/* confdefs.h. */
25172_ACEOF
25173cat confdefs.h >>conftest.$ac_ext
25174cat >>conftest.$ac_ext <<_ACEOF
25175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025176#include <wchar.h>
25177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025178 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025179int
25180main ()
25181{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025182static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025183test_array [0] = 0
25184
25185 ;
25186 return 0;
25187}
25188_ACEOF
25189rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025190if { (ac_try="$ac_compile"
25191case "(($ac_try" in
25192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25193 *) ac_try_echo=$ac_try;;
25194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025196 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025198 grep -v '^ *+' conftest.er1 >conftest.err
25199 rm -f conftest.er1
25200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025202 (exit $ac_status); } && {
25203 test -z "$ac_c_werror_flag" ||
25204 test ! -s conftest.err
25205 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025206 ac_hi=-1 ac_mid=-1
25207 while :; do
25208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025209/* confdefs.h. */
25210_ACEOF
25211cat confdefs.h >>conftest.$ac_ext
25212cat >>conftest.$ac_ext <<_ACEOF
25213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025214#include <wchar.h>
25215
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025216 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025217int
25218main ()
25219{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025221test_array [0] = 0
25222
25223 ;
25224 return 0;
25225}
25226_ACEOF
25227rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228if { (ac_try="$ac_compile"
25229case "(($ac_try" in
25230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25231 *) ac_try_echo=$ac_try;;
25232esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025236 grep -v '^ *+' conftest.er1 >conftest.err
25237 rm -f conftest.er1
25238 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025240 (exit $ac_status); } && {
25241 test -z "$ac_c_werror_flag" ||
25242 test ! -s conftest.err
25243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025244 ac_lo=$ac_mid; break
25245else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025247sed 's/^/| /' conftest.$ac_ext >&5
25248
Martin v. Löwiseba40652007-08-30 20:10:57 +000025249 ac_hi=`expr '(' $ac_mid ')' - 1`
25250 if test $ac_mid -le $ac_hi; then
25251 ac_lo= ac_hi=
25252 break
25253 fi
25254 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025256
25257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 done
25259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025261sed 's/^/| /' conftest.$ac_ext >&5
25262
Martin v. Löwiseba40652007-08-30 20:10:57 +000025263 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025265
25266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025268
25269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025270# Binary search between lo and hi bounds.
25271while test "x$ac_lo" != "x$ac_hi"; do
25272 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025274/* confdefs.h. */
25275_ACEOF
25276cat confdefs.h >>conftest.$ac_ext
25277cat >>conftest.$ac_ext <<_ACEOF
25278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025279#include <wchar.h>
25280
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025281 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025282int
25283main ()
25284{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025285static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025286test_array [0] = 0
25287
25288 ;
25289 return 0;
25290}
25291_ACEOF
25292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025293if { (ac_try="$ac_compile"
25294case "(($ac_try" in
25295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25296 *) ac_try_echo=$ac_try;;
25297esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025301 grep -v '^ *+' conftest.er1 >conftest.err
25302 rm -f conftest.er1
25303 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025305 (exit $ac_status); } && {
25306 test -z "$ac_c_werror_flag" ||
25307 test ! -s conftest.err
25308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025309 ac_hi=$ac_mid
25310else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025312sed 's/^/| /' conftest.$ac_ext >&5
25313
Martin v. Löwiseba40652007-08-30 20:10:57 +000025314 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316
25317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025318done
25319case $ac_lo in
25320?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025321'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025322 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025323See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025324echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025325See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025326 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025327 else
25328 ac_cv_sizeof_wchar_t=0
25329 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025330esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025331else
Martin v. Löwis11437992002-04-12 09:54:03 +000025332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025333/* confdefs.h. */
25334_ACEOF
25335cat confdefs.h >>conftest.$ac_ext
25336cat >>conftest.$ac_ext <<_ACEOF
25337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025338#include <wchar.h>
25339
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025340 typedef wchar_t ac__type_sizeof_;
25341static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25342static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025343#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025344#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025345int
25346main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025347{
Martin v. Löwis11437992002-04-12 09:54:03 +000025348
25349 FILE *f = fopen ("conftest.val", "w");
25350 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025351 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025352 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025353 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025354 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025355 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025357 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025358 }
25359 else
25360 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025361 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025362 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025363 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025364 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025366 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025367
25368 ;
25369 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025370}
Martin v. Löwis11437992002-04-12 09:54:03 +000025371_ACEOF
25372rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373if { (ac_try="$ac_link"
25374case "(($ac_try" in
25375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25376 *) ac_try_echo=$ac_try;;
25377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025379 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025380 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025383 { (case "(($ac_try" in
25384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25385 *) ac_try_echo=$ac_try;;
25386esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025388 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025391 (exit $ac_status); }; }; then
25392 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025394 echo "$as_me: program exited with status $ac_status" >&5
25395echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025396sed 's/^/| /' conftest.$ac_ext >&5
25397
Martin v. Löwis11437992002-04-12 09:54:03 +000025398( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025399if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025400 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025401See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025402echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025403See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025404 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025405 else
25406 ac_cv_sizeof_wchar_t=0
25407 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025409rm -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 +000025410fi
25411rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025412fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025413{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25414echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415
25416
25417
Martin v. Löwis11437992002-04-12 09:54:03 +000025418cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025419#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025420_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025421
Michael W. Hudson54241132001-12-07 15:38:26 +000025422
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025423fi
25424
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025425{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25426echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025427have_ucs4_tcl=no
25428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025429/* confdefs.h. */
25430_ACEOF
25431cat confdefs.h >>conftest.$ac_ext
25432cat >>conftest.$ac_ext <<_ACEOF
25433/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025434
25435#include <tcl.h>
25436#if TCL_UTF_MAX != 6
25437# error "NOT UCS4_TCL"
25438#endif
25439int
25440main ()
25441{
25442
25443 ;
25444 return 0;
25445}
25446_ACEOF
25447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025448if { (ac_try="$ac_compile"
25449case "(($ac_try" in
25450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25451 *) ac_try_echo=$ac_try;;
25452esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025456 grep -v '^ *+' conftest.er1 >conftest.err
25457 rm -f conftest.er1
25458 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025460 (exit $ac_status); } && {
25461 test -z "$ac_c_werror_flag" ||
25462 test ! -s conftest.err
25463 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025464
25465
25466cat >>confdefs.h <<\_ACEOF
25467#define HAVE_UCS4_TCL 1
25468_ACEOF
25469
25470 have_ucs4_tcl=yes
25471
25472else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025474sed 's/^/| /' conftest.$ac_ext >&5
25475
Martin v. Löwiseba40652007-08-30 20:10:57 +000025476
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025478
25479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025480{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25481echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025482
Skip Montanaro6dead952003-09-25 14:50:04 +000025483# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025484if test "$wchar_h" = yes
25485then
25486 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025487 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25488echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025489 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025490 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025491else
25492
25493 if test "$cross_compiling" = yes; then
25494 ac_cv_wchar_t_signed=yes
25495else
25496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025497/* confdefs.h. */
25498_ACEOF
25499cat confdefs.h >>conftest.$ac_ext
25500cat >>conftest.$ac_ext <<_ACEOF
25501/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025502
25503 #include <wchar.h>
25504 int main()
25505 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025506 /* Success: exit code 0 */
25507 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025508 }
25509
25510_ACEOF
25511rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025512if { (ac_try="$ac_link"
25513case "(($ac_try" in
25514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25515 *) ac_try_echo=$ac_try;;
25516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025519 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025522 { (case "(($ac_try" in
25523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25524 *) ac_try_echo=$ac_try;;
25525esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025527 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025528 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025530 (exit $ac_status); }; }; then
25531 ac_cv_wchar_t_signed=yes
25532else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025533 echo "$as_me: program exited with status $ac_status" >&5
25534echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025535sed 's/^/| /' conftest.$ac_ext >&5
25536
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025537( exit $ac_status )
25538ac_cv_wchar_t_signed=no
25539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025540rm -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 +000025541fi
25542
Martin v. Löwiseba40652007-08-30 20:10:57 +000025543
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025544fi
25545
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25547echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025548fi
25549
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025550{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25551echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025552# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025553if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025555else
25556 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025557fi
25558
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025559
25560if test $enable_unicode = yes
25561then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025562 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025563 case "$have_ucs4_tcl" in
25564 yes) enable_unicode="ucs4"
25565 ;;
25566 *) enable_unicode="ucs2"
25567 ;;
25568 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025569fi
25570
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025571
25572
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025573case "$enable_unicode" in
25574ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025575 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025576#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025577_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025578
25579 ;;
25580ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025581 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025582#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025583_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025584
25585 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025586*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25587echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25588 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025589esac
25590
Michael W. Hudson54241132001-12-07 15:38:26 +000025591
Martin v. Löwis11437992002-04-12 09:54:03 +000025592
25593
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025595if test "$enable_unicode" = "no"
25596then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025597 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025598 { echo "$as_me:$LINENO: result: not used" >&5
25599echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025600else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025601 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025602
25603cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025604#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025605_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025606
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025607
25608 # wchar_t is only usable if it maps to an unsigned type
25609 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025610 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025611 then
25612 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025613
Martin v. Löwis11437992002-04-12 09:54:03 +000025614cat >>confdefs.h <<\_ACEOF
25615#define HAVE_USABLE_WCHAR_T 1
25616_ACEOF
25617
25618 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025619#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025620_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025621
25622 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25623 then
25624 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025625 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025626#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025627_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025628
25629 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25630 then
25631 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025632 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025633#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025634_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025635
25636 else
25637 PY_UNICODE_TYPE="no type found"
25638 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025639 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25640echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025641fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025642
25643# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025644{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25645echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025646if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025649 # See if sys/param.h defines the BYTE_ORDER macro.
25650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025651/* confdefs.h. */
25652_ACEOF
25653cat confdefs.h >>conftest.$ac_ext
25654cat >>conftest.$ac_ext <<_ACEOF
25655/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025656#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025657#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025658
Martin v. Löwis11437992002-04-12 09:54:03 +000025659int
25660main ()
25661{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025662#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25663 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25664 bogus endian macros
25665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025666
25667 ;
25668 return 0;
25669}
25670_ACEOF
25671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025672if { (ac_try="$ac_compile"
25673case "(($ac_try" in
25674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25675 *) ac_try_echo=$ac_try;;
25676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025680 grep -v '^ *+' conftest.er1 >conftest.err
25681 rm -f conftest.er1
25682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025684 (exit $ac_status); } && {
25685 test -z "$ac_c_werror_flag" ||
25686 test ! -s conftest.err
25687 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025688 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025689cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025690/* confdefs.h. */
25691_ACEOF
25692cat confdefs.h >>conftest.$ac_ext
25693cat >>conftest.$ac_ext <<_ACEOF
25694/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025695#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025697
Martin v. Löwis11437992002-04-12 09:54:03 +000025698int
25699main ()
25700{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025701#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025702 not big endian
25703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025704
25705 ;
25706 return 0;
25707}
25708_ACEOF
25709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025710if { (ac_try="$ac_compile"
25711case "(($ac_try" in
25712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25713 *) ac_try_echo=$ac_try;;
25714esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025718 grep -v '^ *+' conftest.er1 >conftest.err
25719 rm -f conftest.er1
25720 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025722 (exit $ac_status); } && {
25723 test -z "$ac_c_werror_flag" ||
25724 test ! -s conftest.err
25725 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025726 ac_cv_c_bigendian=yes
25727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025729sed 's/^/| /' conftest.$ac_ext >&5
25730
Martin v. Löwiseba40652007-08-30 20:10:57 +000025731 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025733
25734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025735else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025737sed 's/^/| /' conftest.$ac_ext >&5
25738
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025739 # It does not; compile a test program.
25740if test "$cross_compiling" = yes; then
25741 # try to guess the endianness by grepping values into an object file
25742 ac_cv_c_bigendian=unknown
25743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025744/* confdefs.h. */
25745_ACEOF
25746cat confdefs.h >>conftest.$ac_ext
25747cat >>conftest.$ac_ext <<_ACEOF
25748/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025749short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25750short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25751void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25752short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25753short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25754void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025755int
25756main ()
25757{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025758 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025759 ;
25760 return 0;
25761}
25762_ACEOF
25763rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025764if { (ac_try="$ac_compile"
25765case "(($ac_try" in
25766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25767 *) ac_try_echo=$ac_try;;
25768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025772 grep -v '^ *+' conftest.er1 >conftest.err
25773 rm -f conftest.er1
25774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025776 (exit $ac_status); } && {
25777 test -z "$ac_c_werror_flag" ||
25778 test ! -s conftest.err
25779 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025780 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025781 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025782fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025783if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25784 if test "$ac_cv_c_bigendian" = unknown; then
25785 ac_cv_c_bigendian=no
25786 else
25787 # finding both strings is unlikely to happen, but who knows?
25788 ac_cv_c_bigendian=unknown
25789 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025790fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025791else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025793sed 's/^/| /' conftest.$ac_ext >&5
25794
Martin v. Löwiseba40652007-08-30 20:10:57 +000025795
Martin v. Löwis11437992002-04-12 09:54:03 +000025796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025797
25798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025799else
25800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025801/* confdefs.h. */
25802_ACEOF
25803cat confdefs.h >>conftest.$ac_ext
25804cat >>conftest.$ac_ext <<_ACEOF
25805/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025806$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025807int
25808main ()
25809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025811 /* Are we little or big endian? From Harbison&Steele. */
25812 union
25813 {
25814 long int l;
25815 char c[sizeof (long int)];
25816 } u;
25817 u.l = 1;
25818 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025819
25820 ;
25821 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025822}
Martin v. Löwis11437992002-04-12 09:54:03 +000025823_ACEOF
25824rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825if { (ac_try="$ac_link"
25826case "(($ac_try" in
25827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25828 *) ac_try_echo=$ac_try;;
25829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025832 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025835 { (case "(($ac_try" in
25836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25837 *) ac_try_echo=$ac_try;;
25838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025841 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025843 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025844 ac_cv_c_bigendian=no
25845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025846 echo "$as_me: program exited with status $ac_status" >&5
25847echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025848sed 's/^/| /' conftest.$ac_ext >&5
25849
Martin v. Löwis11437992002-04-12 09:54:03 +000025850( exit $ac_status )
25851ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025853rm -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 +000025854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025855
25856
Martin v. Löwis11437992002-04-12 09:54:03 +000025857fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025858
25859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25860fi
25861{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25862echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25863case $ac_cv_c_bigendian in
25864 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025865
25866cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025867#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025868_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025869 ;;
25870 no)
25871 ;;
25872 *)
25873 { { echo "$as_me:$LINENO: error: unknown endianness
25874presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25875echo "$as_me: error: unknown endianness
25876presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025877 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025878esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025879
Michael W. Hudson54241132001-12-07 15:38:26 +000025880
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025881# Check whether right shifting a negative integer extends the sign bit
25882# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025883{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25884echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025885if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025886 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025887else
Martin v. Löwis11437992002-04-12 09:54:03 +000025888
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025889if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025890 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025891else
Martin v. Löwis11437992002-04-12 09:54:03 +000025892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025893/* confdefs.h. */
25894_ACEOF
25895cat confdefs.h >>conftest.$ac_ext
25896cat >>conftest.$ac_ext <<_ACEOF
25897/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025898
25899int main()
25900{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025901 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025902}
25903
Martin v. Löwis11437992002-04-12 09:54:03 +000025904_ACEOF
25905rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025906if { (ac_try="$ac_link"
25907case "(($ac_try" in
25908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25909 *) ac_try_echo=$ac_try;;
25910esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025913 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025916 { (case "(($ac_try" in
25917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25918 *) ac_try_echo=$ac_try;;
25919esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025921 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025922 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025924 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025925 ac_cv_rshift_extends_sign=yes
25926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025927 echo "$as_me: program exited with status $ac_status" >&5
25928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025929sed 's/^/| /' conftest.$ac_ext >&5
25930
Martin v. Löwis11437992002-04-12 09:54:03 +000025931( exit $ac_status )
25932ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025934rm -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 +000025935fi
25936
Martin v. Löwiseba40652007-08-30 20:10:57 +000025937
25938fi
25939
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025940{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25941echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025942if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025943then
Martin v. Löwis11437992002-04-12 09:54:03 +000025944
25945cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025946#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025947_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025948
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025949fi
25950
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025951# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025952{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25953echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025954if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025955 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025956else
Martin v. Löwis11437992002-04-12 09:54:03 +000025957
25958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025959/* confdefs.h. */
25960_ACEOF
25961cat confdefs.h >>conftest.$ac_ext
25962cat >>conftest.$ac_ext <<_ACEOF
25963/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025964#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025965int
25966main ()
25967{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025968
25969 FILE *f = fopen("/dev/null", "r");
25970 flockfile(f);
25971 getc_unlocked(f);
25972 funlockfile(f);
25973
Martin v. Löwis11437992002-04-12 09:54:03 +000025974 ;
25975 return 0;
25976}
25977_ACEOF
25978rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025979if { (ac_try="$ac_link"
25980case "(($ac_try" in
25981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25982 *) ac_try_echo=$ac_try;;
25983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025987 grep -v '^ *+' conftest.er1 >conftest.err
25988 rm -f conftest.er1
25989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025991 (exit $ac_status); } && {
25992 test -z "$ac_c_werror_flag" ||
25993 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025994 } && test -s conftest$ac_exeext &&
25995 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025996 ac_cv_have_getc_unlocked=yes
25997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025999sed 's/^/| /' conftest.$ac_ext >&5
26000
Martin v. Löwiseba40652007-08-30 20:10:57 +000026001 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026003
26004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026005 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026006fi
26007
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026008{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26009echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026010if test "$ac_cv_have_getc_unlocked" = yes
26011then
Martin v. Löwis11437992002-04-12 09:54:03 +000026012
26013cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026014#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026015_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026016
26017fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026018
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026019# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026020# save the value of LIBS so we don't actually link Python with readline
26021LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026022
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026023# On some systems we need to link readline to a termcap compatible
26024# library. NOTE: Keep the precedence of listed libraries synchronised
26025# with setup.py.
26026py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026027{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26028echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026029for py_libtermcap in "" ncursesw ncurses curses termcap; do
26030 if test -z "$py_libtermcap"; then
26031 READLINE_LIBS="-lreadline"
26032 else
26033 READLINE_LIBS="-lreadline -l$py_libtermcap"
26034 fi
26035 LIBS="$READLINE_LIBS $LIBS_no_readline"
26036 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026037/* confdefs.h. */
26038_ACEOF
26039cat confdefs.h >>conftest.$ac_ext
26040cat >>conftest.$ac_ext <<_ACEOF
26041/* end confdefs.h. */
26042
Martin v. Löwiseba40652007-08-30 20:10:57 +000026043/* Override any GCC internal prototype to avoid an error.
26044 Use char because int might match the return type of a GCC
26045 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026046#ifdef __cplusplus
26047extern "C"
26048#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026049char readline ();
26050int
26051main ()
26052{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026053return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026054 ;
26055 return 0;
26056}
26057_ACEOF
26058rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026059if { (ac_try="$ac_link"
26060case "(($ac_try" in
26061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26062 *) ac_try_echo=$ac_try;;
26063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026065 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026066 ac_status=$?
26067 grep -v '^ *+' conftest.er1 >conftest.err
26068 rm -f conftest.er1
26069 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026071 (exit $ac_status); } && {
26072 test -z "$ac_c_werror_flag" ||
26073 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026074 } && test -s conftest$ac_exeext &&
26075 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026076 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026078 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026079sed 's/^/| /' conftest.$ac_ext >&5
26080
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026081
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026083
26084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026085 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026086 if test $py_cv_lib_readline = yes; then
26087 break
26088 fi
26089done
26090# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26091#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026092if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026093 { echo "$as_me:$LINENO: result: none" >&5
26094echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026096 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26097echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026098
26099cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026100#define HAVE_LIBREADLINE 1
26101_ACEOF
26102
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026103fi
26104
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026105# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026106{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26107echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026108if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026109 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026110else
26111 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026112LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026113cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026114/* confdefs.h. */
26115_ACEOF
26116cat confdefs.h >>conftest.$ac_ext
26117cat >>conftest.$ac_ext <<_ACEOF
26118/* end confdefs.h. */
26119
Martin v. Löwiseba40652007-08-30 20:10:57 +000026120/* Override any GCC internal prototype to avoid an error.
26121 Use char because int might match the return type of a GCC
26122 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026123#ifdef __cplusplus
26124extern "C"
26125#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026126char rl_callback_handler_install ();
26127int
26128main ()
26129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026130return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026131 ;
26132 return 0;
26133}
26134_ACEOF
26135rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026136if { (ac_try="$ac_link"
26137case "(($ac_try" in
26138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26139 *) ac_try_echo=$ac_try;;
26140esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026142 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026144 grep -v '^ *+' conftest.er1 >conftest.err
26145 rm -f conftest.er1
26146 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026148 (exit $ac_status); } && {
26149 test -z "$ac_c_werror_flag" ||
26150 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026151 } && test -s conftest$ac_exeext &&
26152 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026153 ac_cv_lib_readline_rl_callback_handler_install=yes
26154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026155 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026156sed 's/^/| /' conftest.$ac_ext >&5
26157
Martin v. Löwiseba40652007-08-30 20:10:57 +000026158 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026160
26161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026162 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026163LIBS=$ac_check_lib_save_LIBS
26164fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026165{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26166echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26167if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026168
26169cat >>confdefs.h <<\_ACEOF
26170#define HAVE_RL_CALLBACK 1
26171_ACEOF
26172
26173fi
26174
26175
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026176# check for readline 2.2
26177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026178/* confdefs.h. */
26179_ACEOF
26180cat confdefs.h >>conftest.$ac_ext
26181cat >>conftest.$ac_ext <<_ACEOF
26182/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026183#include <readline/readline.h>
26184_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026185if { (ac_try="$ac_cpp conftest.$ac_ext"
26186case "(($ac_try" in
26187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26188 *) ac_try_echo=$ac_try;;
26189esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026191 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026192 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026193 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026194 rm -f conftest.er1
26195 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026197 (exit $ac_status); } >/dev/null && {
26198 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26199 test ! -s conftest.err
26200 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026201 have_readline=yes
26202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026204sed 's/^/| /' conftest.$ac_ext >&5
26205
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026206 have_readline=no
26207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026208
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026209rm -f conftest.err conftest.$ac_ext
26210if test $have_readline = yes
26211then
26212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026213/* confdefs.h. */
26214_ACEOF
26215cat confdefs.h >>conftest.$ac_ext
26216cat >>conftest.$ac_ext <<_ACEOF
26217/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026218#include <readline/readline.h>
26219
26220_ACEOF
26221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026222 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026223
26224cat >>confdefs.h <<\_ACEOF
26225#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26226_ACEOF
26227
26228fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026229rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026230
26231 cat >conftest.$ac_ext <<_ACEOF
26232/* confdefs.h. */
26233_ACEOF
26234cat confdefs.h >>conftest.$ac_ext
26235cat >>conftest.$ac_ext <<_ACEOF
26236/* end confdefs.h. */
26237#include <readline/readline.h>
26238
26239_ACEOF
26240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26241 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26242
26243cat >>confdefs.h <<\_ACEOF
26244#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26245_ACEOF
26246
26247fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026248rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026249
26250fi
26251
Martin v. Löwis0daad592001-09-30 21:09:59 +000026252# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026253{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26254echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026255if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026256 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026257else
Martin v. Löwis11437992002-04-12 09:54:03 +000026258 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026259LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026261/* confdefs.h. */
26262_ACEOF
26263cat confdefs.h >>conftest.$ac_ext
26264cat >>conftest.$ac_ext <<_ACEOF
26265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026266
Martin v. Löwiseba40652007-08-30 20:10:57 +000026267/* Override any GCC internal prototype to avoid an error.
26268 Use char because int might match the return type of a GCC
26269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026270#ifdef __cplusplus
26271extern "C"
26272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026273char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026274int
26275main ()
26276{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026277return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026278 ;
26279 return 0;
26280}
26281_ACEOF
26282rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026283if { (ac_try="$ac_link"
26284case "(($ac_try" in
26285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26286 *) ac_try_echo=$ac_try;;
26287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026289 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026291 grep -v '^ *+' conftest.er1 >conftest.err
26292 rm -f conftest.er1
26293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026295 (exit $ac_status); } && {
26296 test -z "$ac_c_werror_flag" ||
26297 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026298 } && test -s conftest$ac_exeext &&
26299 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026300 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026301else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026302 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026303sed 's/^/| /' conftest.$ac_ext >&5
26304
Martin v. Löwiseba40652007-08-30 20:10:57 +000026305 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026307
26308rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026310LIBS=$ac_check_lib_save_LIBS
26311fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026312{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26313echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26314if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026315
Martin v. Löwis11437992002-04-12 09:54:03 +000026316cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026317#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026318_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026319
Martin v. Löwis0daad592001-09-30 21:09:59 +000026320fi
26321
Michael W. Hudson54241132001-12-07 15:38:26 +000026322
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026323# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026324{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26325echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026326if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026328else
26329 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026330LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026331cat >conftest.$ac_ext <<_ACEOF
26332/* confdefs.h. */
26333_ACEOF
26334cat confdefs.h >>conftest.$ac_ext
26335cat >>conftest.$ac_ext <<_ACEOF
26336/* end confdefs.h. */
26337
26338/* Override any GCC internal prototype to avoid an error.
26339 Use char because int might match the return type of a GCC
26340 builtin and then its argument prototype would still apply. */
26341#ifdef __cplusplus
26342extern "C"
26343#endif
26344char rl_completion_display_matches_hook ();
26345int
26346main ()
26347{
26348return rl_completion_display_matches_hook ();
26349 ;
26350 return 0;
26351}
26352_ACEOF
26353rm -f conftest.$ac_objext conftest$ac_exeext
26354if { (ac_try="$ac_link"
26355case "(($ac_try" in
26356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26357 *) ac_try_echo=$ac_try;;
26358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026360 (eval "$ac_link") 2>conftest.er1
26361 ac_status=$?
26362 grep -v '^ *+' conftest.er1 >conftest.err
26363 rm -f conftest.er1
26364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026366 (exit $ac_status); } && {
26367 test -z "$ac_c_werror_flag" ||
26368 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026369 } && test -s conftest$ac_exeext &&
26370 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026371 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26372else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026373 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026374sed 's/^/| /' conftest.$ac_ext >&5
26375
26376 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26377fi
26378
26379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26380 conftest$ac_exeext conftest.$ac_ext
26381LIBS=$ac_check_lib_save_LIBS
26382fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026383{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26384echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26385if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026386
26387cat >>confdefs.h <<\_ACEOF
26388#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26389_ACEOF
26390
26391fi
26392
26393
Martin v. Löwis0daad592001-09-30 21:09:59 +000026394# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026395{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26396echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026397if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026399else
Martin v. Löwis11437992002-04-12 09:54:03 +000026400 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026401LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026403/* confdefs.h. */
26404_ACEOF
26405cat confdefs.h >>conftest.$ac_ext
26406cat >>conftest.$ac_ext <<_ACEOF
26407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026408
Martin v. Löwiseba40652007-08-30 20:10:57 +000026409/* Override any GCC internal prototype to avoid an error.
26410 Use char because int might match the return type of a GCC
26411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026412#ifdef __cplusplus
26413extern "C"
26414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026415char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026416int
26417main ()
26418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026419return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026420 ;
26421 return 0;
26422}
26423_ACEOF
26424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026425if { (ac_try="$ac_link"
26426case "(($ac_try" in
26427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26428 *) ac_try_echo=$ac_try;;
26429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026433 grep -v '^ *+' conftest.er1 >conftest.err
26434 rm -f conftest.er1
26435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026437 (exit $ac_status); } && {
26438 test -z "$ac_c_werror_flag" ||
26439 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026440 } && test -s conftest$ac_exeext &&
26441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026442 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026445sed 's/^/| /' conftest.$ac_ext >&5
26446
Martin v. Löwiseba40652007-08-30 20:10:57 +000026447 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026449
26450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026452LIBS=$ac_check_lib_save_LIBS
26453fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026454{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26455echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26456if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026457
Martin v. Löwis11437992002-04-12 09:54:03 +000026458cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026459#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026460_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026461
Guido van Rossum353ae582001-07-10 16:45:32 +000026462fi
26463
Jack Jansendd19cf82001-12-06 22:36:17 +000026464
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026465# also in readline 4.2
26466cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026467/* confdefs.h. */
26468_ACEOF
26469cat confdefs.h >>conftest.$ac_ext
26470cat >>conftest.$ac_ext <<_ACEOF
26471/* end confdefs.h. */
26472#include <readline/readline.h>
26473_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026474if { (ac_try="$ac_cpp conftest.$ac_ext"
26475case "(($ac_try" in
26476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26477 *) ac_try_echo=$ac_try;;
26478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026481 ac_status=$?
26482 grep -v '^ *+' conftest.er1 >conftest.err
26483 rm -f conftest.er1
26484 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026486 (exit $ac_status); } >/dev/null && {
26487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26488 test ! -s conftest.err
26489 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026490 have_readline=yes
26491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026492 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026493sed 's/^/| /' conftest.$ac_ext >&5
26494
26495 have_readline=no
26496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026497
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026498rm -f conftest.err conftest.$ac_ext
26499if test $have_readline = yes
26500then
26501 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026502/* confdefs.h. */
26503_ACEOF
26504cat confdefs.h >>conftest.$ac_ext
26505cat >>conftest.$ac_ext <<_ACEOF
26506/* end confdefs.h. */
26507#include <readline/readline.h>
26508
26509_ACEOF
26510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26511 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26512
26513cat >>confdefs.h <<\_ACEOF
26514#define HAVE_RL_CATCH_SIGNAL 1
26515_ACEOF
26516
26517fi
Martin v. Löwis5e2dd862010-02-15 08:32:00 +000026518rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026519
26520fi
26521
Martin v. Löwis82bca632006-02-10 20:49:30 +000026522# End of readline checks: restore LIBS
26523LIBS=$LIBS_no_readline
26524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026525{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26526echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026527if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026528 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026529else
Martin v. Löwis11437992002-04-12 09:54:03 +000026530
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026531if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026532 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026533else
Martin v. Löwis11437992002-04-12 09:54:03 +000026534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026535/* confdefs.h. */
26536_ACEOF
26537cat confdefs.h >>conftest.$ac_ext
26538cat >>conftest.$ac_ext <<_ACEOF
26539/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026540
26541int main()
26542{
26543 int val1 = nice(1);
26544 if (val1 != -1 && val1 == nice(2))
26545 exit(0);
26546 exit(1);
26547}
26548
Martin v. Löwis11437992002-04-12 09:54:03 +000026549_ACEOF
26550rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026551if { (ac_try="$ac_link"
26552case "(($ac_try" in
26553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26554 *) ac_try_echo=$ac_try;;
26555esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026558 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026560 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026561 { (case "(($ac_try" in
26562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26563 *) ac_try_echo=$ac_try;;
26564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026566 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026567 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026569 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026570 ac_cv_broken_nice=yes
26571else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026572 echo "$as_me: program exited with status $ac_status" >&5
26573echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026574sed 's/^/| /' conftest.$ac_ext >&5
26575
Martin v. Löwis11437992002-04-12 09:54:03 +000026576( exit $ac_status )
26577ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026579rm -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 +000026580fi
26581
Martin v. Löwiseba40652007-08-30 20:10:57 +000026582
26583fi
26584
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026585{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26586echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026587if test "$ac_cv_broken_nice" = yes
26588then
Martin v. Löwis11437992002-04-12 09:54:03 +000026589
26590cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026591#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026592_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026593
26594fi
26595
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026596{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26597echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026598if test "${ac_cv_broken_poll+set}" = set; then
26599 echo $ECHO_N "(cached) $ECHO_C" >&6
26600else
26601 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026602 ac_cv_broken_poll=no
26603else
26604 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026605/* confdefs.h. */
26606_ACEOF
26607cat confdefs.h >>conftest.$ac_ext
26608cat >>conftest.$ac_ext <<_ACEOF
26609/* end confdefs.h. */
26610
26611#include <poll.h>
26612
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026613int main()
26614{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026615 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026616 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026617
26618 close (42);
26619
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026620 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026621 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026622 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026623 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026624 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026625 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026626 return 1;
26627}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026628
26629_ACEOF
26630rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026631if { (ac_try="$ac_link"
26632case "(($ac_try" in
26633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26634 *) ac_try_echo=$ac_try;;
26635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026637 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026638 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026641 { (case "(($ac_try" in
26642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26643 *) ac_try_echo=$ac_try;;
26644esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026646 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026647 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026649 (exit $ac_status); }; }; then
26650 ac_cv_broken_poll=yes
26651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026652 echo "$as_me: program exited with status $ac_status" >&5
26653echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026654sed 's/^/| /' conftest.$ac_ext >&5
26655
26656( exit $ac_status )
26657ac_cv_broken_poll=no
26658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026659rm -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 +000026660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026661
26662
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026663fi
26664
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026665{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26666echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026667if test "$ac_cv_broken_poll" = yes
26668then
26669
26670cat >>confdefs.h <<\_ACEOF
26671#define HAVE_BROKEN_POLL 1
26672_ACEOF
26673
26674fi
26675
Brett Cannon43802422005-02-10 20:48:03 +000026676# 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 +000026677# (which is not required by ISO C or UNIX spec) and/or if we support
26678# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026679{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26680echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026681if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026682 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026683else
26684 cat >conftest.$ac_ext <<_ACEOF
26685/* confdefs.h. */
26686_ACEOF
26687cat confdefs.h >>conftest.$ac_ext
26688cat >>conftest.$ac_ext <<_ACEOF
26689/* end confdefs.h. */
26690#include <sys/types.h>
26691#include <$ac_cv_struct_tm>
26692
26693
26694int
26695main ()
26696{
26697static struct tm ac_aggr;
26698if (ac_aggr.tm_zone)
26699return 0;
26700 ;
26701 return 0;
26702}
26703_ACEOF
26704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026705if { (ac_try="$ac_compile"
26706case "(($ac_try" in
26707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26708 *) ac_try_echo=$ac_try;;
26709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026711 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026712 ac_status=$?
26713 grep -v '^ *+' conftest.er1 >conftest.err
26714 rm -f conftest.er1
26715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026717 (exit $ac_status); } && {
26718 test -z "$ac_c_werror_flag" ||
26719 test ! -s conftest.err
26720 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026721 ac_cv_member_struct_tm_tm_zone=yes
26722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026723 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026724sed 's/^/| /' conftest.$ac_ext >&5
26725
Martin v. Löwiseba40652007-08-30 20:10:57 +000026726 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026727/* confdefs.h. */
26728_ACEOF
26729cat confdefs.h >>conftest.$ac_ext
26730cat >>conftest.$ac_ext <<_ACEOF
26731/* end confdefs.h. */
26732#include <sys/types.h>
26733#include <$ac_cv_struct_tm>
26734
26735
26736int
26737main ()
26738{
26739static struct tm ac_aggr;
26740if (sizeof ac_aggr.tm_zone)
26741return 0;
26742 ;
26743 return 0;
26744}
26745_ACEOF
26746rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026747if { (ac_try="$ac_compile"
26748case "(($ac_try" in
26749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26750 *) ac_try_echo=$ac_try;;
26751esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026753 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026754 ac_status=$?
26755 grep -v '^ *+' conftest.er1 >conftest.err
26756 rm -f conftest.er1
26757 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026759 (exit $ac_status); } && {
26760 test -z "$ac_c_werror_flag" ||
26761 test ! -s conftest.err
26762 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026763 ac_cv_member_struct_tm_tm_zone=yes
26764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026765 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026766sed 's/^/| /' conftest.$ac_ext >&5
26767
Martin v. Löwiseba40652007-08-30 20:10:57 +000026768 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026770
26771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026773
26774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026775fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026776{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26777echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26778if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026779
26780cat >>confdefs.h <<_ACEOF
26781#define HAVE_STRUCT_TM_TM_ZONE 1
26782_ACEOF
26783
26784
26785fi
26786
26787if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26788
26789cat >>confdefs.h <<\_ACEOF
26790#define HAVE_TM_ZONE 1
26791_ACEOF
26792
26793else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026794 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26795echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026796if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026798else
26799 cat >conftest.$ac_ext <<_ACEOF
26800/* confdefs.h. */
26801_ACEOF
26802cat confdefs.h >>conftest.$ac_ext
26803cat >>conftest.$ac_ext <<_ACEOF
26804/* end confdefs.h. */
26805#include <time.h>
26806
26807int
26808main ()
26809{
26810#ifndef tzname
26811 (void) tzname;
26812#endif
26813
26814 ;
26815 return 0;
26816}
26817_ACEOF
26818rm -f conftest.$ac_objext
26819if { (ac_try="$ac_compile"
26820case "(($ac_try" in
26821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26822 *) ac_try_echo=$ac_try;;
26823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026825 (eval "$ac_compile") 2>conftest.er1
26826 ac_status=$?
26827 grep -v '^ *+' conftest.er1 >conftest.err
26828 rm -f conftest.er1
26829 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026831 (exit $ac_status); } && {
26832 test -z "$ac_c_werror_flag" ||
26833 test ! -s conftest.err
26834 } && test -s conftest.$ac_objext; then
26835 ac_cv_have_decl_tzname=yes
26836else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026837 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026838sed 's/^/| /' conftest.$ac_ext >&5
26839
26840 ac_cv_have_decl_tzname=no
26841fi
26842
26843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26844fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026845{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26846echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26847if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026848
26849cat >>confdefs.h <<_ACEOF
26850#define HAVE_DECL_TZNAME 1
26851_ACEOF
26852
26853
26854else
26855 cat >>confdefs.h <<_ACEOF
26856#define HAVE_DECL_TZNAME 0
26857_ACEOF
26858
26859
26860fi
26861
26862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026863 { echo "$as_me:$LINENO: checking for tzname" >&5
26864echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026865if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026866 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026867else
26868 cat >conftest.$ac_ext <<_ACEOF
26869/* confdefs.h. */
26870_ACEOF
26871cat confdefs.h >>conftest.$ac_ext
26872cat >>conftest.$ac_ext <<_ACEOF
26873/* end confdefs.h. */
26874#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026875#if !HAVE_DECL_TZNAME
26876extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026877#endif
26878
26879int
26880main ()
26881{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026882return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026883 ;
26884 return 0;
26885}
26886_ACEOF
26887rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888if { (ac_try="$ac_link"
26889case "(($ac_try" in
26890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26891 *) ac_try_echo=$ac_try;;
26892esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026894 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026895 ac_status=$?
26896 grep -v '^ *+' conftest.er1 >conftest.err
26897 rm -f conftest.er1
26898 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026900 (exit $ac_status); } && {
26901 test -z "$ac_c_werror_flag" ||
26902 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026903 } && test -s conftest$ac_exeext &&
26904 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026905 ac_cv_var_tzname=yes
26906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026907 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026908sed 's/^/| /' conftest.$ac_ext >&5
26909
Martin v. Löwiseba40652007-08-30 20:10:57 +000026910 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026912
26913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026914 conftest$ac_exeext conftest.$ac_ext
26915fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026916{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26917echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026918 if test $ac_cv_var_tzname = yes; then
26919
26920cat >>confdefs.h <<\_ACEOF
26921#define HAVE_TZNAME 1
26922_ACEOF
26923
26924 fi
26925fi
26926
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026927
Martin v. Löwis1d459062005-03-14 21:23:33 +000026928# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026929{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26930echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026931if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026932 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026933else
26934
26935if test "$cross_compiling" = yes; then
26936 ac_cv_working_tzset=no
26937else
26938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026939/* confdefs.h. */
26940_ACEOF
26941cat confdefs.h >>conftest.$ac_ext
26942cat >>conftest.$ac_ext <<_ACEOF
26943/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026944
26945#include <stdlib.h>
26946#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026947#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026948
26949#if HAVE_TZNAME
26950extern char *tzname[];
26951#endif
26952
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026953int main()
26954{
Brett Cannon18367812003-09-19 00:59:16 +000026955 /* Note that we need to ensure that not only does tzset(3)
26956 do 'something' with localtime, but it works as documented
26957 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026958 This includes making sure that tzname is set properly if
26959 tm->tm_zone does not exist since it is the alternative way
26960 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026961
26962 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026963 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026964 */
26965
Martin v. Löwis1d459062005-03-14 21:23:33 +000026966 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026967 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26968
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026969 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026970 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026971 if (localtime(&groundhogday)->tm_hour != 0)
26972 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026973#if HAVE_TZNAME
26974 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26975 if (strcmp(tzname[0], "UTC") ||
26976 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26977 exit(1);
26978#endif
Brett Cannon18367812003-09-19 00:59:16 +000026979
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026980 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026981 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026982 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026983 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026984#if HAVE_TZNAME
26985 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26986 exit(1);
26987#endif
Brett Cannon18367812003-09-19 00:59:16 +000026988
26989 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26990 tzset();
26991 if (localtime(&groundhogday)->tm_hour != 11)
26992 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026993#if HAVE_TZNAME
26994 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26995 exit(1);
26996#endif
26997
26998#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026999 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27000 exit(1);
27001 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27002 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027003#endif
Brett Cannon18367812003-09-19 00:59:16 +000027004
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027005 exit(0);
27006}
27007
27008_ACEOF
27009rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010if { (ac_try="$ac_link"
27011case "(($ac_try" in
27012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27013 *) ac_try_echo=$ac_try;;
27014esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027016 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027017 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027019 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027020 { (case "(($ac_try" in
27021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27022 *) ac_try_echo=$ac_try;;
27023esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027025 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027026 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027028 (exit $ac_status); }; }; then
27029 ac_cv_working_tzset=yes
27030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027031 echo "$as_me: program exited with status $ac_status" >&5
27032echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027033sed 's/^/| /' conftest.$ac_ext >&5
27034
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027035( exit $ac_status )
27036ac_cv_working_tzset=no
27037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027038rm -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 +000027039fi
27040
Martin v. Löwiseba40652007-08-30 20:10:57 +000027041
27042fi
27043
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027044{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27045echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027046if test "$ac_cv_working_tzset" = yes
27047then
27048
27049cat >>confdefs.h <<\_ACEOF
27050#define HAVE_WORKING_TZSET 1
27051_ACEOF
27052
27053fi
27054
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027055# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027056{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27057echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027058if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027059 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027060else
27061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027062/* confdefs.h. */
27063_ACEOF
27064cat confdefs.h >>conftest.$ac_ext
27065cat >>conftest.$ac_ext <<_ACEOF
27066/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027067#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027068int
27069main ()
27070{
27071
27072struct stat st;
27073st.st_mtim.tv_nsec = 1;
27074
27075 ;
27076 return 0;
27077}
27078_ACEOF
27079rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027080if { (ac_try="$ac_compile"
27081case "(($ac_try" in
27082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27083 *) ac_try_echo=$ac_try;;
27084esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027088 grep -v '^ *+' conftest.er1 >conftest.err
27089 rm -f conftest.er1
27090 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027092 (exit $ac_status); } && {
27093 test -z "$ac_c_werror_flag" ||
27094 test ! -s conftest.err
27095 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027096 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027097else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027099sed 's/^/| /' conftest.$ac_ext >&5
27100
Martin v. Löwiseba40652007-08-30 20:10:57 +000027101 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027102fi
27103
Martin v. Löwiseba40652007-08-30 20:10:57 +000027104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27105fi
27106
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027107{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27108echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027109if test "$ac_cv_stat_tv_nsec" = yes
27110then
27111
27112cat >>confdefs.h <<\_ACEOF
27113#define HAVE_STAT_TV_NSEC 1
27114_ACEOF
27115
27116fi
27117
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027118# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027119{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27120echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027121if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027122 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027123else
27124 cat >conftest.$ac_ext <<_ACEOF
27125/* confdefs.h. */
27126_ACEOF
27127cat confdefs.h >>conftest.$ac_ext
27128cat >>conftest.$ac_ext <<_ACEOF
27129/* end confdefs.h. */
27130#include <sys/stat.h>
27131int
27132main ()
27133{
27134
27135struct stat st;
27136st.st_mtimespec.tv_nsec = 1;
27137
27138 ;
27139 return 0;
27140}
27141_ACEOF
27142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027143if { (ac_try="$ac_compile"
27144case "(($ac_try" in
27145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27146 *) ac_try_echo=$ac_try;;
27147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027149 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027150 ac_status=$?
27151 grep -v '^ *+' conftest.er1 >conftest.err
27152 rm -f conftest.er1
27153 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027155 (exit $ac_status); } && {
27156 test -z "$ac_c_werror_flag" ||
27157 test ! -s conftest.err
27158 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027159 ac_cv_stat_tv_nsec2=yes
27160else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027161 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027162sed 's/^/| /' conftest.$ac_ext >&5
27163
Martin v. Löwiseba40652007-08-30 20:10:57 +000027164 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027165fi
27166
Martin v. Löwiseba40652007-08-30 20:10:57 +000027167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27168fi
27169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027170{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27171echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027172if test "$ac_cv_stat_tv_nsec2" = yes
27173then
27174
27175cat >>confdefs.h <<\_ACEOF
27176#define HAVE_STAT_TV_NSEC2 1
27177_ACEOF
27178
27179fi
27180
Jack Jansen666b1e72001-10-31 12:11:48 +000027181# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027182{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27183echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027184if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027185 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027186else
Martin v. Löwis11437992002-04-12 09:54:03 +000027187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027188/* confdefs.h. */
27189_ACEOF
27190cat confdefs.h >>conftest.$ac_ext
27191cat >>conftest.$ac_ext <<_ACEOF
27192/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027193#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027194int
27195main ()
27196{
Jack Jansen666b1e72001-10-31 12:11:48 +000027197
27198 int rtn;
27199 rtn = mvwdelch(0,0,0);
27200
Martin v. Löwis11437992002-04-12 09:54:03 +000027201 ;
27202 return 0;
27203}
27204_ACEOF
27205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027206if { (ac_try="$ac_compile"
27207case "(($ac_try" in
27208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27209 *) ac_try_echo=$ac_try;;
27210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027214 grep -v '^ *+' conftest.er1 >conftest.err
27215 rm -f conftest.er1
27216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027218 (exit $ac_status); } && {
27219 test -z "$ac_c_werror_flag" ||
27220 test ! -s conftest.err
27221 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027222 ac_cv_mvwdelch_is_expression=yes
27223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027225sed 's/^/| /' conftest.$ac_ext >&5
27226
Martin v. Löwiseba40652007-08-30 20:10:57 +000027227 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027228fi
27229
Martin v. Löwiseba40652007-08-30 20:10:57 +000027230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27231fi
27232
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027233{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27234echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027235
27236if test "$ac_cv_mvwdelch_is_expression" = yes
27237then
Martin v. Löwis11437992002-04-12 09:54:03 +000027238
27239cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027240#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027241_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027242
27243fi
27244
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027245{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27246echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027247if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027248 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027249else
Martin v. Löwis11437992002-04-12 09:54:03 +000027250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027251/* confdefs.h. */
27252_ACEOF
27253cat confdefs.h >>conftest.$ac_ext
27254cat >>conftest.$ac_ext <<_ACEOF
27255/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027256#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027257int
27258main ()
27259{
Jack Jansen666b1e72001-10-31 12:11:48 +000027260
27261 WINDOW *w;
27262 w->_flags = 0;
27263
Martin v. Löwis11437992002-04-12 09:54:03 +000027264 ;
27265 return 0;
27266}
27267_ACEOF
27268rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269if { (ac_try="$ac_compile"
27270case "(($ac_try" in
27271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27272 *) ac_try_echo=$ac_try;;
27273esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027277 grep -v '^ *+' conftest.er1 >conftest.err
27278 rm -f conftest.er1
27279 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027281 (exit $ac_status); } && {
27282 test -z "$ac_c_werror_flag" ||
27283 test ! -s conftest.err
27284 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027285 ac_cv_window_has_flags=yes
27286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027288sed 's/^/| /' conftest.$ac_ext >&5
27289
Martin v. Löwiseba40652007-08-30 20:10:57 +000027290 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027291fi
27292
Martin v. Löwiseba40652007-08-30 20:10:57 +000027293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27294fi
27295
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027296{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27297echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027298
Jack Jansen666b1e72001-10-31 12:11:48 +000027299
27300if test "$ac_cv_window_has_flags" = yes
27301then
Martin v. Löwis11437992002-04-12 09:54:03 +000027302
27303cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027304#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027305_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027306
27307fi
27308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027309{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27310echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027311cat >conftest.$ac_ext <<_ACEOF
27312/* confdefs.h. */
27313_ACEOF
27314cat confdefs.h >>conftest.$ac_ext
27315cat >>conftest.$ac_ext <<_ACEOF
27316/* end confdefs.h. */
27317#include <curses.h>
27318int
27319main ()
27320{
27321void *x=is_term_resized
27322 ;
27323 return 0;
27324}
27325_ACEOF
27326rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027327if { (ac_try="$ac_compile"
27328case "(($ac_try" in
27329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27330 *) ac_try_echo=$ac_try;;
27331esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027333 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027334 ac_status=$?
27335 grep -v '^ *+' conftest.er1 >conftest.err
27336 rm -f conftest.er1
27337 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027339 (exit $ac_status); } && {
27340 test -z "$ac_c_werror_flag" ||
27341 test ! -s conftest.err
27342 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027343
27344cat >>confdefs.h <<\_ACEOF
27345#define HAVE_CURSES_IS_TERM_RESIZED 1
27346_ACEOF
27347
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027348 { echo "$as_me:$LINENO: result: yes" >&5
27349echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027350else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027351 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027352sed 's/^/| /' conftest.$ac_ext >&5
27353
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027354 { echo "$as_me:$LINENO: result: no" >&5
27355echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027356
27357fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027358
Martin v. Löwiseba40652007-08-30 20:10:57 +000027359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027361{ echo "$as_me:$LINENO: checking for resize_term" >&5
27362echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027363cat >conftest.$ac_ext <<_ACEOF
27364/* confdefs.h. */
27365_ACEOF
27366cat confdefs.h >>conftest.$ac_ext
27367cat >>conftest.$ac_ext <<_ACEOF
27368/* end confdefs.h. */
27369#include <curses.h>
27370int
27371main ()
27372{
27373void *x=resize_term
27374 ;
27375 return 0;
27376}
27377_ACEOF
27378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027379if { (ac_try="$ac_compile"
27380case "(($ac_try" in
27381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27382 *) ac_try_echo=$ac_try;;
27383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027385 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027386 ac_status=$?
27387 grep -v '^ *+' conftest.er1 >conftest.err
27388 rm -f conftest.er1
27389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027391 (exit $ac_status); } && {
27392 test -z "$ac_c_werror_flag" ||
27393 test ! -s conftest.err
27394 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027395
27396cat >>confdefs.h <<\_ACEOF
27397#define HAVE_CURSES_RESIZE_TERM 1
27398_ACEOF
27399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027400 { echo "$as_me:$LINENO: result: yes" >&5
27401echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027402else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027403 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027404sed 's/^/| /' conftest.$ac_ext >&5
27405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027406 { echo "$as_me:$LINENO: result: no" >&5
27407echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027408
27409fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027410
Martin v. Löwiseba40652007-08-30 20:10:57 +000027411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027413{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27414echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027415cat >conftest.$ac_ext <<_ACEOF
27416/* confdefs.h. */
27417_ACEOF
27418cat confdefs.h >>conftest.$ac_ext
27419cat >>conftest.$ac_ext <<_ACEOF
27420/* end confdefs.h. */
27421#include <curses.h>
27422int
27423main ()
27424{
27425void *x=resizeterm
27426 ;
27427 return 0;
27428}
27429_ACEOF
27430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027431if { (ac_try="$ac_compile"
27432case "(($ac_try" in
27433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27434 *) ac_try_echo=$ac_try;;
27435esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027437 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027438 ac_status=$?
27439 grep -v '^ *+' conftest.er1 >conftest.err
27440 rm -f conftest.er1
27441 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027443 (exit $ac_status); } && {
27444 test -z "$ac_c_werror_flag" ||
27445 test ! -s conftest.err
27446 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027447
27448cat >>confdefs.h <<\_ACEOF
27449#define HAVE_CURSES_RESIZETERM 1
27450_ACEOF
27451
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027452 { echo "$as_me:$LINENO: result: yes" >&5
27453echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027454else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027455 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027456sed 's/^/| /' conftest.$ac_ext >&5
27457
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027458 { echo "$as_me:$LINENO: result: no" >&5
27459echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027460
27461fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027462
Martin v. Löwiseba40652007-08-30 20:10:57 +000027463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27464
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027465{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27466echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027467
27468if test -r /dev/ptmx
27469then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027470 { echo "$as_me:$LINENO: result: yes" >&5
27471echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027472
27473cat >>confdefs.h <<\_ACEOF
27474#define HAVE_DEV_PTMX 1
27475_ACEOF
27476
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027477else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027478 { echo "$as_me:$LINENO: result: no" >&5
27479echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027480fi
27481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027482{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27483echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027484
27485if test -r /dev/ptc
27486then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027487 { echo "$as_me:$LINENO: result: yes" >&5
27488echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027489
27490cat >>confdefs.h <<\_ACEOF
27491#define HAVE_DEV_PTC 1
27492_ACEOF
27493
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027495 { echo "$as_me:$LINENO: result: no" >&5
27496echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027497fi
27498
Mark Dickinson82864d12009-11-15 16:18:58 +000027499if test "$have_long_long" = yes
27500then
27501 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27502echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27503 if test "${ac_cv_have_long_long_format+set}" = set; then
27504 echo $ECHO_N "(cached) $ECHO_C" >&6
27505else
27506 if test "$cross_compiling" = yes; then
27507 ac_cv_have_long_long_format=no
27508else
27509 cat >conftest.$ac_ext <<_ACEOF
27510/* confdefs.h. */
27511_ACEOF
27512cat confdefs.h >>conftest.$ac_ext
27513cat >>conftest.$ac_ext <<_ACEOF
27514/* end confdefs.h. */
27515
27516 #include <stdio.h>
27517 #include <stddef.h>
27518 #include <string.h>
27519
27520 #ifdef HAVE_SYS_TYPES_H
27521 #include <sys/types.h>
27522 #endif
27523
27524 int main()
27525 {
27526 char buffer[256];
27527
27528 if (sprintf(buffer, "%lld", (long long)123) < 0)
27529 return 1;
27530 if (strcmp(buffer, "123"))
27531 return 1;
27532
27533 if (sprintf(buffer, "%lld", (long long)-123) < 0)
27534 return 1;
27535 if (strcmp(buffer, "-123"))
27536 return 1;
27537
27538 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27539 return 1;
27540 if (strcmp(buffer, "123"))
27541 return 1;
27542
27543 return 0;
27544 }
27545
27546_ACEOF
27547rm -f conftest$ac_exeext
27548if { (ac_try="$ac_link"
27549case "(($ac_try" in
27550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27551 *) ac_try_echo=$ac_try;;
27552esac
27553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27554 (eval "$ac_link") 2>&5
27555 ac_status=$?
27556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27557 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27558 { (case "(($ac_try" in
27559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27560 *) ac_try_echo=$ac_try;;
27561esac
27562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27563 (eval "$ac_try") 2>&5
27564 ac_status=$?
27565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27566 (exit $ac_status); }; }; then
27567 ac_cv_have_long_long_format=yes
27568else
27569 echo "$as_me: program exited with status $ac_status" >&5
27570echo "$as_me: failed program was:" >&5
27571sed 's/^/| /' conftest.$ac_ext >&5
27572
27573( exit $ac_status )
27574ac_cv_have_long_long_format=no
27575fi
27576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27577fi
27578
27579
27580
27581fi
27582
27583 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27584echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27585fi
27586
Mark Dickinson5ce84742009-12-31 20:48:04 +000027587if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027588then
27589
27590cat >>confdefs.h <<\_ACEOF
27591#define PY_FORMAT_LONG_LONG "ll"
27592_ACEOF
27593
27594fi
27595
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027596if test $ac_sys_system = Darwin
27597then
27598 LIBS="$LIBS -framework CoreFoundation"
27599fi
27600
Mark Dickinson82864d12009-11-15 16:18:58 +000027601
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027602{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27603echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027604if test "${ac_cv_have_size_t_format+set}" = set; then
27605 echo $ECHO_N "(cached) $ECHO_C" >&6
27606else
27607 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027608 ac_cv_have_size_t_format="cross -- assuming yes"
27609
Brett Cannon09d12362006-05-11 05:11:33 +000027610else
27611 cat >conftest.$ac_ext <<_ACEOF
27612/* confdefs.h. */
27613_ACEOF
27614cat confdefs.h >>conftest.$ac_ext
27615cat >>conftest.$ac_ext <<_ACEOF
27616/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027617
Brett Cannon09d12362006-05-11 05:11:33 +000027618#include <stdio.h>
27619#include <stddef.h>
27620#include <string.h>
27621
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027622#ifdef HAVE_SYS_TYPES_H
27623#include <sys/types.h>
27624#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027625
27626#ifdef HAVE_SSIZE_T
27627typedef ssize_t Py_ssize_t;
27628#elif SIZEOF_VOID_P == SIZEOF_LONG
27629typedef long Py_ssize_t;
27630#else
27631typedef int Py_ssize_t;
27632#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027633
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027634int main()
27635{
27636 char buffer[256];
27637
Brett Cannon09d12362006-05-11 05:11:33 +000027638 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27639 return 1;
27640
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027641 if (strcmp(buffer, "123"))
27642 return 1;
27643
27644 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27645 return 1;
27646
27647 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027648 return 1;
27649
27650 return 0;
27651}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027652
Brett Cannon09d12362006-05-11 05:11:33 +000027653_ACEOF
27654rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027655if { (ac_try="$ac_link"
27656case "(($ac_try" in
27657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27658 *) ac_try_echo=$ac_try;;
27659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027661 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027662 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027664 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027665 { (case "(($ac_try" in
27666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27667 *) ac_try_echo=$ac_try;;
27668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027670 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027673 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027674 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027675else
27676 echo "$as_me: program exited with status $ac_status" >&5
27677echo "$as_me: failed program was:" >&5
27678sed 's/^/| /' conftest.$ac_ext >&5
27679
27680( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027681ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027682fi
27683rm -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 +000027684fi
27685
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027686
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027687fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027688{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27689echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027690if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027691
27692cat >>confdefs.h <<\_ACEOF
27693#define PY_FORMAT_SIZE_T "z"
27694_ACEOF
27695
27696fi
27697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027698{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27699echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027700if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027701 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027702else
Martin v. Löwis11437992002-04-12 09:54:03 +000027703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027704/* confdefs.h. */
27705_ACEOF
27706cat confdefs.h >>conftest.$ac_ext
27707cat >>conftest.$ac_ext <<_ACEOF
27708/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027709
27710#ifdef HAVE_SYS_TYPES_H
27711#include <sys/types.h>
27712#endif
27713#ifdef HAVE_SYS_SOCKET_H
27714#include <sys/socket.h>
27715#endif
27716
27717
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027718typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027719int
27720main ()
27721{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027722if ((ac__type_new_ *) 0)
27723 return 0;
27724if (sizeof (ac__type_new_))
27725 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027726 ;
27727 return 0;
27728}
27729_ACEOF
27730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027731if { (ac_try="$ac_compile"
27732case "(($ac_try" in
27733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27734 *) ac_try_echo=$ac_try;;
27735esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027739 grep -v '^ *+' conftest.er1 >conftest.err
27740 rm -f conftest.er1
27741 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027743 (exit $ac_status); } && {
27744 test -z "$ac_c_werror_flag" ||
27745 test ! -s conftest.err
27746 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027747 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027750sed 's/^/| /' conftest.$ac_ext >&5
27751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027752 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027754
27755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027756fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027757{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27758echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27759if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027760 :
27761else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027762
Martin v. Löwis01c04012002-11-11 14:58:44 +000027763cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027764#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027765_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027766
27767fi
27768
Michael W. Hudson54241132001-12-07 15:38:26 +000027769
Michael W. Hudson54241132001-12-07 15:38:26 +000027770
27771
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027772for h in `(cd $srcdir;echo Python/thread_*.h)`
27773do
27774 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27775done
27776
Michael W. Hudson54241132001-12-07 15:38:26 +000027777
Neal Norwitzd24499d2005-12-18 21:36:39 +000027778SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027779{ echo "$as_me:$LINENO: checking for build directories" >&5
27780echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027781for dir in $SRCDIRS; do
27782 if test ! -d $dir; then
27783 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027784 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027785done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027786{ echo "$as_me:$LINENO: result: done" >&5
27787echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027788
Guido van Rossum627b2d71993-12-24 10:39:16 +000027789# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027790ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027791
Martin v. Löwis11437992002-04-12 09:54:03 +000027792cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027793# This file is a shell script that caches the results of configure
27794# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027795# scripts and configure runs, see configure's option --config-cache.
27796# It is not useful on other systems. If it contains results you don't
27797# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027798#
Martin v. Löwis11437992002-04-12 09:54:03 +000027799# config.status only pays attention to the cache file if you give it
27800# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027801#
Skip Montanaro6dead952003-09-25 14:50:04 +000027802# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027803# loading this file, other *unset* `ac_cv_foo' will be assigned the
27804# following values.
27805
27806_ACEOF
27807
Guido van Rossumf78abae1997-01-21 22:02:36 +000027808# The following way of writing the cache mishandles newlines in values,
27809# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027810# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027811# Ultrix sh set writes to stderr and can't be redirected directly,
27812# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027813(
27814 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27815 eval ac_val=\$$ac_var
27816 case $ac_val in #(
27817 *${as_nl}*)
27818 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027819 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27820echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027821 esac
27822 case $ac_var in #(
27823 _ | IFS | as_nl) ;; #(
27824 *) $as_unset $ac_var ;;
27825 esac ;;
27826 esac
27827 done
27828
Martin v. Löwis11437992002-04-12 09:54:03 +000027829 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027830 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27831 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027832 # `set' does not quote correctly, so add quotes (double-quote
27833 # substitution turns \\\\ into \\, and sed turns \\ into \).
27834 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027835 "s/'/'\\\\''/g;
27836 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027837 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027838 *)
27839 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027840 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027841 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027842 esac |
27843 sort
27844) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027845 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027846 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027847 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027848 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027849 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27850 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027851 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27852 :end' >>confcache
27853if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27854 if test -w "$cache_file"; then
27855 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027856 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27857echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027858 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027859 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027860 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27861echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027862 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027863fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027864rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027865
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027866test "x$prefix" = xNONE && prefix=$ac_default_prefix
27867# Let make expand exec_prefix.
27868test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027869
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027870DEFS=-DHAVE_CONFIG_H
27871
Skip Montanaro6dead952003-09-25 14:50:04 +000027872ac_libobjs=
27873ac_ltlibobjs=
27874for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27875 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027876 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027877 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027878 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27879 # will be set to the directory where LIBOBJS objects are built.
27880 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27881 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027882done
27883LIBOBJS=$ac_libobjs
27884
27885LTLIBOBJS=$ac_ltlibobjs
27886
27887
Martin v. Löwis11437992002-04-12 09:54:03 +000027888
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027889: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027890ac_clean_files_save=$ac_clean_files
27891ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027892{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27893echo "$as_me: creating $CONFIG_STATUS" >&6;}
27894cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027895#! $SHELL
27896# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027897# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027898# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027899# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027900
Martin v. Löwis11437992002-04-12 09:54:03 +000027901debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027902ac_cs_recheck=false
27903ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027904SHELL=\${CONFIG_SHELL-$SHELL}
27905_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027906
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027907cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027908## --------------------- ##
27909## M4sh Initialization. ##
27910## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027911
Martin v. Löwiseba40652007-08-30 20:10:57 +000027912# Be more Bourne compatible
27913DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027914if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27915 emulate sh
27916 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027917 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027918 # is contrary to our usage. Disable this feature.
27919 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027920 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027921else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027922 case `(set -o) 2>/dev/null` in
27923 *posix*) set -o posix ;;
27924esac
27925
Martin v. Löwis11437992002-04-12 09:54:03 +000027926fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027927
Skip Montanaro6dead952003-09-25 14:50:04 +000027928
Martin v. Löwis11437992002-04-12 09:54:03 +000027929
27930
Martin v. Löwiseba40652007-08-30 20:10:57 +000027931# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027932# Avoid depending upon Character Ranges.
27933as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27934as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27935as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27936as_cr_digits='0123456789'
27937as_cr_alnum=$as_cr_Letters$as_cr_digits
27938
27939# The user is always right.
27940if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027941 echo "#! /bin/sh" >conf$$.sh
27942 echo "exit 0" >>conf$$.sh
27943 chmod +x conf$$.sh
27944 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27945 PATH_SEPARATOR=';'
27946 else
27947 PATH_SEPARATOR=:
27948 fi
27949 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027950fi
27951
Martin v. Löwiseba40652007-08-30 20:10:57 +000027952# Support unset when possible.
27953if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27954 as_unset=unset
27955else
27956 as_unset=false
27957fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027958
Martin v. Löwiseba40652007-08-30 20:10:57 +000027959
27960# IFS
27961# We need space, tab and new line, in precisely that order. Quoting is
27962# there to prevent editors from complaining about space-tab.
27963# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27964# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027965as_nl='
27966'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027967IFS=" "" $as_nl"
27968
27969# Find who we are. Look in the path if we contain no directory separator.
27970case $0 in
27971 *[\\/]* ) as_myself=$0 ;;
27972 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027973for as_dir in $PATH
27974do
27975 IFS=$as_save_IFS
27976 test -z "$as_dir" && as_dir=.
27977 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27978done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027979IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027980
Martin v. Löwiseba40652007-08-30 20:10:57 +000027981 ;;
27982esac
27983# We did not find ourselves, most probably we were run as `sh COMMAND'
27984# in which case we are not to be found in the path.
27985if test "x$as_myself" = x; then
27986 as_myself=$0
27987fi
27988if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027989 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000027990 { (exit 1); exit 1; }
27991fi
27992
27993# Work around bugs in pre-3.0 UWIN ksh.
27994for as_var in ENV MAIL MAILPATH
27995do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27996done
27997PS1='$ '
27998PS2='> '
27999PS4='+ '
28000
28001# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028002for as_var in \
28003 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28004 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28005 LC_TELEPHONE LC_TIME
28006do
28007 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28008 eval $as_var=C; export $as_var
28009 else
28010 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28011 fi
28012done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028013
28014# Required to use basename.
28015if expr a : '\(a\)' >/dev/null 2>&1 &&
28016 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28017 as_expr=expr
28018else
28019 as_expr=false
28020fi
28021
28022if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28023 as_basename=basename
28024else
28025 as_basename=false
28026fi
28027
28028
28029# Name of the executable.
28030as_me=`$as_basename -- "$0" ||
28031$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28032 X"$0" : 'X\(//\)$' \| \
28033 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028034echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028035 sed '/^.*\/\([^/][^/]*\)\/*$/{
28036 s//\1/
28037 q
28038 }
28039 /^X\/\(\/\/\)$/{
28040 s//\1/
28041 q
28042 }
28043 /^X\/\(\/\).*/{
28044 s//\1/
28045 q
28046 }
28047 s/.*/./; q'`
28048
28049# CDPATH.
28050$as_unset CDPATH
28051
28052
28053
Martin v. Löwis11437992002-04-12 09:54:03 +000028054 as_lineno_1=$LINENO
28055 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028056 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028057 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028058
Martin v. Löwis11437992002-04-12 09:54:03 +000028059 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28060 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028061 # line-number line after each line using $LINENO; the second 'sed'
28062 # does the real work. The second script uses 'N' to pair each
28063 # line-number line with the line containing $LINENO, and appends
28064 # trailing '-' during substitution so that $LINENO is not a special
28065 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028066 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028067 # scripts with optimization help from Paolo Bonzini. Blame Lee
28068 # E. McMahon (1931-1989) for sed's syntax. :-)
28069 sed -n '
28070 p
28071 /[$]LINENO/=
28072 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028073 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028074 s/[$]LINENO.*/&-/
28075 t lineno
28076 b
28077 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028078 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028079 :loop
28080 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028081 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028082 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028083 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028084 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028085 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028086 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028087
Martin v. Löwis11437992002-04-12 09:54:03 +000028088 # Don't try to exec as it changes $[0], causing all sort of problems
28089 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028090 # original and so on. Autoconf is especially sensitive to this).
28091 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028092 # Exit status is that of the last command.
28093 exit
28094}
28095
28096
Martin v. Löwiseba40652007-08-30 20:10:57 +000028097if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28098 as_dirname=dirname
28099else
28100 as_dirname=false
28101fi
28102
28103ECHO_C= ECHO_N= ECHO_T=
28104case `echo -n x` in
28105-n*)
28106 case `echo 'x\c'` in
28107 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28108 *) ECHO_C='\c';;
28109 esac;;
28110*)
28111 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028113
Martin v. Löwiseba40652007-08-30 20:10:57 +000028114if expr a : '\(a\)' >/dev/null 2>&1 &&
28115 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028116 as_expr=expr
28117else
28118 as_expr=false
28119fi
28120
28121rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028122if test -d conf$$.dir; then
28123 rm -f conf$$.dir/conf$$.file
28124else
28125 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028126 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028128echo >conf$$.file
28129if ln -s conf$$.file conf$$ 2>/dev/null; then
28130 as_ln_s='ln -s'
28131 # ... but there are two gotchas:
28132 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28133 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28134 # In both cases, we have to default to `cp -p'.
28135 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028136 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028137elif ln conf$$.file conf$$ 2>/dev/null; then
28138 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028139else
28140 as_ln_s='cp -p'
28141fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028142rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28143rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028144
Skip Montanaro6dead952003-09-25 14:50:04 +000028145if mkdir -p . 2>/dev/null; then
28146 as_mkdir_p=:
28147else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028148 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028149 as_mkdir_p=false
28150fi
28151
Martin v. Löwiseba40652007-08-30 20:10:57 +000028152if test -x / >/dev/null 2>&1; then
28153 as_test_x='test -x'
28154else
28155 if ls -dL / >/dev/null 2>&1; then
28156 as_ls_L_option=L
28157 else
28158 as_ls_L_option=
28159 fi
28160 as_test_x='
28161 eval sh -c '\''
28162 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028163 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028164 else
28165 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028166 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028167 esac;
28168 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28169 ???[sx]*):;;*)false;;esac;fi
28170 '\'' sh
28171 '
28172fi
28173as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028174
28175# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028176as_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 +000028177
28178# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028179as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028180
28181
Martin v. Löwis11437992002-04-12 09:54:03 +000028182exec 6>&1
28183
Martin v. Löwiseba40652007-08-30 20:10:57 +000028184# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028185# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028186# values after options handling.
28187ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028188This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028189generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028190
28191 CONFIG_FILES = $CONFIG_FILES
28192 CONFIG_HEADERS = $CONFIG_HEADERS
28193 CONFIG_LINKS = $CONFIG_LINKS
28194 CONFIG_COMMANDS = $CONFIG_COMMANDS
28195 $ $0 $@
28196
Martin v. Löwiseba40652007-08-30 20:10:57 +000028197on `(hostname || uname -n) 2>/dev/null | sed 1q`
28198"
28199
Martin v. Löwis11437992002-04-12 09:54:03 +000028200_ACEOF
28201
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028202cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028203# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028204config_files="$ac_config_files"
28205config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028206
Martin v. Löwiseba40652007-08-30 20:10:57 +000028207_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028209cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028210ac_cs_usage="\
28211\`$as_me' instantiates files from templates according to the
28212current configuration.
28213
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028214Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028215
28216 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028217 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028218 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028219 -d, --debug don't remove temporary files
28220 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028221 --file=FILE[:TEMPLATE]
28222 instantiate the configuration file FILE
28223 --header=FILE[:TEMPLATE]
28224 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028225
28226Configuration files:
28227$config_files
28228
28229Configuration headers:
28230$config_headers
28231
28232Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028233
Martin v. Löwiseba40652007-08-30 20:10:57 +000028234_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028235cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028236ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028237python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028238configured by $0, generated by GNU Autoconf 2.61,
28239 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028240
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028241Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028242This config.status script is free software; the Free Software Foundation
28243gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028244
28245ac_pwd='$ac_pwd'
28246srcdir='$srcdir'
28247INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028248_ACEOF
28249
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028250cat >>$CONFIG_STATUS <<\_ACEOF
28251# If no file are specified by the user, then we need to provide default
28252# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028253ac_need_defaults=:
28254while test $# != 0
28255do
28256 case $1 in
28257 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028258 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28259 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028260 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028261 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028262 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028263 ac_option=$1
28264 ac_optarg=$2
28265 ac_shift=shift
28266 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028267 esac
28268
Skip Montanaro6dead952003-09-25 14:50:04 +000028269 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028270 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028271 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28272 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028273 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028274 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028275 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028276 debug=: ;;
28277 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028278 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028279 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028280 ac_need_defaults=false;;
28281 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028282 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028283 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028284 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028285 --he | --h)
28286 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028287 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028288Try \`$0 --help' for more information." >&2
28289 { (exit 1); exit 1; }; };;
28290 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028291 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028292 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28293 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28294 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028295
28296 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028297 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028298Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028299 { (exit 1); exit 1; }; } ;;
28300
Martin v. Löwiseba40652007-08-30 20:10:57 +000028301 *) ac_config_targets="$ac_config_targets $1"
28302 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028303
28304 esac
28305 shift
28306done
28307
Skip Montanaro6dead952003-09-25 14:50:04 +000028308ac_configure_extra_args=
28309
28310if $ac_cs_silent; then
28311 exec 6>/dev/null
28312 ac_configure_extra_args="$ac_configure_extra_args --silent"
28313fi
28314
28315_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028316cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028317if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028318 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28319 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028320 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028321 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028322fi
28323
Martin v. Löwis11437992002-04-12 09:54:03 +000028324_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028325cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028326exec 5>>config.log
28327{
28328 echo
28329 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28330## Running $as_me. ##
28331_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028332 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028333} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028334
Martin v. Löwiseba40652007-08-30 20:10:57 +000028335_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028336cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028337_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028339cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028340
28341# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028342for ac_config_target in $ac_config_targets
28343do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028344 case $ac_config_target in
28345 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28346 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28347 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28348 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028349 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28350 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028351 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28352 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028353 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028354
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028355 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28356echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028357 { (exit 1); exit 1; }; };;
28358 esac
28359done
28360
Martin v. Löwiseba40652007-08-30 20:10:57 +000028361
Martin v. Löwis11437992002-04-12 09:54:03 +000028362# If the user did not use the arguments to specify the items to instantiate,
28363# then the envvar interface is used. Set only those that are not.
28364# We use the long form for the default assignment because of an extremely
28365# bizarre bug on SunOS 4.1.3.
28366if $ac_need_defaults; then
28367 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28368 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28369fi
28370
Skip Montanaro6dead952003-09-25 14:50:04 +000028371# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028372# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028373# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028374# Hook for its removal unless debugging.
28375# Note that there is a small window in which the directory will not be cleaned:
28376# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028377$debug ||
28378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028379 tmp=
28380 trap 'exit_status=$?
28381 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28382' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028383 trap '{ (exit 1); exit 1; }' 1 2 13 15
28384}
Martin v. Löwis11437992002-04-12 09:54:03 +000028385# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028386
Martin v. Löwis11437992002-04-12 09:54:03 +000028387{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028388 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028389 test -n "$tmp" && test -d "$tmp"
28390} ||
28391{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028392 tmp=./conf$$-$RANDOM
28393 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028394} ||
28395{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028396 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028397 { (exit 1); exit 1; }
28398}
28399
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028400#
28401# Set up the sed scripts for CONFIG_FILES section.
28402#
28403
28404# No need to generate the scripts if there are no CONFIG_FILES.
28405# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028406if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028407
28408_ACEOF
28409
Martin v. Löwiseba40652007-08-30 20:10:57 +000028410
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028411
Martin v. Löwiseba40652007-08-30 20:10:57 +000028412ac_delim='%!_!# '
28413for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028414 cat >conf$$subs.sed <<_ACEOF
28415SHELL!$SHELL$ac_delim
28416PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28417PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28418PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28419PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28420PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28421PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28422exec_prefix!$exec_prefix$ac_delim
28423prefix!$prefix$ac_delim
28424program_transform_name!$program_transform_name$ac_delim
28425bindir!$bindir$ac_delim
28426sbindir!$sbindir$ac_delim
28427libexecdir!$libexecdir$ac_delim
28428datarootdir!$datarootdir$ac_delim
28429datadir!$datadir$ac_delim
28430sysconfdir!$sysconfdir$ac_delim
28431sharedstatedir!$sharedstatedir$ac_delim
28432localstatedir!$localstatedir$ac_delim
28433includedir!$includedir$ac_delim
28434oldincludedir!$oldincludedir$ac_delim
28435docdir!$docdir$ac_delim
28436infodir!$infodir$ac_delim
28437htmldir!$htmldir$ac_delim
28438dvidir!$dvidir$ac_delim
28439pdfdir!$pdfdir$ac_delim
28440psdir!$psdir$ac_delim
28441libdir!$libdir$ac_delim
28442localedir!$localedir$ac_delim
28443mandir!$mandir$ac_delim
28444DEFS!$DEFS$ac_delim
28445ECHO_C!$ECHO_C$ac_delim
28446ECHO_N!$ECHO_N$ac_delim
28447ECHO_T!$ECHO_T$ac_delim
28448LIBS!$LIBS$ac_delim
28449build_alias!$build_alias$ac_delim
28450host_alias!$host_alias$ac_delim
28451target_alias!$target_alias$ac_delim
28452VERSION!$VERSION$ac_delim
28453SOVERSION!$SOVERSION$ac_delim
28454CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28455UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28456ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028457LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028458PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28459PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28460PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28461PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28462PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28463FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28464FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28465FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28466FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28467FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28468MACHDEP!$MACHDEP$ac_delim
28469SGI_ABI!$SGI_ABI$ac_delim
28470EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28471EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28472CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28473EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28474CC!$CC$ac_delim
28475CFLAGS!$CFLAGS$ac_delim
28476LDFLAGS!$LDFLAGS$ac_delim
28477CPPFLAGS!$CPPFLAGS$ac_delim
28478ac_ct_CC!$ac_ct_CC$ac_delim
28479EXEEXT!$EXEEXT$ac_delim
28480OBJEXT!$OBJEXT$ac_delim
28481CXX!$CXX$ac_delim
28482MAINCC!$MAINCC$ac_delim
28483CPP!$CPP$ac_delim
28484GREP!$GREP$ac_delim
28485EGREP!$EGREP$ac_delim
28486BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28487LIBRARY!$LIBRARY$ac_delim
28488LDLIBRARY!$LDLIBRARY$ac_delim
28489DLLLIBRARY!$DLLLIBRARY$ac_delim
28490BLDLIBRARY!$BLDLIBRARY$ac_delim
28491LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28492INSTSONAME!$INSTSONAME$ac_delim
28493RUNSHARED!$RUNSHARED$ac_delim
28494LINKCC!$LINKCC$ac_delim
28495GNULD!$GNULD$ac_delim
28496RANLIB!$RANLIB$ac_delim
28497AR!$AR$ac_delim
28498ARFLAGS!$ARFLAGS$ac_delim
28499SVNVERSION!$SVNVERSION$ac_delim
28500INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28501INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28502INSTALL_DATA!$INSTALL_DATA$ac_delim
28503LN!$LN$ac_delim
28504OPT!$OPT$ac_delim
28505BASECFLAGS!$BASECFLAGS$ac_delim
28506UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28507OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28508LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28509SO!$SO$ac_delim
28510LDSHARED!$LDSHARED$ac_delim
28511BLDSHARED!$BLDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028512_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028513
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028514 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 +000028515 break
28516 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028517 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28518echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028519 { (exit 1); exit 1; }; }
28520 else
28521 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028522 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028523done
28524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028525ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28526if test -n "$ac_eof"; then
28527 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28528 ac_eof=`expr $ac_eof + 1`
28529fi
28530
28531cat >>$CONFIG_STATUS <<_ACEOF
28532cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28533/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028534_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028535sed '
28536s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28537s/^/s,@/; s/!/@,|#_!!_#|/
28538:n
28539t n
28540s/'"$ac_delim"'$/,g/; t
28541s/$/\\/; p
28542N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28543' >>$CONFIG_STATUS <conf$$subs.sed
28544rm -f conf$$subs.sed
28545cat >>$CONFIG_STATUS <<_ACEOF
28546CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028547_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028548
28549
28550ac_delim='%!_!# '
28551for ac_last_try in false false false false false :; do
28552 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren92919a62009-12-24 13:30:58 +000028553CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028554LINKFORSHARED!$LINKFORSHARED$ac_delim
28555CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28556SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028557PKG_CONFIG!$PKG_CONFIG$ac_delim
28558LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028559USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28560SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28561USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28562LDLAST!$LDLAST$ac_delim
28563THREADOBJ!$THREADOBJ$ac_delim
28564DLINCLDIR!$DLINCLDIR$ac_delim
28565DYNLOADFILE!$DYNLOADFILE$ac_delim
28566MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28567TRUE!$TRUE$ac_delim
28568LIBOBJS!$LIBOBJS$ac_delim
28569HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28570HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28571HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28572HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28573HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28574LIBM!$LIBM$ac_delim
28575LIBC!$LIBC$ac_delim
28576UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28577THREADHEADERS!$THREADHEADERS$ac_delim
28578SRCDIRS!$SRCDIRS$ac_delim
28579LTLIBOBJS!$LTLIBOBJS$ac_delim
28580_ACEOF
28581
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028582 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028583 break
28584 elif $ac_last_try; then
28585 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28586echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028587 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028588 else
28589 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28590 fi
28591done
28592
28593ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28594if test -n "$ac_eof"; then
28595 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28596 ac_eof=`expr $ac_eof + 1`
28597fi
28598
28599cat >>$CONFIG_STATUS <<_ACEOF
28600cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28601/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028602_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028603sed '
28604s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28605s/^/s,@/; s/!/@,|#_!!_#|/
28606:n
28607t n
28608s/'"$ac_delim"'$/,g/; t
28609s/$/\\/; p
28610N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28611' >>$CONFIG_STATUS <conf$$subs.sed
28612rm -f conf$$subs.sed
28613cat >>$CONFIG_STATUS <<_ACEOF
28614:end
28615s/|#_!!_#|//g
28616CEOF$ac_eof
28617_ACEOF
28618
Martin v. Löwiseba40652007-08-30 20:10:57 +000028619
28620# VPATH may cause trouble with some makes, so we remove $(srcdir),
28621# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28622# trailing colons and then remove the whole line if VPATH becomes empty
28623# (actually we leave an empty line to preserve line numbers).
28624if test "x$srcdir" = x.; then
28625 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28626s/:*\$(srcdir):*/:/
28627s/:*\${srcdir}:*/:/
28628s/:*@srcdir@:*/:/
28629s/^\([^=]*=[ ]*\):*/\1/
28630s/:*$//
28631s/^[^=]*=[ ]*$//
28632}'
28633fi
28634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028635cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028636fi # test -n "$CONFIG_FILES"
28637
Martin v. Löwiseba40652007-08-30 20:10:57 +000028638
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028639for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028640do
28641 case $ac_tag in
28642 :[FHLC]) ac_mode=$ac_tag; continue;;
28643 esac
28644 case $ac_mode$ac_tag in
28645 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028646 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28647echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028648 { (exit 1); exit 1; }; };;
28649 :[FH]-) ac_tag=-:-;;
28650 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28651 esac
28652 ac_save_IFS=$IFS
28653 IFS=:
28654 set x $ac_tag
28655 IFS=$ac_save_IFS
28656 shift
28657 ac_file=$1
28658 shift
28659
28660 case $ac_mode in
28661 :L) ac_source=$1;;
28662 :[FH])
28663 ac_file_inputs=
28664 for ac_f
28665 do
28666 case $ac_f in
28667 -) ac_f="$tmp/stdin";;
28668 *) # Look for the file first in the build tree, then in the source tree
28669 # (if the path is not absolute). The absolute path cannot be DOS-style,
28670 # because $ac_f cannot contain `:'.
28671 test -f "$ac_f" ||
28672 case $ac_f in
28673 [\\/$]*) false;;
28674 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28675 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028676 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28677echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028678 { (exit 1); exit 1; }; };;
28679 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028680 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028681 done
28682
28683 # Let's still pretend it is `configure' which instantiates (i.e., don't
28684 # use $as_me), people would be surprised to read:
28685 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028686 configure_input="Generated from "`IFS=:
28687 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028688 if test x"$ac_file" != x-; then
28689 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028690 { echo "$as_me:$LINENO: creating $ac_file" >&5
28691echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028692 fi
28693
28694 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028695 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028696 esac
28697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028698 esac
28699
Martin v. Löwiseba40652007-08-30 20:10:57 +000028700 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028701$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028702 X"$ac_file" : 'X\(//\)[^/]' \| \
28703 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028704 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028705echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028706 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28707 s//\1/
28708 q
28709 }
28710 /^X\(\/\/\)[^/].*/{
28711 s//\1/
28712 q
28713 }
28714 /^X\(\/\/\)$/{
28715 s//\1/
28716 q
28717 }
28718 /^X\(\/\).*/{
28719 s//\1/
28720 q
28721 }
28722 s/.*/./; q'`
28723 { as_dir="$ac_dir"
28724 case $as_dir in #(
28725 -*) as_dir=./$as_dir;;
28726 esac
28727 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028728 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028729 while :; do
28730 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028731 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028732 *) as_qdir=$as_dir;;
28733 esac
28734 as_dirs="'$as_qdir' $as_dirs"
28735 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028736$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028737 X"$as_dir" : 'X\(//\)[^/]' \| \
28738 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028739 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028740echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28742 s//\1/
28743 q
28744 }
28745 /^X\(\/\/\)[^/].*/{
28746 s//\1/
28747 q
28748 }
28749 /^X\(\/\/\)$/{
28750 s//\1/
28751 q
28752 }
28753 /^X\(\/\).*/{
28754 s//\1/
28755 q
28756 }
28757 s/.*/./; q'`
28758 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028759 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028760 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028761 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28762echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028763 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028764 ac_builddir=.
28765
Martin v. Löwiseba40652007-08-30 20:10:57 +000028766case "$ac_dir" in
28767.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28768*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028769 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028770 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028771 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028772 case $ac_top_builddir_sub in
28773 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28774 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28775 esac ;;
28776esac
28777ac_abs_top_builddir=$ac_pwd
28778ac_abs_builddir=$ac_pwd$ac_dir_suffix
28779# for backward compatibility:
28780ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028781
28782case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028783 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028784 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028785 ac_top_srcdir=$ac_top_builddir_sub
28786 ac_abs_top_srcdir=$ac_pwd ;;
28787 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028788 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028789 ac_top_srcdir=$srcdir
28790 ac_abs_top_srcdir=$srcdir ;;
28791 *) # Relative name.
28792 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28793 ac_top_srcdir=$ac_top_build_prefix$srcdir
28794 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028795esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028796ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028797
Martin v. Löwis11437992002-04-12 09:54:03 +000028798
Martin v. Löwiseba40652007-08-30 20:10:57 +000028799 case $ac_mode in
28800 :F)
28801 #
28802 # CONFIG_FILE
28803 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028804
28805 case $INSTALL in
28806 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028807 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028808 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028809_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028811cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028812# If the template does not know about datarootdir, expand it.
28813# FIXME: This hack should be removed a few years after 2.60.
28814ac_datarootdir_hack=; ac_datarootdir_seen=
28815
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028816case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028817 p
28818 q
28819}
28820/@datadir@/p
28821/@docdir@/p
28822/@infodir@/p
28823/@localedir@/p
28824/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028825' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028826*datarootdir*) ac_datarootdir_seen=yes;;
28827*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028828 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28829echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028830_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028831cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028832 ac_datarootdir_hack='
28833 s&@datadir@&$datadir&g
28834 s&@docdir@&$docdir&g
28835 s&@infodir@&$infodir&g
28836 s&@localedir@&$localedir&g
28837 s&@mandir@&$mandir&g
28838 s&\\\${datarootdir}&$datarootdir&g' ;;
28839esac
28840_ACEOF
28841
28842# Neutralize VPATH when `$srcdir' = `.'.
28843# Shell code in configure.ac might set extrasub.
28844# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028845cat >>$CONFIG_STATUS <<_ACEOF
28846 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028847$extrasub
28848_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028849cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028850:t
28851/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028852s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028853s&@top_builddir@&$ac_top_builddir_sub&;t t
28854s&@srcdir@&$ac_srcdir&;t t
28855s&@abs_srcdir@&$ac_abs_srcdir&;t t
28856s&@top_srcdir@&$ac_top_srcdir&;t t
28857s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28858s&@builddir@&$ac_builddir&;t t
28859s&@abs_builddir@&$ac_abs_builddir&;t t
28860s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28861s&@INSTALL@&$ac_INSTALL&;t t
28862$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028863" $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 +000028864
Martin v. Löwiseba40652007-08-30 20:10:57 +000028865test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28866 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28867 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028868 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028869which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028871which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028872
Martin v. Löwiseba40652007-08-30 20:10:57 +000028873 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028874 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028875 -) cat "$tmp/out"; rm -f "$tmp/out";;
28876 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28877 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028878 ;;
28879 :H)
28880 #
28881 # CONFIG_HEADER
28882 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028883_ACEOF
28884
28885# Transform confdefs.h into a sed script `conftest.defines', that
28886# substitutes the proper values into config.h.in to produce config.h.
28887rm -f conftest.defines conftest.tail
28888# First, append a space to every undef/define line, to ease matching.
28889echo 's/$/ /' >conftest.defines
28890# Then, protect against being on the right side of a sed subst, or in
28891# an unquoted here document, in config.status. If some macros were
28892# called several times there might be several #defines for the same
28893# symbol, which is useless. But do not sort them, since the last
28894# AC_DEFINE must be honored.
28895ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28896# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28897# NAME is the cpp macro being defined, VALUE is the value it is being given.
28898# PARAMS is the parameter list in the macro definition--in most cases, it's
28899# just an empty string.
28900ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28901ac_dB='\\)[ (].*,\\1define\\2'
28902ac_dC=' '
28903ac_dD=' ,'
28904
28905uniq confdefs.h |
28906 sed -n '
28907 t rset
28908 :rset
28909 s/^[ ]*#[ ]*define[ ][ ]*//
28910 t ok
28911 d
28912 :ok
28913 s/[\\&,]/\\&/g
28914 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28915 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28916 ' >>conftest.defines
28917
28918# Remove the space that was appended to ease matching.
28919# Then replace #undef with comments. This is necessary, for
28920# example, in the case of _POSIX_SOURCE, which is predefined and required
28921# on some systems where configure will not decide to define it.
28922# (The regexp can be short, since the line contains either #define or #undef.)
28923echo 's/ $//
28924s,^[ #]*u.*,/* & */,' >>conftest.defines
28925
28926# Break up conftest.defines:
28927ac_max_sed_lines=50
28928
28929# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28930# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28931# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28932# et cetera.
28933ac_in='$ac_file_inputs'
28934ac_out='"$tmp/out1"'
28935ac_nxt='"$tmp/out2"'
28936
28937while :
28938do
28939 # Write a here document:
28940 cat >>$CONFIG_STATUS <<_ACEOF
28941 # First, check the format of the line:
28942 cat >"\$tmp/defines.sed" <<\\CEOF
28943/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28944/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28945b
28946:def
28947_ACEOF
28948 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28949 echo 'CEOF
28950 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28951 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28952 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28953 grep . conftest.tail >/dev/null || break
28954 rm -f conftest.defines
28955 mv conftest.tail conftest.defines
28956done
28957rm -f conftest.defines conftest.tail
28958
28959echo "ac_result=$ac_in" >>$CONFIG_STATUS
28960cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028961 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028962 echo "/* $configure_input */" >"$tmp/config.h"
28963 cat "$ac_result" >>"$tmp/config.h"
28964 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28965 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28966echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028967 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028968 rm -f $ac_file
28969 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028970 fi
28971 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028972 echo "/* $configure_input */"
28973 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028974 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028975 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028976 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028977
Martin v. Löwiseba40652007-08-30 20:10:57 +000028978
28979 esac
28980
28981done # for ac_tag
28982
Guido van Rossum627b2d71993-12-24 10:39:16 +000028983
Martin v. Löwis11437992002-04-12 09:54:03 +000028984{ (exit 0); exit 0; }
28985_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028986chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028987ac_clean_files=$ac_clean_files_save
28988
28989
28990# configure is writing to config.log, and then calls config.status.
28991# config.status does its own redirection, appending to config.log.
28992# Unfortunately, on DOS this fails, as config.log is still kept open
28993# by configure, so config.status won't be able to write to it; its
28994# output is simply discarded. So we exec the FD to /dev/null,
28995# effectively closing config.log, so it can be properly (re)opened and
28996# appended to by config.status. When coming back to configure, we
28997# need to make the FD available again.
28998if test "$no_create" != yes; then
28999 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029000 ac_config_status_args=
29001 test "$silent" = yes &&
29002 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029003 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029004 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029005 exec 5>>config.log
29006 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29007 # would make configure fail if this is the last instruction.
29008 $ac_cs_success || { (exit 1); exit 1; }
29009fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029010
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029011
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029012echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029013if test ! -f Modules/Setup
29014then
29015 cp $srcdir/Modules/Setup.dist Modules/Setup
29016fi
29017
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029018echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029019if test ! -f Modules/Setup.local
29020then
29021 echo "# Edit this file for local setup changes" >Modules/Setup.local
29022fi
29023
29024echo "creating Makefile"
29025$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29026 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029027 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029028
29029case $ac_sys_system in
29030BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029031 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029032
29033 Support for BeOS is deprecated as of Python 2.6.
29034 See PEP 11 for the gory details.
29035 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029036echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029037
29038 Support for BeOS is deprecated as of Python 2.6.
29039 See PEP 11 for the gory details.
29040 " >&2;}
29041 ;;
29042*) ;;
29043esac
29044
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029045mv config.c Modules